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 232132 Details for
Bug 410260
[Menu] JavaScript error when creating a menu item
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 for Workbench Demo to reproduce the issue
workbench-demo.patch (text/plain), 5.81 KB, created by
Ivan Furnadjiev
on 2013-06-08 14:46:36 EDT
(
hide
)
Description:
Patch for Workbench Demo to reproduce the issue
Filename:
MIME Type:
Creator:
Ivan Furnadjiev
Created:
2013-06-08 14:46:36 EDT
Size:
5.81 KB
patch
obsolete
>diff --git a/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoActionBarAdvisor.java b/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoActionBarAdvisor.java >index 8379c17..f2f9c09 100644 >--- a/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoActionBarAdvisor.java >+++ b/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoActionBarAdvisor.java >@@ -24,15 +24,15 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.*; >-import org.eclipse.ui.actions.ActionFactory; >-import org.eclipse.ui.actions.ContributionItemFactory; >+import org.eclipse.ui.actions.*; > import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; > import org.eclipse.ui.application.ActionBarAdvisor; > import org.eclipse.ui.application.IActionBarConfigurer; > import org.eclipse.ui.browser.IWebBrowser; > import org.eclipse.ui.browser.IWorkbenchBrowserSupport; > import org.eclipse.ui.plugin.AbstractUIPlugin; >-import org.osgi.framework.*; >+import org.osgi.framework.Bundle; >+import org.osgi.framework.Constants; > > public class DemoActionBarAdvisor extends ActionBarAdvisor { > >@@ -55,6 +55,7 @@ > super( configurer ); > } > >+ @Override > protected void makeActions( final IWorkbenchWindow window ) { > ImageDescriptor quitActionImage = AbstractUIPlugin.imageDescriptorFromPlugin( "org.eclipse.rap.demo", > "icons/ttt.gif" ); >@@ -69,24 +70,25 @@ > exitAction = ActionFactory.QUIT.create( window ); > exitAction.setImageDescriptor( quitActionImage ); > register( exitAction ); >- >+ > importAction = ActionFactory.IMPORT.create( window ); > register( importAction ); >- >+ > exportAction = ActionFactory.EXPORT.create( window ); > register( exportAction ); >- >+ > saveAction = ActionFactory.SAVE.create( window ); > register( saveAction ); >- >+ > saveAllAction = ActionFactory.SAVE_ALL.create( window ); > register( saveAllAction ); >- >+ > preferencesAction = ActionFactory.PREFERENCES.create( window ); > register( preferencesAction ); >- >+ > newEditorAction = new Action() { > >+ @Override > public void run() { > try { > window.getActivePage().openEditor( new FooEditorInput(DemoActionBarAdvisor.this), >@@ -103,8 +105,9 @@ > .getSharedImages() > .getImageDescriptor( ISharedImages.IMG_TOOL_NEW_WIZARD ) ); > register( newEditorAction ); >- >+ > aboutAction = new Action() { >+ @Override > public void run() { > Shell shell = window.getShell(); > Bundle bundle = Platform.getBundle( PlatformUI.PLUGIN_ID ); >@@ -120,6 +123,7 @@ > aboutAction.setImageDescriptor( helpActionImage ); > register( aboutAction ); > rapWebSiteAction = new Action() { >+ @Override > public void run() { > IWorkbenchBrowserSupport browserSupport; > browserSupport = PlatformUI.getWorkbench().getBrowserSupport(); >@@ -143,6 +147,7 @@ > IContributionItem showViewMenu = ContributionItemFactory.VIEWS_SHORTLIST.create( window ); > showViewMenuMgr.add( showViewMenu ); > wizardAction = new Action() { >+ @Override > public void run() { > SurveyWizard wizard = new SurveyWizard(); > WizardDialog dlg = new WizardDialog( window.getShell(), wizard ); >@@ -154,6 +159,7 @@ > wizardAction.setImageDescriptor( wizardActionImage ); > register( wizardAction ); > browserAction = new Action() { >+ @Override > public void run() { > browserIndex++; > try { >@@ -172,12 +178,13 @@ > register( browserAction ); > } > >+ @Override > protected void fillMenuBar( final IMenuManager menuBar ) { >- MenuManager fileMenu = new MenuManager( "File", >+ MenuManager fileMenu = new MenuManager( "&File", > IWorkbenchActionConstants.M_FILE ); >- MenuManager windowMenu = new MenuManager( "Window", >+ MenuManager windowMenu = new MenuManager( "&Window", > IWorkbenchActionConstants.M_WINDOW ); >- MenuManager helpMenu = new MenuManager( "Help", >+ MenuManager helpMenu = new MenuManager( "&Help", > IWorkbenchActionConstants.M_HELP ); > menuBar.add( fileMenu ); > fileMenu.add( importAction ); >@@ -192,6 +199,7 @@ > helpMenu.add( aboutAction ); > } > >+ @Override > protected void fillCoolBar( final ICoolBarManager coolBar ) { > createToolBar( coolBar, "main" ); > createToolBar( coolBar, "editor" ); >@@ -213,6 +221,7 @@ > } > } > >+ @Override > protected void fillStatusLine( final IStatusLineManager statusLine ) { > statusLine.add( aboutAction ); > } >diff --git a/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoWorkbenchWindowAdvisor.java b/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoWorkbenchWindowAdvisor.java >index ef53ec2..89cc0da 100644 >--- a/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoWorkbenchWindowAdvisor.java >+++ b/examples/org.eclipse.rap.demo/src/org/eclipse/rap/demo/DemoWorkbenchWindowAdvisor.java >@@ -26,13 +26,15 @@ > { > super( configurer ); > } >- >+ >+ @Override > public ActionBarAdvisor createActionBarAdvisor( > final IActionBarConfigurer configurer ) > { > return new DemoActionBarAdvisor( configurer ); > } >- >+ >+ @Override > public void preWindowOpen() { > IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); > configurer.setInitialSize( new Point( 800, 600 ) ); >@@ -41,8 +43,10 @@ > configurer.setTitle( "RAP Workbench Demo" ); > configurer.setShellStyle( SWT.TITLE | SWT.MAX | SWT.RESIZE ); > configurer.setShowProgressIndicator( true ); >+ configurer.setShowMenuBar( false ); > } >- >+ >+ @Override > public void postWindowOpen() { > IWorkbench workbench = PlatformUI.getWorkbench(); > IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
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 410260
:
232125
| 232132