eclipse plugin: move the 'Projects Explorer' view ID to the relevant class

This commit is contained in:
Timotei Dolean 2011-05-27 19:57:55 +00:00
parent 3d1bef90f8
commit c7b04b81ef
4 changed files with 10 additions and 12 deletions

View file

@ -218,13 +218,11 @@
id="org.wesnoth.views">
</category>
<view
allowMultiple="false"
category="org.wesnoth.views"
class="org.wesnoth.navigator.WesnothProjectsExplorer"
icon="icons/wesnoth-icon_16.png"
id="org.wesnoth.views.projects"
name="Wesnoth Projects"
restorable="true">
id="org.wesnoth.navigator.WesnothProjectsExplorer"
name="Wesnoth Projects">
</view>
</extension>
<extension
@ -277,10 +275,10 @@
<extension
point="org.eclipse.ui.navigator.viewer">
<viewer
viewerId="org.wesnoth.views.projects">
viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
</viewer>
<viewerContentBinding
viewerId="org.wesnoth.views.projects">
viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
<includes>
<contentExtension
pattern="org.eclipse.ui.navigator.resourceContent">
@ -294,7 +292,7 @@
</includes>
</viewerContentBinding>
<viewerActionBinding
viewerId="org.wesnoth.views.projects">
viewerId="org.wesnoth.navigator.WesnothProjectsExplorer">
<includes>
<actionExtension
pattern="org.eclipse.ui.navigator.resources.*">

View file

@ -19,6 +19,8 @@ import org.eclipse.ui.navigator.CommonNavigator;
public class WesnothProjectsExplorer extends CommonNavigator implements IAdaptable,
IPersistableElement, IElementFactory
{
public static final String ID_PROJECTS_EXPLORER = "org.wesnoth.navigator.WesnothProjectsExplorer"; //$NON-NLS-1$
public WesnothProjectsExplorer()
{
}

View file

@ -12,11 +12,10 @@ import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;
import org.wesnoth.navigator.WesnothProjectsExplorer;
public class WMLPerspective implements IPerspectiveFactory
{
public static final String WESNOTH_PROJ_EXPLORER_ID = "org.wesnoth.views.projects"; //$NON-NLS-1$
@Override
public void createInitialLayout(IPageLayout layout)
{
@ -35,7 +34,7 @@ public class WMLPerspective implements IPerspectiveFactory
// Place navigator and outline to left of editor area.
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$
left.addView(WESNOTH_PROJ_EXPLORER_ID);
left.addView(WesnothProjectsExplorer.ID_PROJECTS_EXPLORER);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.76f, editorArea); //$NON-NLS-1$
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

View file

@ -50,7 +50,6 @@ import org.wesnoth.Messages;
import org.wesnoth.WesnothPlugin;
import org.wesnoth.navigator.WesnothProjectsExplorer;
import org.wesnoth.preferences.Preferences;
import org.wesnoth.product.WMLPerspective;
public class WorkspaceUtils
@ -260,7 +259,7 @@ public class WorkspaceUtils
*/
public static WesnothProjectsExplorer getProjectsExplorer()
{
return (WesnothProjectsExplorer)getView(WMLPerspective.WESNOTH_PROJ_EXPLORER_ID);
return (WesnothProjectsExplorer)getView(WesnothProjectsExplorer.ID_PROJECTS_EXPLORER);
}
/**