- */
-public class WorkbenchActionController extends AbstractActionController
-{
- private static final String ID = "id"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String LABEL = "label"; //$NON-NLS-1$
-
- // ############## Actions ###############
- /**
- * Returns a JSON map representation for the active perspective.
- *
- *
- * Sample JS code:
- * result = dispatch($H({controller:'portal.workbench', action:"getActivePerspective"}).toJSON());
- *
- *
- * @return A JSON map with label, description and id key-value pairs.
- */
- @ControllerAction
- public Object getActivePerspective()
- {
- IPerspectiveDescriptor descriptor = UIUtils.getActivePerspectiveDescriptor();
- Map result = new HashMap();
- if (descriptor == null)
- {
- return JSON.toString(ArrayUtil.NO_STRINGS);
- }
- result.put(LABEL, descriptor.getLabel());
- result.put(DESCRIPTION, descriptor.getDescription());
- result.put(ID, descriptor.getId());
- return JSON.toString(result);
- }
-
- /*
- * (non-Javadoc)
- * @see com.aptana.configurations.processor.IConfigurationProcessorListener#configurationStateChanged(com.aptana.
- * configurations.processor.ConfigurationStatus, java.util.Set)
- */
- public void configurationStateChanged(ConfigurationStatus status, Set attributesChanged)
- {
- // Nothing to do here
- }
-}
diff --git a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/dispatch/browserFunctions/DispatcherBrowserFunction.java b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/dispatch/browserFunctions/DispatcherBrowserFunction.java
index 62afbc0ff8..3dcda2157d 100644
--- a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/dispatch/browserFunctions/DispatcherBrowserFunction.java
+++ b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/dispatch/browserFunctions/DispatcherBrowserFunction.java
@@ -7,7 +7,6 @@
*/
package com.aptana.portal.ui.dispatch.browserFunctions;
-import java.text.MessageFormat;
import java.util.Map;
import com.aptana.core.logging.IdeLog;
@@ -18,9 +17,6 @@
import com.aptana.portal.ui.dispatch.IActionController;
import com.aptana.portal.ui.dispatch.IBrowserNotificationConstants;
import com.aptana.portal.ui.internal.IBrowserFunctionHandler;
-import com.aptana.usage.FeatureEvent;
-import com.aptana.usage.IStudioAnalytics;
-import com.aptana.usage.UsagePlugin;
/**
* This class is the main functions dispatcher for all the registered IActionControllers.
@@ -120,27 +116,10 @@ public Object function(Object[] arguments)
return BrowserNotifier.toJSONErrorNotification(IBrowserNotificationConstants.JSON_ERROR_WRONG_ARGUMENTS,
e.getMessage());
}
- // Send an Analytics ping
- sendEvent(new FeatureEvent(MessageFormat.format("{0}.{1}", controllerID, action), null)); //$NON-NLS-1$
// OK... Done with the checks. Now dispatch.
return dispatch(controller, action, args);
}
- private void sendEvent(FeatureEvent featureEvent)
- {
- UsagePlugin plugin = UsagePlugin.getDefault();
- if (plugin == null)
- {
- return;
- }
- IStudioAnalytics analytics = plugin.getStudioAnalytics();
- if (analytics == null)
- {
- return;
- }
- analytics.sendEvent(featureEvent);
- }
-
/**
* Dispatch the action controller function in a synchronous way.
* The action that is being dispatched can still create a Job that will run asynchronously and report back when
diff --git a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/Portal.java b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/Portal.java
index ad3ae4be51..a95e3cf57e 100644
--- a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/Portal.java
+++ b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/Portal.java
@@ -26,10 +26,8 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -51,10 +49,7 @@
import com.aptana.portal.ui.IPortalPreferences;
import com.aptana.portal.ui.PortalUIPlugin;
import com.aptana.portal.ui.browser.AbstractPortalBrowserEditor;
-import com.aptana.theme.IThemeManager;
-import com.aptana.theme.ThemePlugin;
-import com.aptana.ui.util.UIUtils;
-import com.aptana.usage.UsagePlugin;
+import com.aptana.portal.ui.browser.UIUtils;
/**
* The portal class is a singleton that controls the portal browser and allows interacting with it.
@@ -160,12 +155,12 @@ else if (!isConnected(url))
URL localURL = FileLocator.toFileURL(Portal.class.getResource(BASE_LOCAL_URL));
url = URLUtil.appendParameters(localURL, new String[] { "url", url.toString() }); //$NON-NLS-1$
}
- Map parameters = getURLParametersForProject(PortalUIPlugin.getActiveProject());
- if (additionalParameters != null)
- {
- parameters.putAll(additionalParameters);
- }
- url = URLUtil.appendParameters(url, parameters, false);
+// Map parameters = getURLParametersForProject(PortalUIPlugin.getActiveProject());
+// if (additionalParameters != null)
+// {
+// parameters.putAll(additionalParameters);
+// }
+ url = URLUtil.appendParameters(url, new HashMap(), false);
}
catch (IOException e)
{
@@ -287,6 +282,7 @@ protected URL getDefaultURL() throws IOException
return getDefaultURL(new URL(BASE_REMOTE_URL), Portal.class.getResource(BASE_LOCAL_URL));
}
+
/**
* Returns the default URL for the portal.
* In case we have a live Internet connection, return the remote content. Otherwise, return the local content.
@@ -359,56 +355,56 @@ protected HttpsURLConnection getConnection(URL httpsURL) throws Exception
return con;
}
- /**
- * Build the URL GET parameters that will be appended to the original portal path.
- *
- * @param activeProject
- * @return The GET parameters string
- */
- @SuppressWarnings("nls")
- protected Map getURLParametersForProject(final IProject activeProject)
- {
- final Map builder = new HashMap();
- builder.putAll(URLUtil.getDefaultParameters());
-
- builder.put("bg", toHex(getThemeManager().getCurrentTheme().getBackground()));
- builder.put("fg", toHex(getThemeManager().getCurrentTheme().getForeground()));
-
- // "chrome"
- UIUtils.getDisplay().syncExec(new Runnable()
- {
- public void run()
- {
- Color color = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
- builder.put("ch", toHex(color.getRGB()));// FIXME Grab one of the actual parent widgets and grab it's
- // bg?
- }
- });
-
- // project type
- builder.put("p", String.valueOf(getProjectType(activeProject)));
-
- // version control
- // builder.append("&vc=");
- // builder.append(getVersionControl());
-
- // github
- // builder.append("&gh=");
- // builder.append(hasGithubRemote() ? '1' : '0');
-
- // timestamp to force updates to server (bypass browser cache)
- builder.put("ts", String.valueOf(System.currentTimeMillis()));
-
- // guid that relates to a single install of the IDE
- builder.put("id", getGUID());
-
- // deploy info
- builder.putAll(getDeployParam(activeProject));
-
- // for debugging output
- // builder.append("&debug=1");
- return builder;
- }
+// /**
+// * Build the URL GET parameters that will be appended to the original portal path.
+// *
+// * @param activeProject
+// * @return The GET parameters string
+// */
+// @SuppressWarnings("nls")
+// protected Map getURLParametersForProject(final IProject activeProject)
+// {
+// final Map builder = new HashMap();
+// builder.putAll(URLUtil.getDefaultParameters());
+//
+// builder.put("bg", toHex(getThemeManager().getCurrentTheme().getBackground()));
+// builder.put("fg", toHex(getThemeManager().getCurrentTheme().getForeground()));
+//
+// // "chrome"
+// UIUtils.getDisplay().syncExec(new Runnable()
+// {
+// public void run()
+// {
+// Color color = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+// builder.put("ch", toHex(color.getRGB()));// FIXME Grab one of the actual parent widgets and grab it's
+// // bg?
+// }
+// });
+//
+// // project type
+// builder.put("p", String.valueOf(getProjectType(activeProject)));
+//
+// // version control
+// // builder.append("&vc=");
+// // builder.append(getVersionControl());
+//
+// // github
+// // builder.append("&gh=");
+// // builder.append(hasGithubRemote() ? '1' : '0');
+//
+// // timestamp to force updates to server (bypass browser cache)
+// builder.put("ts", String.valueOf(System.currentTimeMillis()));
+//
+// // guid that relates to a single install of the IDE
+//// builder.put("id", getGUID());
+//
+// // deploy info
+// builder.putAll(getDeployParam(activeProject));
+//
+// // for debugging output
+// // builder.append("&debug=1");
+// return builder;
+// }
@SuppressWarnings("nls")
protected Map getDeployParam(IProject selectedProject)
@@ -440,21 +436,6 @@ protected Map getDeployParam(IProject selectedProject)
return builder;
}
- /**
- * Get the theme manager.
- *
- * @return
- */
- protected IThemeManager getThemeManager()
- {
- return ThemePlugin.getDefault().getThemeManager();
- }
-
- protected String getGUID()
- {
- return UsagePlugin.getApplicationId();
- }
-
protected char getProjectType(IProject selectedProject)
{
if (selectedProject != null && selectedProject.isAccessible())
diff --git a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/command/NewProjectFromTemplateCommandHandler.java b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/command/NewProjectFromTemplateCommandHandler.java
index 6dc1dbea22..2dd9fa4bc9 100644
--- a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/command/NewProjectFromTemplateCommandHandler.java
+++ b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/command/NewProjectFromTemplateCommandHandler.java
@@ -1,98 +1,47 @@
-/**
- * Aptana Studio
- * Copyright (c) 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.internal.command;
-import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.wizards.IWizardDescriptor;
-import org.eclipse.ui.wizards.IWizardRegistry;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.commands.IHandlerListener;
-import com.aptana.projects.wizards.AbstractNewProjectWizard;
-import com.aptana.projects.wizards.ProjectTemplateSelectionPage;
-import com.aptana.ui.util.UIUtils;
-
-/**
- * Command handler for "com.aptana.portal.ui.command.newProjectFromTemplate". Opens an Aptana/Titanium wizard and
- * initializes the project template
- *
- * @author nle
- */
-public class NewProjectFromTemplateCommandHandler extends AbstractHandler
+public class NewProjectFromTemplateCommandHandler implements IHandler
{
- /**
- * Execute the new project command. The command returns the created {@link IProject} name when it's done, in case a
- * project was created.
- *
- * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) throws ExecutionException
+ public void addHandlerListener(IHandlerListener handlerListener)
{
- String wizardId = event.getParameter(ProjectTemplateSelectionPage.COMMAND_PROJECT_FROM_TEMPLATE_NEW_WIZARD_ID);
- String templateName = event
- .getParameter(ProjectTemplateSelectionPage.COMMAND_PROJECT_FROM_TEMPLATE_PROJECT_TEMPLATE_NAME);
+ // TODO Auto-generated method stub
+
+ }
- IWizardRegistry wizardRegistry = PlatformUI.getWorkbench().getNewWizardRegistry();
- IWizardDescriptor wizardDescriptor = wizardRegistry.findWizard(wizardId);
- if (wizardDescriptor == null)
- {
- throw new ExecutionException("unknown wizard: " + wizardId); //$NON-NLS-1$
- }
+ public void dispose()
+ {
+ // TODO Auto-generated method stub
- try
- {
- IWorkbenchWizard wizard = wizardDescriptor.createWizard();
- wizard.init(PlatformUI.getWorkbench(), null);
+ }
- if (wizard instanceof IExecutableExtension)
- {
- ((IExecutableExtension) wizard).setInitializationData(null,
- ProjectTemplateSelectionPage.COMMAND_PROJECT_FROM_TEMPLATE_PROJECT_TEMPLATE_NAME, templateName);
- }
+ public Object execute(ExecutionEvent event) throws ExecutionException
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
- if (wizardDescriptor.canFinishEarly() && !wizardDescriptor.hasPages())
- {
- wizard.performFinish();
- return getProject(wizard);
- }
+ public boolean isEnabled()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
- Shell parent = UIUtils.getActiveShell();
- WizardDialog dialog = new WizardDialog(parent, wizard);
- dialog.create();
- dialog.open();
- return getProject(wizard);
- }
- catch (CoreException ex)
- {
- throw new ExecutionException("error creating wizard", ex); //$NON-NLS-1$
- }
+ public boolean isHandled()
+ {
+ // TODO Auto-generated method stub
+ return false;
}
- /**
- * Returns the created project.
- *
- * @param wizard
- * @return An {@link IProject}, or null.
- */
- private IProject getProject(IWorkbenchWizard wizard)
+ public void removeHandlerListener(IHandlerListener handlerListener)
{
- if (wizard instanceof AbstractNewProjectWizard)
- {
- return ((AbstractNewProjectWizard) wizard).getCreatedProject();
- }
- return null;
+ // TODO Auto-generated method stub
+
}
+
}
diff --git a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/startpage/StartPageBrowserEditor.java b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/startpage/StartPageBrowserEditor.java
index 12079df7d3..364cb12519 100644
--- a/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/startpage/StartPageBrowserEditor.java
+++ b/plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/internal/startpage/StartPageBrowserEditor.java
@@ -24,7 +24,7 @@ public class StartPageBrowserEditor extends AbstractPortalBrowserEditor
{
public static final String WEB_BROWSER_EDITOR_ID = "com.aptana.portal.ui.browser.startPage"; //$NON-NLS-1$
- public static final String STUDIO_START_PAGE_URL = "http://content.aptana.com/aptana/my_aptana/?content=start"; //$NON-NLS-1$
+ public static final String STUDIO_START_PAGE_URL = "https://appc-studio.appcelerator.com/"; //$NON-NLS-1$
private static final String TITLE_IMAGE = "icons/obj16/radrails16.png"; //$NON-NLS-1$
diff --git a/plugins/com.aptana.projects/plugin.xml b/plugins/com.aptana.projects/plugin.xml
index 2dd91dc526..4f69a7b3f0 100644
--- a/plugins/com.aptana.projects/plugin.xml
+++ b/plugins/com.aptana.projects/plugin.xml
@@ -191,14 +191,6 @@