Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225563 Details for
Bug 398073
[Tools] Remove 'RAP Application with a View' template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch fixing this issue
bug_398073.patch (text/plain), 23.25 KB, created by
Elias Volanakis
on 2013-01-14 08:21:45 EST
(
hide
)
Description:
Patch fixing this issue
Filename:
MIME Type:
Creator:
Elias Volanakis
Created:
2013-01-14 08:21:45 EST
Size:
23.25 KB
patch
obsolete
>From bed6249fb3348bf42ac98f46f3a6c848488b4713 Mon Sep 17 00:00:00 2001 >From: Elias Volanakis <elias@eclipsesource.com> >Date: Mon, 14 Jan 2013 14:16:03 +0100 >Subject: [PATCH] 398073: [Tools] Remove 'RAP Application with a View' > template > https://bugs.eclipse.org/bugs/show_bug.cgi?id=398073 > >--- > .../plugin.properties | 10 -- > bundles/org.eclipse.rap.tools.templates/plugin.xml | 12 -- > .../rap/internal/ui/templates/rap/Messages.java | 10 -- > .../internal/ui/templates/rap/ViewRAPTemplate.java | 138 -------------------- > .../internal/ui/templates/rap/ViewRAPWizard.java | 41 ------ > .../internal/ui/templates/rap/messages.properties | 12 +-- > .../templates/viewRAP/java/$applicationClass$.java | 24 ---- > .../viewRAP/java/ApplicationActionBarAdvisor.java | 41 ------ > .../viewRAP/java/ApplicationWorkbenchAdvisor.java | 22 --- > .../java/ApplicationWorkbenchWindowAdvisor.java | 31 ----- > .../templates/viewRAP/java/Perspective.java | 20 --- > .../templates/viewRAP/java/View.java | 73 ---------- > 12 files changed, 1 insertions(+), 433 deletions(-) > delete mode 100644 bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/$applicationClass$.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationActionBarAdvisor.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchAdvisor.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchWindowAdvisor.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/Perspective.java > delete mode 100644 bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/View.java > >diff --git a/bundles/org.eclipse.rap.tools.templates/plugin.properties b/bundles/org.eclipse.rap.tools.templates/plugin.properties >index 90d20e6..307322f 100644 >--- a/bundles/org.eclipse.rap.tools.templates/plugin.properties >+++ b/bundles/org.eclipse.rap.tools.templates/plugin.properties >@@ -22,16 +22,6 @@ helloRAP.description = \ > <li>org.eclipse.ui.perspectives</li>\ > <p>This code will need the <b>RAP target</b> to compile.</p> > >-viewRAP.name = RAP Application with a view >-viewRAP.description = \ >-<p>This wizard creates a RAP application that consists of an application window with a single view.</p>\ >-<p><b>Extensions Used</b></p>\ >-<li>org.eclipse.core.runtime.applications</li>\ >-<li>org.eclipse.ui.perspectives</li>\ >-<li>org.eclipse.ui.views</li>\ >-<li>org.eclipse.rap.ui.branding</li>\ >-<p>This code will need the <b>RAP target</b> to compile.</p> >- > mailRAP.name = RAP Mail Template > mailRAP.description = \ > <p>This wizard creates a RAP application that shows how to:</p>\ >diff --git a/bundles/org.eclipse.rap.tools.templates/plugin.xml b/bundles/org.eclipse.rap.tools.templates/plugin.xml >index e633ac4..045804a 100644 >--- a/bundles/org.eclipse.rap.tools.templates/plugin.xml >+++ b/bundles/org.eclipse.rap.tools.templates/plugin.xml >@@ -17,18 +17,6 @@ > </description> > </wizard> > <wizard >- class="org.eclipse.rap.internal.ui.templates.rap.ViewRAPWizard" >- icon="$nl$/icons/etool16/newexprj_wiz.gif" >- id="org.eclipse.rap.internal.ui.templates.rap.ViewRAPWizard" >- java="true" >- rcp="false" >- name="%viewRAP.name" >- ui-content="true"> >- <description> >- %viewRAP.description >- </description> >- </wizard> >- <wizard > class="org.eclipse.rap.internal.ui.templates.rap.MailRAPWizard" > icon="$nl$/icons/etool16/newexprj_wiz.gif" > id="org.eclipse.rap.internal.ui.templates.rap.MailRAPWizard" >diff --git a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/Messages.java b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/Messages.java >index 16f6b45..6889443 100644 >--- a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/Messages.java >+++ b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/Messages.java >@@ -43,16 +43,6 @@ public class Messages extends NLS { > public static String mailRAPTemplate_windowTitle; > public static String mailRAPWizard_windowTitle; > >- public static String viewRAPTemplate_appClass; >- public static String viewRAPTemplate_appWindowTitle; >- public static String viewRAPTemplate_packageName; >- public static String viewRAPTemplate_pageDescr; >- public static String viewRAPTemplate_pageTitle; >- public static String viewRAPTemplate_perspectiveName; >- public static String viewRAPTemplate_viewName; >- public static String viewRAPTemplate_windowTitle; >- public static String viewRAPWizard_windowTitle; >- > private static final String BUNDLE_NAME > = "org.eclipse.rap.internal.ui.templates.rap.messages"; //$NON-NLS-1$ > >diff --git a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java >deleted file mode 100644 >index e480c16..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPTemplate.java >+++ /dev/null >@@ -1,138 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2007, 2012 EclipseSource and others >- * All rights reserved. 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 >- * >- * Contributors: >- * Innoopract Informationssysteme GmbH - initial API and implementation >- * EclipseSource - ongoing development >- ******************************************************************************/ >-package org.eclipse.rap.internal.ui.templates.rap; >- >-import org.eclipse.core.runtime.CoreException; >-import org.eclipse.core.runtime.IProgressMonitor; >-import org.eclipse.jface.wizard.Wizard; >-import org.eclipse.jface.wizard.WizardPage; >-import org.eclipse.pde.core.plugin.IPluginElement; >-import org.eclipse.pde.core.plugin.IPluginExtension; >-import org.eclipse.rap.internal.ui.templates.TemplateUtil; >-import org.eclipse.rap.internal.ui.templates.XmlNames; >- >-class ViewRAPTemplate extends AbstractRAPTemplate { >- >- ViewRAPTemplate() { >- setPageCount( 1 ); >- createTemplateOptions(); >- } >- >- public void addPages( Wizard wizard ) { >- WizardPage page = createPage( 0 ); >- page.setTitle( Messages.viewRAPTemplate_pageTitle ); >- page.setDescription( Messages.viewRAPTemplate_pageDescr ); >- wizard.addPage( page ); >- markPagesAdded(); >- } >- >- public String getSectionId() { >- return "viewRAP"; //$NON-NLS-1$ >- } >- >- public String getApplicationId() { >- return "viewapp"; >- } >- >- public String getServletPath() { >- return "/view"; >- } >- >- protected void updateModel( IProgressMonitor monitor ) throws CoreException { >- createEntryPointExtension(); >- createApplicationExtension(); >- createPerspectivesExtension(); >- createViewsExtension(); >- createBrandingExtension(); >- } >- >- ////////////////// >- // helping methods >- >- private void createEntryPointExtension() throws CoreException { >- IPluginExtension extension = createExtension( XmlNames.XID_ENTRYPOINT, true ); >- extension.setId( getApplicationId() + ".entrypoints" ); >- IPluginElement entryPointElement = createElement( extension ); >- entryPointElement.setName( XmlNames.ELEM_ENTRYPOINT ); >- entryPointElement.setAttribute( XmlNames.ATT_ID, getApplicationId() + ".entrypoint" ); >- entryPointElement.setAttribute( XmlNames.ATT_SERVLET_PATH, getServletPath() ); >- entryPointElement.setAttribute( XmlNames.ATT_APPLICATION_ID, getFullApplicationId() ); >- entryPointElement.setAttribute( XmlNames.ATT_BRANDING_ID, getPackageName() + ".branding" ); >- extension.add( entryPointElement ); >- addExtensionToPlugin( extension ); >- } >- >- private void createApplicationExtension() throws CoreException { >- IPluginExtension extension = createExtension( XmlNames.XID_APPLICATION, true ); >- extension.setId( getFullApplicationId() ); >- IPluginElement applicationElement = createElement( extension ); >- applicationElement.setName( XmlNames.ELEM_APPLICATION ); >- applicationElement.setAttribute( XmlNames.ATT_VISIBLE, "true" ); //$NON-NLS-1$ >- applicationElement.setAttribute( XmlNames.ATT_CARDINALITY, "singleton-global" ); //$NON-NLS-1$ >- applicationElement.setAttribute( XmlNames.ATT_THREAD, "main" ); //$NON-NLS-1$ >- extension.add( applicationElement ); >- IPluginElement runElement = createElement( extension ); >- runElement.setName( XmlNames.ELEM_RUN ); >- runElement.setAttribute( XmlNames.ATT_CLASS, getApplicationClass() ); >- applicationElement.add( runElement ); >- addExtensionToPlugin( extension ); >- } >- >- private void createPerspectivesExtension() throws CoreException { >- IPluginExtension extension = createExtension( XmlNames.XID_PERSPECTIVES, true ); >- IPluginElement element = createElement( extension ); >- element.setName( XmlNames.ELEM_PERSPECTIVE ); >- element.setAttribute( XmlNames.ATT_CLASS, getPackageName() + ".Perspective" ); //$NON-NLS-1$ >- element.setAttribute( XmlNames.ATT_NAME, Messages.viewRAPTemplate_perspectiveName ); >- element.setAttribute( XmlNames.ATT_ID, getPluginId() + ".perspective" ); //$NON-NLS-1$ >- extension.add( element ); >- addExtensionToPlugin( extension ); >- } >- >- private void createViewsExtension() throws CoreException { >- IPluginExtension extension = createExtension( XmlNames.XID_VIEWS, true ); >- IPluginElement element = createElement( extension ); >- element.setName( XmlNames.ELEM_VIEW ); >- element.setAttribute( XmlNames.ATT_CLASS, getPackageName() + ".View" ); //$NON-NLS-1$ >- element.setAttribute( XmlNames.ATT_NAME, Messages.viewRAPTemplate_viewName ); >- element.setAttribute( XmlNames.ATT_ID, getPluginId() + ".view" ); //$NON-NLS-1$ >- extension.add( element ); >- addExtensionToPlugin( extension ); >- } >- >- private void createBrandingExtension() throws CoreException { >- IPluginExtension extension = createExtension( XmlNames.XID_BRANDING, true ); >- IPluginElement brandingElement = createElement( extension ); >- // create branding >- brandingElement.setName( XmlNames.ELEM_BRANDING ); >- String brandingId = getPackageName() + ".branding"; //$NON-NLS-1$ >- brandingElement.setAttribute( XmlNames.ATT_ID, brandingId ); >- brandingElement.setAttribute( XmlNames.ATT_THEME_ID, TemplateUtil.FANCY_THEME_ID ); >- brandingElement.setAttribute( XmlNames.ATT_TITLE, "RAP Single View" ); >- // write extension >- extension.add( brandingElement ); >- addExtensionToPlugin( extension ); >- } >- >- private void createTemplateOptions() { >- addOption( KEY_WINDOW_TITLE, >- Messages.viewRAPTemplate_windowTitle, >- Messages.viewRAPTemplate_appWindowTitle, >- 0 ); >- addOption( KEY_PACKAGE_NAME, Messages.viewRAPTemplate_packageName, null, 0 ); >- addOption( KEY_APPLICATION_CLASS, >- Messages.viewRAPTemplate_appClass, >- "Application", //$NON-NLS-1$ >- 0 ); >- } >- >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java >deleted file mode 100644 >index 9f0f27b..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/ViewRAPWizard.java >+++ /dev/null >@@ -1,41 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2007, 2011 EclipseSource >- * All rights reserved. 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 >- * >- * Contributors: >- * Innoopract Informationssysteme GmbH - initial API and implementation >- * EclipseSource - ongoing development >- ******************************************************************************/ >-package org.eclipse.rap.internal.ui.templates.rap; >- >-import org.eclipse.pde.ui.IFieldData; >-import org.eclipse.pde.ui.templates.ITemplateSection; >- >-public class ViewRAPWizard extends AbstractRAPWizard { >- >- private AbstractRAPTemplate template; >- >- public void init( final IFieldData data ) { >- super.init( data ); >- setWindowTitle( Messages.viewRAPWizard_windowTitle ); >- } >- >- public ITemplateSection[] createTemplateSections() { >- template = new ViewRAPTemplate(); >- return new ITemplateSection[] { >- template >- }; >- } >- >- protected String getEntryPointName() { >- return template.getFullApplicationId(); >- } >- >- protected String getServletPath() { >- return template.getServletPath(); >- } >- >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/messages.properties b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/messages.properties >index 0142d2f..114da12 100644 >--- a/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/messages.properties >+++ b/bundles/org.eclipse.rap.tools.templates/src/org/eclipse/rap/internal/ui/templates/rap/messages.properties >@@ -11,17 +11,7 @@ > > AbstractRAPWizard_targetQuestionDialogTitle=Install RAP Target Platform > AbstractRAPWizard_targetQuestionDialogMessage=RAP projects need to be compiled against a RAP target platform. Do you want to install a RAP target platform now? >-AbstractRAPWizard_Modifying=Modifing {0} >- >-viewRAPTemplate_pageTitle=Single View RAP Application >-viewRAPTemplate_pageDescr=This wizard creates a RAP application that consists of an application window with a single view. >-viewRAPWizard_windowTitle=New RAP Project with a view >-viewRAPTemplate_perspectiveName=RAP Perspective >-viewRAPTemplate_viewName=View >-viewRAPTemplate_windowTitle=Application window &title\: >-viewRAPTemplate_appWindowTitle=RAP with a View >-viewRAPTemplate_packageName=Pa&ckage name\: >-viewRAPTemplate_appClass=App&lication class\: >+AbstractRAPWizard_Modifying=Modifying {0} > > mailRAPWizard_windowTitle=New Project with a RAP Mail Template > >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/$applicationClass$.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/$applicationClass$.java >deleted file mode 100644 >index 1974a68..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/$applicationClass$.java >+++ /dev/null >@@ -1,24 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.equinox.app.IApplication; >-import org.eclipse.equinox.app.IApplicationContext; >-import org.eclipse.swt.widgets.Display; >-import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.application.WorkbenchAdvisor; >- >-/** >- * This class controls all aspects of the application's execution >- * and is contributed through the plugin.xml. >- */ >-public class $applicationClass$ implements IApplication { >- >- public Object start(IApplicationContext context) throws Exception { >- Display display = PlatformUI.createDisplay(); >- WorkbenchAdvisor advisor = new ApplicationWorkbenchAdvisor(); >- return PlatformUI.createAndRunWorkbench(display, advisor); >- } >- >- public void stop() { >- // Do nothing >- } >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationActionBarAdvisor.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationActionBarAdvisor.java >deleted file mode 100644 >index fd3e0fb..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationActionBarAdvisor.java >+++ /dev/null >@@ -1,41 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.jface.action.IMenuManager; >-import org.eclipse.jface.action.MenuManager; >-import org.eclipse.ui.IWorkbenchActionConstants; >-import org.eclipse.ui.IWorkbenchWindow; >-import org.eclipse.ui.actions.ActionFactory; >-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; >-import org.eclipse.ui.application.ActionBarAdvisor; >-import org.eclipse.ui.application.IActionBarConfigurer; >- >-/** >- * Creates, adds and disposes actions for the menus and action bars of >- * each workbench window. >- */ >-public class ApplicationActionBarAdvisor extends ActionBarAdvisor { >- >- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { >- super(configurer); >- } >- >- // Actions - important to allocate these only in makeActions, and then use >- // them in the fill methods. This ensures that the actions aren't recreated >- // in the fill methods. >- private IWorkbenchAction exitAction; >- >- protected void makeActions(IWorkbenchWindow window) { >- // Creates the actions and registers them. Registering also >- // provides automatic disposal of the actions when the window is closed. >- exitAction = ActionFactory.QUIT.create(window); >- register(exitAction); >- } >- >- protected void fillMenuBar(IMenuManager menuBar) { >- MenuManager fileMenu >- = new MenuManager("&File",IWorkbenchActionConstants.M_FILE); >- menuBar.add(fileMenu); >- fileMenu.add(exitAction); >- } >- >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchAdvisor.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchAdvisor.java >deleted file mode 100644 >index 2515319..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchAdvisor.java >+++ /dev/null >@@ -1,22 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.ui.application.IWorkbenchWindowConfigurer; >-import org.eclipse.ui.application.WorkbenchAdvisor; >-import org.eclipse.ui.application.WorkbenchWindowAdvisor; >- >-/** >- * This workbench advisor creates the window advisor, and specifies >- * the perspective id for the initial window. >- */ >-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { >- >- private static final String PERSPECTIVE_ID = "$pluginId$.perspective"; >- >- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { >- return new ApplicationWorkbenchWindowAdvisor(configurer); >- } >- >- public String getInitialWindowPerspectiveId() { >- return PERSPECTIVE_ID; >- } >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchWindowAdvisor.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchWindowAdvisor.java >deleted file mode 100644 >index 6648cf5..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/ApplicationWorkbenchWindowAdvisor.java >+++ /dev/null >@@ -1,31 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.graphics.Point; >-import org.eclipse.ui.application.ActionBarAdvisor; >-import org.eclipse.ui.application.IActionBarConfigurer; >-import org.eclipse.ui.application.IWorkbenchWindowConfigurer; >-import org.eclipse.ui.application.WorkbenchWindowAdvisor; >- >-/** >- * Configures the initial size and appearance of a workbench window. >- */ >-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { >- >- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) { >- super(configurer); >- } >- >- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { >- return new ApplicationActionBarAdvisor(configurer); >- } >- >- public void preWindowOpen() { >- IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); >- configurer.setInitialSize(new Point(400, 300)); >- configurer.setShowCoolBar(false); >- configurer.setShowStatusLine(false); >- configurer.setTitle("$windowTitle$"); >- configurer.setShellStyle(SWT.TITLE | SWT.RESIZE); >- } >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/Perspective.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/Perspective.java >deleted file mode 100644 >index 3d0d73f..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/Perspective.java >+++ /dev/null >@@ -1,20 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.ui.IPageLayout; >-import org.eclipse.ui.IPerspectiveFactory; >- >-/** >- * Configures the perspective layout. This class is contributed through the >- * plugin.xml. >- */ >-public class Perspective implements IPerspectiveFactory { >- >- public void createInitialLayout(IPageLayout layout) { >- String editorArea = layout.getEditorArea(); >- layout.setEditorAreaVisible(false); >- layout.setFixed(true); >- >- layout.addStandaloneView(View.ID, false, IPageLayout.LEFT, 1.0f, >- editorArea); >- } >-} >diff --git a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/View.java b/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/View.java >deleted file mode 100644 >index 0e14247..0000000 >--- a/bundles/org.eclipse.rap.tools.templates/templates/viewRAP/java/View.java >+++ /dev/null >@@ -1,73 +0,0 @@ >-package $packageName$; >- >-import org.eclipse.jface.viewers.IStructuredContentProvider; >-import org.eclipse.jface.viewers.ITableLabelProvider; >-import org.eclipse.jface.viewers.LabelProvider; >-import org.eclipse.jface.viewers.TableViewer; >-import org.eclipse.jface.viewers.Viewer; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.graphics.Image; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.ui.ISharedImages; >-import org.eclipse.ui.PlatformUI; >-import org.eclipse.ui.part.ViewPart; >- >-public class View extends ViewPart { >- public static final String ID = "$pluginId$.view"; >- >- private TableViewer viewer; >- >- /** >- * The content provider class is responsible for providing objects to the >- * view. It can wrap existing objects in adapters or simply return objects >- * as-is. These objects may be sensitive to the current input of the view, >- * or ignore it and always show the same content (like Task List, for >- * example). >- */ >- class ViewContentProvider implements IStructuredContentProvider { >- public void inputChanged(Viewer v, Object oldInput, Object newInput) { >- } >- >- public void dispose() { >- } >- >- public Object[] getElements(Object parent) { >- return new String[] { "One", "Two", "Three" }; >- } >- } >- >- class ViewLabelProvider extends LabelProvider implements >- ITableLabelProvider { >- public String getColumnText(Object obj, int index) { >- return getText(obj); >- } >- >- public Image getColumnImage(Object obj, int index) { >- return getImage(obj); >- } >- >- public Image getImage(Object obj) { >- return PlatformUI.getWorkbench().getSharedImages().getImage( >- ISharedImages.IMG_OBJ_ELEMENT); >- } >- } >- >- /** >- * This is a callback that will allow us to create the viewer and initialize >- * it. >- */ >- public void createPartControl(Composite parent) { >- int style = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL; >- viewer = new TableViewer(parent, style); >- viewer.setContentProvider(new ViewContentProvider()); >- viewer.setLabelProvider(new ViewLabelProvider()); >- viewer.setInput(getViewSite()); >- } >- >- /** >- * Passing the focus request to the viewer's control. >- */ >- public void setFocus() { >- viewer.getControl().setFocus(); >- } >-} >\ No newline at end of file >-- >1.7.5.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 398073
: 225563