Author: timotei
Date: Sat Jul 30 10:02:28 2011
New Revision: 50491

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50491&view=rev
Log:
eclipse plugin: Move the project explorer to a better place

Added:
    
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/WesnothProjectsExplorer.java
      - copied, changed from r50490, 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
Removed:
    
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
Modified:
    trunk/utils/umc_dev/org.wesnoth/META-INF/MANIFEST.MF
    trunk/utils/umc_dev/org.wesnoth/plugin.xml
    trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java
    
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
    trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WorkspaceUtils.java

Modified: trunk/utils/umc_dev/org.wesnoth/META-INF/MANIFEST.MF
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/META-INF/MANIFEST.MF?rev=50491&r1=50490&r2=50491&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/META-INF/MANIFEST.MF (original)
+++ trunk/utils/umc_dev/org.wesnoth/META-INF/MANIFEST.MF Sat Jul 30 10:02:28 
2011
@@ -53,7 +53,6 @@
  org.wesnoth.handlers,
  org.wesnoth.installs,
  org.wesnoth.jface,
- org.wesnoth.navigator,
  org.wesnoth.parseTreeConstruction,
  org.wesnoth.parser.antlr,
  org.wesnoth.parser.antlr.internal,

Modified: trunk/utils/umc_dev/org.wesnoth/plugin.xml
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/plugin.xml?rev=50491&r1=50490&r2=50491&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/plugin.xml (original)
+++ trunk/utils/umc_dev/org.wesnoth/plugin.xml Sat Jul 30 10:02:28 2011
@@ -218,9 +218,9 @@
       </category>
       <view
             category="org.wesnoth.views"
-            class="org.wesnoth.navigator.WesnothProjectsExplorer"
-            icon="icons/wesnoth-icon_16.png"
-            id="org.wesnoth.navigator.WesnothProjectsExplorer"
+            class="org.wesnoth.views.WesnothProjectsExplorer"
+            icon="icons/wesnoth-icon_16.png"
+            id="org.wesnoth.views.WesnothProjectsExplorer"
             name="Wesnoth Projects">
       </view>
       <view
@@ -270,10 +270,10 @@
    <extension
          point="org.eclipse.ui.navigator.viewer">
       <viewer
-            viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
+            viewerId="org.wesnoth.views.WesnothProjectsExplorer">
       </viewer>
       <viewerContentBinding
-            viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
+            viewerId="org.wesnoth.views.WesnothProjectsExplorer">
          <includes>
             <contentExtension
                   pattern="org.eclipse.ui.navigator.resourceContent">
@@ -287,7 +287,7 @@
          </includes>
       </viewerContentBinding>
       <viewerActionBinding
-            viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
+            viewerId="org.wesnoth.views.WesnothProjectsExplorer">
          <includes>
             <actionExtension
                   pattern="org.eclipse.ui.navigator.resources.*">
@@ -680,8 +680,8 @@
    <extension
          point="org.eclipse.ui.elementFactories">
       <factory
-            class="org.wesnoth.navigator.WesnothProjectsExplorer"
-            id="org.wesnoth.navigator.WesnothProjectsExplorer">
+            class="org.wesnoth.views.WesnothProjectsExplorer"
+            id="org.wesnoth.views.WesnothProjectsExplorer">
       </factory>
    </extension>
    <extension

Removed: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java?rev=50490&view=auto
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
 (removed)
