Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portal UI changes for Unified dashboard page across Axway Products #431

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions com.aptana.portal.ui.extended/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions com.aptana.portal.ui.extended/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.aptana.portal.ui.extended</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
26 changes: 26 additions & 0 deletions com.aptana.portal.ui.extended/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Core
Bundle-SymbolicName: com.aptana.portal.ui.extended
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.aptana.portal.ui.extended.PortaUIExtended
Bundle-Vendor: APTANA
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.aptana.portal.ui;visibility:=reexport,
org.eclipse.core.resources,
com.aptana.jetty.util.epl,
org.eclipse.e4.core.contexts,
org.eclipse.e4.ui.css.swt.theme,
org.eclipse.e4.ui.model.workbench,
com.aptana.core,
com.aptana.configurations,
com.aptana.theme,
com.aptana.projects,
com.aptana.core.io,
com.aptana.ui,
com.aptana.explorer
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: com.aptana.portal.ui.dispatch.configurationProcessors,
com.aptana.portal.ui.dispatch.configurationProcessors.installer
4 changes: 4 additions & 0 deletions com.aptana.portal.ui.extended/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AbstractActionController_invocationError=An error occurred while trying to
GemsActionController_computingGemsJobName=Computing installed gems
ActionController_internalError=Internal Error
ConsoleController_devToolboxConsoleName=Dev Toolbox Console
PluginsActionController_computingInstalledPlugins=Computing installed plug-ins...
PluginsActionController_installNewSoftware=Install New Software...
InstallActionController_installing=Installing...
LaunchActionController_launchingJob=Launcing...
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/**
* Aptana Studio
* Copyright (c) 2005-2011 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the GNU Public License (GPL) v3 (with exceptions).
* Please see the license.html included with this distribution for details.
* Any modifications to this file must keep this entire header intact.
*/
package com.aptana.portal.ui.dispatch.browserNotifications;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.aptana.portal.ui.dispatch.BrowserNotifier;
import com.aptana.portal.ui.dispatch.IBrowserNotificationConstants;

/**
* A base class for all browser notification classed. The BrowserNotification register itself as a listener to some
* eclipse event and then notify the target browser editors about any event that is occurring. The notification is done
* through the {@link BrowserNotifier} class.
*
* @author Shalom Gibly <[email protected]>
*/
public abstract class AbstractBrowserNotification
{
protected List<String> notificationTargets;
protected boolean isListening;

/**
* Constructor
*/
public AbstractBrowserNotification()
{
notificationTargets = new ArrayList<String>();
}

/**
* Set the notification targets for this browser notification class. An asterisk (*) sign signals to notify all the
* opened registered browser-editors.
*
* @param targets
* A list of comma separated target ids.
*/
public void setNotificationTargets(String targets)
{
notificationTargets.clear();
if (targets != null)
{
String[] ids = targets.split(", *"); //$NON-NLS-1$
for (String id : ids)
{
id = id.trim();
if (id.equals("*")) { //$NON-NLS-1$
// in case we have an asterisk, the notification will go to all
// of the registered browser-editors.
notificationTargets.clear();
break;
}
if (id.length() > 0)
{
notificationTargets.add(id);
}
}
}
}

/**
* Returns a list of notification targets. An empty list signals that we need to notify any available registered
* browser editor.
*
* @return An unmodifiable notification targets list.
*/
public List<String> getNotificationTargets()
{
return Collections.unmodifiableList(notificationTargets);
}

/**
* Start this browser notifier.
*/
public abstract void start();

/**
* Stop this browser notifier.
*/
public abstract void stop();

/**
* Fire a notification for the registered notification targets with the eventId, type and data.
*
* @param eventId
* See {@link IBrowserNotificationConstants}
* @param eventType
* See {@link IBrowserNotificationConstants}
* @param data
* A JSON data (can be null)
* @see IBrowserNotificationConstants
*/
protected void notifyTargets(String eventId, String eventType, String data)
{
notifyTargets(eventId, eventType, data, false);
}

/**
* Fire a notification for the registered notification targets with the eventId, type and data.
*
* @param eventId
* See {@link IBrowserNotificationConstants}
* @param eventType
* See {@link IBrowserNotificationConstants}
* @param data
* A JSON data (can be null)
* @param notifyInUIThread
* Indicate that the notification should be wrapped in a UI thread.
* @see IBrowserNotificationConstants
*/
protected void notifyTargets(String eventId, String eventType, String data, boolean notifyInUIThread)
{
if (notifyInUIThread)
{
BrowserNotifier.getInstance().notifyBrowserInUIThread(getNotificationTargets(), eventId, eventType, data);
}
else
{
BrowserNotifier.getInstance().notifyBrowser(getNotificationTargets(), eventId, eventType, data);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/**
* Appcelerator Titanium Studio
* Copyright (c) 2013 by Appcelerator, Inc. All Rights Reserved.
* Proprietary and Confidential - This source code is not for redistribution
*/

package com.aptana.portal.ui.dispatch.browserNotifications;

import java.util.Collections;
import java.util.List;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;

import com.aptana.core.logging.IdeLog;
import com.aptana.portal.ui.PortalUIPlugin;

/**
* Proxy class to the contributors of Browser notifications.
*
* @author pinnamuri
*/
public class BrowserNotificationProxy extends AbstractBrowserNotification
{

private IConfigurationElement element;
private AbstractBrowserNotification contributorClass;
private static final String ATT_CLASS = "class"; //$NON-NLS-1$
private static final String ATT_NOTIFICATION_TARGET = "notificationTarget"; //$NON-NLS-1$

public BrowserNotificationProxy(IConfigurationElement element)
{
this.element = element;
}

@Override
public void start()
{
try
{
loadElement();
contributorClass.start();

}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}
}

@Override
public List<String> getNotificationTargets()
{
try
{
loadElement();
return contributorClass.getNotificationTargets();

}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}
return Collections.emptyList();
}

@Override
public void setNotificationTargets(String targets)
{
try
{
loadElement();
contributorClass.setNotificationTargets(targets);
}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}

}

private synchronized void loadElement() throws CoreException
{
if (contributorClass == null)
{
contributorClass = (AbstractBrowserNotification) element.createExecutableExtension(ATT_CLASS);
contributorClass.setNotificationTargets(element.getAttribute(ATT_NOTIFICATION_TARGET));
}
}

@Override
protected void notifyTargets(String eventId, String eventType, String data)
{
try
{
loadElement();
contributorClass.notifyTargets(eventId, eventType, data);
}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}
}

@Override
protected void notifyTargets(String eventId, String eventType, String data, boolean notifyInUIThread)
{
try
{
loadElement();
contributorClass.notifyTargets(eventId, eventType, data, notifyInUIThread);
}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}

}

@Override
public void stop()
{
try
{
loadElement();
contributorClass.stop();

}
catch (CoreException e)
{
IdeLog.logError(PortalUIPlugin.getDefault(), e);
}
}

}
Loading