|
From: <caw...@us...> - 2007-07-25 17:35:49
|
Revision: 2849
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2849&view=rev
Author: cawilliams
Date: 2007-07-25 10:35:46 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
break out UI related items into new com.aptana.rdt.ui plugin
Removed Paths:
-------------
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/InstallGemActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RefreshGemsActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateAllActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateGemActionDelegate.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/BrowserView.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RailsAPIView.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyCoreAPIView.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyStdLibAPIView.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.java
trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.properties
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/InstallGemActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/InstallGemActionDelegate.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/InstallGemActionDelegate.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 RadRails.org and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package com.aptana.rdt.internal.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.aptana.rdt.AptanaRDTPlugin;
-import com.aptana.rdt.core.gems.Gem;
-import com.aptana.rdt.internal.core.gems.GemManager;
-import com.aptana.rdt.ui.gems.InstallGemDialog;
-
-/**
- * Install a gem
- *
- * @author cwilliams
- */
-public class InstallGemActionDelegate implements IObjectActionDelegate, IViewActionDelegate {
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- InstallGemDialog dialog = new InstallGemDialog(Display.getCurrent().getActiveShell());
- if (dialog.open() == Dialog.OK) {
- final Gem gem = dialog.getGem();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- AptanaRDTPlugin.getDefault().getGemManager().installGem(gem);
- }
- });
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- action.setEnabled(!AptanaRDTPlugin.getDefault().getGemManager().getRemoteGems().isEmpty());
- }
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- }
-
-
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RefreshGemsActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RefreshGemsActionDelegate.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RefreshGemsActionDelegate.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 RadRails.org and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package com.aptana.rdt.internal.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.aptana.rdt.AptanaRDTPlugin;
-import com.aptana.rdt.internal.core.gems.GemManager;
-
-/**
- * Install a gem
- *
- * @author cwilliams
- */
-public class RefreshGemsActionDelegate implements IObjectActionDelegate,
- IViewActionDelegate {
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- if (!AptanaRDTPlugin.getDefault().getGemManager().refresh()) {
- MessageDialog.openError(Display.getCurrent().getActiveShell(), "Unable to refresh local gems", "Sorry we were unable to refresh the list of local gems.");
- }
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
-
- }
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
-
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/RemoveGemActionDelegate.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 RadRails.org and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package com.aptana.rdt.internal.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.aptana.rdt.AptanaRDTPlugin;
-import com.aptana.rdt.core.gems.Gem;
-import com.aptana.rdt.internal.core.gems.GemManager;
-import com.aptana.rdt.ui.gems.GemsMessages;
-import com.aptana.rdt.ui.gems.GemsView;
-
-/**
- * Install a gem
- *
- * @author cwilliams
- */
-public class RemoveGemActionDelegate implements IObjectActionDelegate, IViewActionDelegate {
-
- private IViewPart view;
- private Gem selectedGem;
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- boolean okay = MessageDialog.openConfirm(view.getViewSite()
- .getShell(), null, GemsMessages.bind(GemsMessages.RemoveGemDialog_msg, selectedGem.getName()));
- if (!okay) return;
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- AptanaRDTPlugin.getDefault().getGemManager().removeGem(selectedGem);
- }
-
- });
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (view instanceof GemsView) {
- if (selection != null && !selection.isEmpty()) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection) selection;
- Object element = sel.getFirstElement();
- if (element instanceof Gem) {
- this.selectedGem = (Gem) element;
- }
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- this.view = view;
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateAllActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateAllActionDelegate.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateAllActionDelegate.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 RadRails.org and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package com.aptana.rdt.internal.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.aptana.rdt.AptanaRDTPlugin;
-import com.aptana.rdt.internal.core.gems.GemManager;
-
-/**
- * Install a gem
- *
- * @author cwilliams
- */
-public class UpdateAllActionDelegate implements IObjectActionDelegate, IViewActionDelegate {
-
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- AptanaRDTPlugin.getDefault().getGemManager().updateAll();
- }
-
- });
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
-
- }
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateGemActionDelegate.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateGemActionDelegate.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/actions/UpdateGemActionDelegate.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 RadRails.org and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *******************************************************************************/
-
-package com.aptana.rdt.internal.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.aptana.rdt.AptanaRDTPlugin;
-import com.aptana.rdt.core.gems.Gem;
-import com.aptana.rdt.internal.core.gems.GemManager;
-import com.aptana.rdt.ui.gems.GemsView;
-
-/**
- * Install a gem
- *
- * @author cwilliams
- */
-public class UpdateGemActionDelegate implements IObjectActionDelegate, IViewActionDelegate {
-
- private IViewPart view;
- private Gem selectedGem;
-
- /**
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
- * org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- Display.getDefault().asyncExec(new Runnable() {
-
- public void run() {
- AptanaRDTPlugin.getDefault().getGemManager().update(selectedGem);
- }
-
- });
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (view instanceof GemsView) {
- if (selection != null && !selection.isEmpty()) {
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection sel = (IStructuredSelection) selection;
- Object element = sel.getFirstElement();
- if (element instanceof Gem) {
- this.selectedGem = (Gem) element;
- }
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- this.view = view;
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/BrowserView.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/BrowserView.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/BrowserView.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,38 +0,0 @@
-package com.aptana.rdt.internal.ui.infoviews;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.part.ViewPart;
-
-public class BrowserView extends ViewPart {
-
- private Browser fBrowser;
- private String fUrl;
-
- public BrowserView(String url) {
- this.fUrl = url;
- }
-
- @Override
- public void createPartControl(Composite parent) {
- try {
- fBrowser = new Browser(parent, SWT.BORDER);
- fBrowser.setUrl(fUrl);
- } catch (Exception e) {
- MessageDialog
- .openError(
- Display.getDefault().getActiveShell(),
- "Unable to create embedded browser",
- "It appears that you do not have an embeddable browser. Please see http://www.eclipse.org/swt/faq.php#browserlinux for more information if you are on Linux.");
- }
- }
-
- @Override
- public void setFocus() {
- fBrowser.setFocus();
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RailsAPIView.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RailsAPIView.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RailsAPIView.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,11 +0,0 @@
-package com.aptana.rdt.internal.ui.infoviews;
-
-public class RailsAPIView extends BrowserView {
-
- private static final String URL = "http://api.rubyonrails.org/";
-
- public RailsAPIView() {
- super(URL);
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyCoreAPIView.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyCoreAPIView.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyCoreAPIView.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,11 +0,0 @@
-package com.aptana.rdt.internal.ui.infoviews;
-
-public class RubyCoreAPIView extends BrowserView {
-
- private static final String URL = "http://www.ruby-doc.org/core/";
-
- public RubyCoreAPIView() {
- super(URL);
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyStdLibAPIView.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyStdLibAPIView.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/infoviews/RubyStdLibAPIView.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,11 +0,0 @@
-package com.aptana.rdt.internal.ui.infoviews;
-
-public class RubyStdLibAPIView extends BrowserView {
-
- private static final String URL = "http://www.ruby-doc.org/stdlib/";
-
- public RubyStdLibAPIView() {
- super(URL);
- }
-
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.java
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.java 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.java 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,19 +0,0 @@
-package com.aptana.rdt.internal.ui.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class PreferencesMessages extends NLS {
-
- private static final String BUNDLE_NAME = PreferencesMessages.class.getName();
-
- public static String LicenseConfigurationBlock_company_name_label;
- public static String LicenseConfigurationBlock_email_label;
- public static String LicenseConfigurationBlock_description;
- public static String LicenseConfigurationBlock_license_key_label;
- public static String LicenseConfigurationBlock_valid_license_label;
- public static String LicenseConfigurationBlock_invalid_license_label;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, PreferencesMessages.class);
- }
-}
Deleted: trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.properties
===================================================================
--- trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.properties 2007-07-25 17:35:18 UTC (rev 2848)
+++ trunk/com.aptana.rdt/src/com/aptana/rdt/internal/ui/preferences/PreferencesMessages.properties 2007-07-25 17:35:46 UTC (rev 2849)
@@ -1,6 +0,0 @@
-LicenseConfigurationBlock_description=Please enter the company name and email address exactly as you entered them when ordering. You should have received an email containing this information in case you've forgotten.
-LicenseConfigurationBlock_company_name_label=Company name:
-LicenseConfigurationBlock_email_label=Email Address:
-LicenseConfigurationBlock_license_key_label=License key:
-LicenseConfigurationBlock_invalid_license_label=You have an invalid or incomplete license key. Please be sure you have entered all of the fields above correctly.
-LicenseConfigurationBlock_valid_license_label=You have a valid license key. It expires on {0}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|