@@ -1,61 +1,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 - 2011 by Timotei Dolean <[email protected]>
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- 
*******************************************************************************/
-package org.wesnoth.navigator;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.ui.IElementFactory;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.navigator.CommonNavigator;
-
-public class WesnothProjectsExplorer extends CommonNavigator implements
-        IPersistableElement, IElementFactory
-{
-    public static final String ID_PROJECTS_EXPLORER = 
"org.wesnoth.navigator.WesnothProjectsExplorer"; //$NON-NLS-1$
-
-       public WesnothProjectsExplorer()
-       {
-       }
-
-       @Override
-       @SuppressWarnings("rawtypes")
-       public Object getAdapter(Class adapter)
-       {
-               if ( adapter.equals( IPersistableElement.class ) ) return this;
-               if ( adapter.equals( IWorkbenchAdapter.class ) )
-                       return 
ResourcesPlugin.getWorkspace().getRoot().getAdapter( adapter );
-               return null;
-       }
-
-       public String getFactoryId()
-       {
-               return this.getClass().getCanonicalName();
-       }
-
-       @Override
-       protected Object getInitialInput()
-       {
-           return ResourcesPlugin.getWorkspace().getRoot();
-       }
-
-       @Override
-       public void saveState(IMemento aMemento)
-       {
-           if (getCommonViewer() != null)
-               super.saveState(aMemento);
-       }
-
-       public IAdaptable createElement(IMemento memento)
-       {
-               return ResourcesPlugin.getWorkspace().getRoot();
-       }
-
-}

Modified: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java?rev=50491&r1=50490&r2=50491&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WMLPerspective.java 
Sat Jul 30 10:02:28 2011
@@ -12,8 +12,8 @@
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
 import org.eclipse.ui.console.IConsoleConstants;
-import org.wesnoth.navigator.WesnothProjectsExplorer;
 import org.wesnoth.views.AddonsView;
+import org.wesnoth.views.WesnothProjectsExplorer;
 
 public class WMLPerspective implements IPerspectiveFactory
 {

Modified: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java?rev=50491&r1=50490&r2=50491&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/product/WesnothWorkbenchAdvisor.java
 Sat Jul 30 10:02:28 2011
@@ -12,8 +12,8 @@
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 import org.eclipse.ui.ide.IDE;
-import org.wesnoth.navigator.WesnothProjectsExplorer;
 import org.wesnoth.utils.WorkspaceUtils;
+import org.wesnoth.views.WesnothProjectsExplorer;
 
 public class WesnothWorkbenchAdvisor extends WorkbenchAdvisorHack {
 

Modified: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WorkspaceUtils.java
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WorkspaceUtils.java?rev=50491&r1=50490&r2=50491&view=diff
==============================================================================
--- trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WorkspaceUtils.java 
(original)
+++ trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WorkspaceUtils.java 
Sat Jul 30 10:02:28 2011
@@ -39,10 +39,10 @@
 import org.wesnoth.Messages;
 import org.wesnoth.WesnothPlugin;
 import org.wesnoth.installs.WesnothInstallsUtils;
-import org.wesnoth.navigator.WesnothProjectsExplorer;
 import org.wesnoth.preferences.Preferences;
 import org.wesnoth.preferences.Preferences.Paths;
 import org.wesnoth.projects.ProjectUtils;
+import org.wesnoth.views.WesnothProjectsExplorer;
 
 public class WorkspaceUtils
 {

Copied: 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/WesnothProjectsExplorer.java
 (from r50490, 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java)
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/WesnothProjectsExplorer.java?p2=trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/WesnothProjectsExplorer.java&p1=trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java&r1=50490&r2=50491&rev=50491&view=diff
==============================================================================
--- 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/navigator/WesnothProjectsExplorer.java
 (original)
+++ 
trunk/utils/umc_dev/org.wesnoth/src/org/wesnoth/views/WesnothProjectsExplorer.java
 Sat Jul 30 10:02:28 2011
@@ -6,7 +6,7 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  
*******************************************************************************/
-package org.wesnoth.navigator;
+package org.wesnoth.views;
 
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IAdaptable;
@@ -19,7 +19,7 @@
 public class WesnothProjectsExplorer extends CommonNavigator implements
         IPersistableElement, IElementFactory
 {
-    public static final String ID_PROJECTS_EXPLORER = 
"org.wesnoth.navigator.WesnothProjectsExplorer"; //$NON-NLS-1$
+    public static final String ID_PROJECTS_EXPLORER = 
"org.wesnoth.views.WesnothProjectsExplorer"; //$NON-NLS-1$
 
        public WesnothProjectsExplorer()
        {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to