summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2011-04-21 08:53:56 (EDT)
committerSteffen Kriese2011-04-21 08:53:56 (EDT)
commitf3f38e1fd0559bc9aad5ada2e393f594fb0a56be (patch)
treed8e2682a7f07824d3f2d25567e9c33873c933fc2
parent7011e2e34425ac94df487cc3cb066b3965938853 (diff)
downloadorg.eclipse.riena.toolbox-f3f38e1fd0559bc9aad5ada2e393f594fb0a56be.zip
org.eclipse.riena.toolbox-f3f38e1fd0559bc9aad5ada2e393f594fb0a56be.tar.gz
org.eclipse.riena.toolbox-f3f38e1fd0559bc9aad5ada2e393f594fb0a56be.tar.bz2
Toolbox: added shortcut for "generate configureRidgets" and menu entries for "link with editor"
-rw-r--r--org.eclipse.riena.toolbox/AssemblyEditor.launch4
-rw-r--r--org.eclipse.riena.toolbox/META-INF/MANIFEST.MF3
-rw-r--r--org.eclipse.riena.toolbox/plugin.xml34
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ApplicationPreviewer.java96
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/StartupEditorListener.java11
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/WorkbenchService.java45
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/api/IWorkbenchService.java20
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/AssemblyTreeViewer.java24
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/handler/GenerateConfigureRidgetsHandler.java85
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceConstants.java4
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceInitializer.java4
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/ToolboxConfigurationPreferencePage.java3
-rw-r--r--org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/views/AssemblyView.java105
13 files changed, 377 insertions, 61 deletions
diff --git a/org.eclipse.riena.toolbox/AssemblyEditor.launch b/org.eclipse.riena.toolbox/AssemblyEditor.launch
index fe22c02..0079249 100644
--- a/org.eclipse.riena.toolbox/AssemblyEditor.launch
+++ b/org.eclipse.riena.toolbox/AssemblyEditor.launch
@@ -19,8 +19,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="restart" value="false"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.ui.views@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ui.browser@default:default,org.eclipse.core.runtime@default:true,org.eclipse.help.base@default:default,org.eclipse.jdt@default:default,org.eclipse.ui.intro@default:default,org.eclipse.core.commands@default:default,org.eclipse.ui@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.pde.ui@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.help@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.debug.ui@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.swt@default:default,org.eclipse.core.databinding@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.pde.doc.user@default:default,org.eclipse.equinox.ds@default:true,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.eclipse.ui.navigator@default:default,org.apache.lucene.core@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.hamcrest.core@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.ui.ide@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf@default:default,org.sat4j.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.pde@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.variables@default:default,javax.servlet.jsp@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,com.jcraft.jsch@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.jdt.compiler.apt@default:false,org.apache.commons.codec@default:default,org.eclipse.compare.core@default:default,org.eclipse.help.webapp@default:default,org.eclipse.pde.launching@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.contenttype@default:default,org.apache.commons.el@default:default,org.eclipse.osgi.services@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.jdt.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.filebuffers@default:default,org.eclipse.help.appserver@default:default,org.eclipse.osgi@-1:true,org.apache.commons.logging@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.common@2:true,org.eclipse.update.core@default:default,org.eclipse.core.net@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.update.configurator@3:true,org.eclipse.search@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.jobs@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.ant.ui@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.apache.lucene@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.text@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.win32@default:false,org.eclipse.ant.core@default:default,org.eclipse.equinox.http.registry@default:default,com.ibm.icu@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.rcp@default:default,org.eclipse.equinox.security.ui@default:default,org.apache.commons.httpclient@default:default,org.eclipse.team.core@default:default,org.eclipse.osgi.util@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.cvs@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.help.ui@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.jsch.core@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.compare@default:default,org.eclipse.ui.net@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.compare.win32@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.junit.runtime@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.concurrent@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.core.resources@default:default,org.apache.lucene.analysis@default:default,org.eclipse.update.ui@default:default,org.objectweb.asm@default:default,org.eclipse.pde.ui.templates@default:default,javax.servlet@default:default,org.apache.ant@default:default,org.apache.jasper@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.platform@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.boot@default:default,org.eclipse.pde.core@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.pde.build@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.jface@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.ant.launching@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.registry@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.log@default:default,org.pushingpixels.trident@default:default,org.eclipse.riena.toolbox.previewer.customizer@default:default,org.eclipse.riena.toolbox.previewer@default:default,org.apache.oro@default:default,org.apache.commons.collections@default:default,org.eclipse.riena.beans.common@default:default,org.apache.commons.lang@default:default,org.apache.velocity@default:default,org.eclipse.riena.ui.common@default:default,org.eclipse.riena.ui.core@default:default,org.eclipse.nebula.widgets.compositetable@default:default,org.eclipse.riena.ui.ridgets.swt@default:default,org.apache.commons.beanutils@default:default,org.easymock@default:default,org.eclipse.riena.toolbox@default:default,org.eclipse.riena.ui.ridgets@default:default,org.eclipse.riena.navigation.ui@default:default,org.eclipse.riena.ui.swt.rcp@default:default,org.eclipse.riena.ui.swt@default:default,org.eclipse.riena.ui.filter@default:default,org.jdom@default:default,org.apache.log4j@default:default,org.eclipse.riena.ui.wizard.cs@default:default,org.eclipse.riena.navigation@default:default,org.eclipse.riena.ui.templates@default:default,org.eclipse.riena.ui.workarea@default:default,org.eclipse.riena.core@default:default,org.eclipse.riena.navigation.ui.swt@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.cvs@default:default,org.eclipse.ui.views@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.help@default:default,org.eclipse.pde.api.tools.ui@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.pde.ui@default:default,org.eclipse.equinox.app@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.net@default:default,org.eclipse.jface@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.compare.win32@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.p2.director@default:default,org.hamcrest.core@default:default,org.apache.ant@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.apache.commons.logging@default:default,org.eclipse.jdt@default:default,org.mortbay.jetty.server@default:default,org.eclipse.pde.core@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.osgi@-1:true,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.pde.build@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.win32@default:false,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.platform.doc.user@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.help.webapp@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.compare.core@default:default,com.jcraft.jsch@default:default,org.eclipse.jdt.launching@default:default,org.apache.lucene.core@default:default,org.eclipse.ui.ide@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.ds@default:true,org.eclipse.search@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.core.expressions@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.externaltools@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.swt@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf@default:default,org.eclipse.help.appserver@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.eclipse.help.base@default:default,org.eclipse.ant.ui@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.pde.launching@default:default,org.apache.commons.codec@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.debug.ui@default:default,org.eclipse.core.filesystem@default:default,org.apache.commons.httpclient@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.pde@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.net@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.mortbay.jetty.util@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.objectweb.asm@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.intro@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.ant.launching@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.core.filesystem.win32.x86@default:false,javax.servlet@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.update.ui@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,javax.servlet.jsp@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.pde.ds.ui@default:default,org.sat4j.core@default:default,org.eclipse.core.variables@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.core.boot@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.util@default:default,org.eclipse.team.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ant.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.pde.ua.ui@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.update.core.win32@default:false,org.eclipse.compare@default:default,org.eclipse.platform@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.team.ui@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.ui.workbench@default:default,org.eclipse.debug.core@default:default,org.eclipse.rcp@default:default,org.apache.lucene@default:default,org.eclipse.equinox.p2.director.app@default:default,com.ibm.icu@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.ui.browser@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.core.jobs@default:default,org.eclipse.jsch.core@default:default,org.apache.jasper@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding@default:default,org.eclipse.update.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.launcher@default:default,org.apache.lucene.analysis@default:default,org.eclipse.text@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.common@2:true,org.eclipse.swt.win32.win32.x86@default:false"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.riena.ui.swt.rcp@default:default,org.apache.commons.beanutils@default:default,org.apache.commons.lang@default:default,org.pushingpixels.trident@default:default,org.eclipse.riena.communication.factory.hessian@default:default,org.eclipse.riena.ui.core@default:default,com.caucho.hessian@default:default,org.eclipse.riena.toolbox.previewer@default:default,org.eclipse.riena.communication.console@default:default,org.eclipse.riena.ui.ridgets.swt@default:default,org.eclipse.riena.navigation@default:default,org.eclipse.riena.navigation.ui@default:default,org.eclipse.equinox.log@default:default,org.apache.oro@default:default,org.eclipse.riena.ui.workarea@default:default,org.eclipse.riena.ui.common@default:default,org.apache.log4j@default:default,org.eclipse.riena.ui.wizard.cs@default:default,org.eclipse.riena.beans.common@default:default,org.apache.commons.collections@default:default,org.eclipse.riena.client@default:default,org.apache.velocity@default:default,org.eclipse.riena.communication.core@default:default,org.eclipse.riena.ui.swt@default:default,org.eclipse.riena.navigation.ui.swt@default:default,org.easymock@default:default,org.eclipse.riena.ui.filter@default:default,org.eclipse.riena.core@default:default,org.jdom@default:default,org.eclipse.riena.ui.ridgets@default:default,org.eclipse.nebula.widgets.compositetable@default:default,org.eclipse.riena.ui.templates@default:default,org.eclipse.riena.toolbox.previewer.customizer@default:default,org.eclipse.riena.toolbox@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="false"/>
diff --git a/org.eclipse.riena.toolbox/META-INF/MANIFEST.MF b/org.eclipse.riena.toolbox/META-INF/MANIFEST.MF
index 2b52632..172b7e8 100644
--- a/org.eclipse.riena.toolbox/META-INF/MANIFEST.MF
+++ b/org.eclipse.riena.toolbox/META-INF/MANIFEST.MF
@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.riena.core;bundle-version="3.0.0",
org.eclipse.riena.navigation.ui.swt;bundle-version="3.0.0",
- org.eclipse.jdt.launching;bundle-version="3.5.100"
+ org.eclipse.jdt.launching;bundle-version="3.5.100",
+ org.eclipse.equinox.launcher;bundle-version="1.2.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Eclipse.org
diff --git a/org.eclipse.riena.toolbox/plugin.xml b/org.eclipse.riena.toolbox/plugin.xml
index 21612e9..d391538 100644
--- a/org.eclipse.riena.toolbox/plugin.xml
+++ b/org.eclipse.riena.toolbox/plugin.xml
@@ -37,4 +37,38 @@
</initializer>
</extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="popup:org.eclipse.jdt.ui.CompilationUnitEditor.EditorContext?after=additions">
+ <menu
+ id="org.eclipse.riena.toolbox.annotationviewer.rienatoolbox.menu"
+ label="Riena Toolbox">
+ <command
+ commandId="org.eclipse.riena.toolbox.generateConfigureRidgets.command"
+ label="Generate configureRidgets"
+ style="push">
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.riena.toolbox.assemblyeditor.ui.handler.GenerateConfigureRidgetsHandler"
+ id="org.eclipse.riena.toolbox.generateConfigureRidgets.command"
+ name="Generate configureRidgets">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.riena.toolbox.generateConfigureRidgets.command"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M1+M3+R">
+ </key>
+ </extension>
+
+
</plugin>
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ApplicationPreviewer.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ApplicationPreviewer.java
index 1c1d313..eed5876 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ApplicationPreviewer.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ApplicationPreviewer.java
@@ -10,7 +10,16 @@
*******************************************************************************/
package org.eclipse.riena.toolbox.assemblyeditor;
-import org.eclipse.riena.navigation.model.ModuleGroupNode;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+import org.eclipse.osgi.framework.internal.core.EquinoxLauncher;
/**
*
@@ -18,57 +27,46 @@ import org.eclipse.riena.navigation.model.ModuleGroupNode;
@SuppressWarnings("restriction")
public class ApplicationPreviewer {
- public void start(final ModuleGroupNode moduleGroup) {
- // final String className = "org.eclipse.equinox.frameworkadmin.equinox.internal.EquinoxFrameworkAdminFactory";
- // //only this final part is dependent final on the target final framework implementation.
- //
- // FrameworkAdmin fwAdmin = null;
- // try {
- // fwAdmin = FrameworkAdminFactory.getInstance(className);
- // } catch (final InstantiationException e1) {
- // e1.printStackTrace();
- // } catch (final IllegalAccessException e1) {
- // e1.printStackTrace();
- // } catch (final ClassNotFoundException e1) {
- // e1.printStackTrace();
- // }
- //
- // //After instanciating FrameworkAdmin object, completely same code can be used
- // //as the case that you get the object from a service registry on OSGi framework.
- // final Manipulator manipulator = fwAdmin.getManipulator();
- // final ConfigData configData = manipulator.getConfigData();
- // final LauncherData launcherData = manipulator.getLauncherData();
- //
- // //1. Set Parameters to LaunchData.
- // //launcherData.setJvm(new File("C:\Java\jre1.5.0_09\bin\java.exe"));
- // launcherData.setJvmArgs(new String[] { "-Dms40" });
- // launcherData.setFwPersistentDataLocation(new File("C:/eclipse/configuration"), true);
- // launcherData.setFwJar(new File("C:/eclipse/plugins/org.eclipse.osgi_3.3.0.v20070208.jar"));
- // launcherData.setFwConfigLocation(new File("C:/eclipse/configuration"));
- //
- // //2. Set Parameters to ConfigData.
- // final URI bundleLocation = null;
- // final int startlevel = 4;
- // final boolean markedAsStartedOrNot = true;
- // configData.addBundle(new BundleInfo(bundleLocation, startlevel, markedAsStartedOrNot));
- //
- // configData.setBeginningFwStartLevel(6);
- // configData.setInitialBundleStartLevel(5);
- // //configData.setFwDependentProp("osgi.console","9000");
+ private final static String TP = "reference:file:/C:/build/targets/Riena-target-201104130523-win32/eclipse/plugins/"; //$NON-NLS-1$
+
+ private final List<String> targetPlatformBundles = Arrays.asList(new String[] {//
+ "com.caucho.hessian_3.2.0.jar", //
+ "org.eclipse.core.databinding_1.4.0.I20110111-0800.jar",//
+ "org.eclipse.core.databinding.beans_1.2.100.I20100824-0800.jar",//
+ "org.eclipse.core.databinding.property_1.4.0.I20110222-0800.jar",//
+ "org.eclipse.riena.beans.common_3.0.0.HEAD.jar", //
+ "org.eclipse.riena.communication.console_3.0.0.HEAD.jar",//
+ "org.eclipse.riena.communication.core_3.0.0.HEAD.jar",//
+ "org.eclipse.riena.communication.factory.hessian_3.0.0.HEAD.jar",//
+ "org.eclipse.riena.core_3.0.0.HEAD.jar",//
+ "org.eclipse.riena.ui.common_3.0.0.HEAD",//
+ "org.eclipse.riena.ui.core_3.0.0.HEAD",//
+ "org.eclipse.riena.ui.filter_3.0.0.HEAD",//
+ "org.eclipse.riena.ui.ridgets_3.0.0.HEAD",//
+ "org.eclipse.riena.ui.ridgets.swt_3.0.0.HEAD",//
+ "org.eclipse.riena.navigation_3.0.0.HEAD",//
+ "org.eclipse.riena.navigation.ui_3.0.0.HEAD",//
+ "org.eclipse.riena.navigation.ui.swt_3.0.0.HEAD",//
+ "org.apache.oro_2.0.8.v200903061218.jar" });
+
+ public void start() throws BundleException {
+ final Map<String, String> configuration = new HashMap<String, String>();
+ final EquinoxLauncher launcher = new EquinoxLauncher(configuration);
+ launcher.start();
+ final BundleContext ctx = launcher.getBundleContext();
+
+ // for (final String tpBundle : targetPlatformBundles) {
+ // ctx.installBundle(TP + tpBundle);
+ // System.out.println(">> " + tpBundle);
//
- // //3. Save them.
- // try {
- // manipulator.save(false);
- // final Process process = fwAdmin.launch(manipulator, new File("C:/eclipse"));
- // } catch (final FrameworkAdminRuntimeException e) {
- // e.printStackTrace();
- // } catch (final IOException e) {
- // e.printStackTrace();
+ // for (final Bundle installed : ctx.getBundles()) {
+ // System.out.println("installed " + installed.getSymbolicName());
+ // }
// }
- //
- // final EquinoxLauncher equinoxLauncher = new EquinoxLauncher(null);
- //4. Launch it.
+ final Bundle minimalBundle = ctx
+ .installBundle("reference:file:C:/build/workspaces/toolbox_runtime/org.eclipse.riena.toolbox.minimal"); //$NON-NLS-1$
+ minimalBundle.start();
}
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/StartupEditorListener.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/StartupEditorListener.java
index d0b080f..2874b15 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/StartupEditorListener.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/StartupEditorListener.java
@@ -27,6 +27,7 @@ import org.eclipse.riena.toolbox.Activator;
import org.eclipse.riena.toolbox.assemblyeditor.model.AssemblyModel;
import org.eclipse.riena.toolbox.assemblyeditor.model.BundleNode;
import org.eclipse.riena.toolbox.assemblyeditor.model.SubModuleNode;
+import org.eclipse.riena.toolbox.assemblyeditor.ui.preferences.PreferenceConstants;
import org.eclipse.riena.toolbox.assemblyeditor.ui.views.AssemblyView;
@SuppressWarnings("restriction")
@@ -40,9 +41,9 @@ public class StartupEditorListener implements IStartup {
IWorkbenchPart activePart = null;
windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- if (windows[i] != null) {
- activePage = windows[i].getActivePage();
+ for (final IWorkbenchWindow window : windows) {
+ if (window != null) {
+ activePage = window.getActivePage();
if (activePage != null) {
activePage.addPartListener(listener);
activePart = activePage.getActivePart();
@@ -74,6 +75,10 @@ public class StartupEditorListener implements IStartup {
}
private void selectCorrespondingNodeInAssemblyTree(final IWorkbenchPart part) {
+ if (!Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.CONST_LINK_WITH_EDITOR)) {
+ return;
+ }
+
if (part instanceof CompilationUnitEditor) {
final CompilationUnitEditor edi = (CompilationUnitEditor) part;
final FileEditorInput inp = (FileEditorInput) edi.getEditorInput();
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/WorkbenchService.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/WorkbenchService.java
new file mode 100644
index 0000000..0cd3f0f
--- /dev/null
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/WorkbenchService.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 compeople AG 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:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.toolbox.assemblyeditor;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.part.FileEditorInput;
+
+import org.eclipse.riena.toolbox.assemblyeditor.api.IWorkbenchService;
+import org.eclipse.riena.toolbox.assemblyeditor.model.BundleNode;
+
+/**
+ *
+ */
+public class WorkbenchService implements IWorkbenchService {
+
+ public String getCompilationUnitClassNameOfActiveEditor(final IEditorPart part) {
+ final CompilationUnitEditor edi = (CompilationUnitEditor) part;
+ final FileEditorInput inp = (FileEditorInput) edi.getEditorInput();
+ final IFile file = inp.getFile();
+
+ // FIXME get src folder from projectsettings
+ final Pattern pattern = Pattern.compile(BundleNode.SRC_FOLDER + "(.*?)\\.java"); //$NON-NLS-1$
+ final Matcher matcher = pattern.matcher(file.getProjectRelativePath().toOSString());
+ if (matcher.matches()) {
+ final String cleanClassName = matcher.group(1).substring(1).replace("\\", "."); //$NON-NLS-1$ //$NON-NLS-2$
+ return cleanClassName;
+ }
+
+ return null;
+ }
+
+}
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/api/IWorkbenchService.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/api/IWorkbenchService.java
new file mode 100644
index 0000000..38e2735
--- /dev/null
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/api/IWorkbenchService.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 compeople AG 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:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.toolbox.assemblyeditor.api;
+
+import org.eclipse.ui.IEditorPart;
+
+/**
+ *
+ */
+public interface IWorkbenchService {
+ String getCompilationUnitClassNameOfActiveEditor(IEditorPart part);
+}
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/AssemblyTreeViewer.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/AssemblyTreeViewer.java
index 4b178bf..4eee5bd 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/AssemblyTreeViewer.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/AssemblyTreeViewer.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
@@ -38,6 +39,7 @@ import org.eclipse.riena.toolbox.assemblyeditor.model.ModuleGroupNode;
import org.eclipse.riena.toolbox.assemblyeditor.model.ModuleNode;
import org.eclipse.riena.toolbox.assemblyeditor.model.SubApplicationNode;
import org.eclipse.riena.toolbox.assemblyeditor.model.SubModuleNode;
+import org.eclipse.riena.toolbox.assemblyeditor.ui.preferences.PreferenceConstants;
/**
* This class renders the {@link AssemblyModel} as a Tree.
@@ -47,10 +49,13 @@ import org.eclipse.riena.toolbox.assemblyeditor.model.SubModuleNode;
public class AssemblyTreeViewer extends FilteredTree {
private final List<IDirtyListener> dirtyListener;
+ private final ProjectsWithAssembliesFilter projectsWithAssembliesFilter;
public AssemblyTreeViewer(final Composite parent, final int style) {
super(parent, SWT.SINGLE, new PatternFilter(), true);
+ projectsWithAssembliesFilter = new ProjectsWithAssembliesFilter();
+
dirtyListener = new ArrayList<IDirtyListener>();
treeViewer.setContentProvider(new TreeContentProvider());
treeViewer.setLabelProvider(new TreeLabelProvider());
@@ -67,6 +72,7 @@ public class AssemblyTreeViewer extends FilteredTree {
}
}
});
+ treeViewer.addFilter(projectsWithAssembliesFilter);
}
public TreeViewer getTreeViewer() {
@@ -108,6 +114,24 @@ public class AssemblyTreeViewer extends FilteredTree {
treeViewer.refresh();
treeViewer.setExpandedElements(exp);
fireDirtyChanged(true);
+
+ }
+
+ private class ProjectsWithAssembliesFilter extends ViewerFilter {
+
+ @Override
+ public boolean select(final Viewer viewer, final Object parentElement, final Object element) {
+ if (!Activator.getDefault().getPreferenceStore()
+ .getBoolean(PreferenceConstants.CONST_ONLY_SHOW_PROJECTS_WITH_ASSEMBLIES)) {
+ return true;
+ }
+
+ if (element instanceof BundleNode) {
+ return !((BundleNode) element).getChildren().isEmpty();
+ }
+ return true;
+ }
+
}
private static class TreeContentProvider implements ITreeContentProvider {
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/handler/GenerateConfigureRidgetsHandler.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/handler/GenerateConfigureRidgetsHandler.java
new file mode 100644
index 0000000..95ef930
--- /dev/null
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/handler/GenerateConfigureRidgetsHandler.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 compeople AG 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:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.riena.toolbox.assemblyeditor.ui.handler;
+
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
+import org.eclipse.jdt.ui.IWorkingCopyManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.riena.toolbox.Activator;
+import org.eclipse.riena.toolbox.assemblyeditor.ModelService;
+import org.eclipse.riena.toolbox.assemblyeditor.RidgetGenerator;
+import org.eclipse.riena.toolbox.assemblyeditor.WorkbenchService;
+import org.eclipse.riena.toolbox.assemblyeditor.model.SubModuleNode;
+import org.eclipse.riena.toolbox.assemblyeditor.model.SwtControl;
+import org.eclipse.riena.toolbox.assemblyeditor.ui.views.AssemblyView;
+
+/**
+ * FIXME: If the Controller is used in more than one nodes, show a
+ * selection-dialog and let the user pick one.
+ *
+ * TODO: implement PropertyTester for this command
+ */
+public class GenerateConfigureRidgetsHandler extends AbstractHandler {
+
+ @SuppressWarnings("restriction")
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .getActiveEditor();
+
+ if (null == activeEditor || !(activeEditor instanceof CompilationUnitEditor)) {
+ return null;
+ }
+
+ final AssemblyView assemblyView = (AssemblyView) PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage().findView(AssemblyView.ID);
+ final IStructuredSelection sel = (IStructuredSelection) assemblyView.getAssemblyTree().getTreeViewer()
+ .getSelection();
+
+ if (null == sel) {
+ return null;
+ }
+
+ final IWorkingCopyManager manager = JavaPlugin.getDefault().getWorkingCopyManager();
+ final ICompilationUnit unit = manager.getWorkingCopy(activeEditor.getEditorInput());
+ final RidgetGenerator generator = new RidgetGenerator(unit.getJavaProject().getProject());
+
+ final String className = new WorkbenchService().getCompilationUnitClassNameOfActiveEditor(activeEditor);
+ final SubModuleNode selectedNode = new ModelService().findSubModuleByClassName(Activator.getDefault()
+ .getAssemblyModel(), unit.getJavaProject().getProject(), className);
+ if (null == selectedNode) {
+ return null;
+ }
+
+ final List<SwtControl> controls = generator.findSwtControlsReflectionStyle(selectedNode.getRcpView()
+ .getViewClass());
+ generator.generateConfigureRidgets((selectedNode).getController(), controls);
+
+ if (Platform.inDebugMode()) {
+ for (final SwtControl control : controls) {
+ System.out.println("DEBUG: found control: " + control.getSwtControlClassName() + " ridgetId: "
+ + control.getRidgetId());
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceConstants.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceConstants.java
index 56d5d24..f92c32e 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceConstants.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceConstants.java
@@ -19,7 +19,11 @@ public final class PreferenceConstants {
public static final String CONST_CONFIGURE_RIDGETS_BLACKLIST = "configureRidgets Blacklist"; //$NON-NLS-1$
public static final String CONST_GENERATE_VIEW_PACKAGE_NAME = "Generate View packagename"; //$NON-NLS-1$
+
public static final String CONST_GENERATE_CONTROLLER_PACKAGE_NAME = "Generate Controller packagename"; //$NON-NLS-1$
+ public static final String CONST_LINK_WITH_EDITOR = "Link with editor"; //$NON-NLS-1$
+
+ public static final String CONST_ONLY_SHOW_PROJECTS_WITH_ASSEMBLIES = "Only show projects with assemblies"; //$NON-NLS-1$
private PreferenceConstants() {
// empty
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceInitializer.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceInitializer.java
index 42e7b94..da7c19d 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceInitializer.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/PreferenceInitializer.java
@@ -25,9 +25,11 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
store.setDefault(PreferenceConstants.CONST_CUSTOM_UI_CONTROLS_FACTORY, ""); //$NON-NLS-1$
store.setDefault(PreferenceConstants.CONST_GENERATE_CONTROLLER_PACKAGE_NAME, "controller"); //$NON-NLS-1$
store.setDefault(PreferenceConstants.CONST_GENERATE_VIEW_PACKAGE_NAME, "views"); //$NON-NLS-1$
-
store.setDefault(PreferenceConstants.CONST_CONFIGURE_RIDGETS_BLACKLIST,
"org.eclipse.swt.widgets.Label;org.eclipse.swt.widgets.Composite"); //$NON-NLS-1$
+
+ store.setDefault(PreferenceConstants.CONST_LINK_WITH_EDITOR, true);
+ store.setDefault(PreferenceConstants.CONST_ONLY_SHOW_PROJECTS_WITH_ASSEMBLIES, false);
}
}
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/ToolboxConfigurationPreferencePage.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/ToolboxConfigurationPreferencePage.java
index 065d29b..630ba29 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/ToolboxConfigurationPreferencePage.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/preferences/ToolboxConfigurationPreferencePage.java
@@ -35,9 +35,6 @@ public class ToolboxConfigurationPreferencePage extends FieldEditorPreferencePag
setDescription("General Settings for the AssemblyEditor");
}
- public static final String CONST_GENERATE_VIEW_PACKAGE_NAME = "Generate View packagename"; //$NON-NLS-1$
- public static final String CONST_GENERATE_CONTROLLER_PACKAGE_NAME = "Generate Controller packagename"; //$NON-NLS-1$
-
private Group createGroup(final String text) {
final Group groupUIControls = new Group(getFieldEditorParent(), SWT.None);
groupUIControls.setText(text);
diff --git a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/views/AssemblyView.java b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/views/AssemblyView.java
index 7ad29d7..ad16607 100644
--- a/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/views/AssemblyView.java
+++ b/org.eclipse.riena.toolbox/src/org/eclipse/riena/toolbox/assemblyeditor/ui/views/AssemblyView.java
@@ -14,6 +14,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.Set;
+import org.osgi.framework.BundleException;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -22,6 +24,7 @@ import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
@@ -55,6 +58,7 @@ import org.eclipse.ui.part.ViewPart;
import org.eclipse.riena.toolbox.Activator;
import org.eclipse.riena.toolbox.Util;
import org.eclipse.riena.toolbox.assemblyeditor.AddUIControlCallGenerator;
+import org.eclipse.riena.toolbox.assemblyeditor.ApplicationPreviewer;
import org.eclipse.riena.toolbox.assemblyeditor.ResourceChangeListener;
import org.eclipse.riena.toolbox.assemblyeditor.RidgetGenerator;
import org.eclipse.riena.toolbox.assemblyeditor.api.INodeFactory;
@@ -73,6 +77,7 @@ import org.eclipse.riena.toolbox.assemblyeditor.model.SwtControl;
import org.eclipse.riena.toolbox.assemblyeditor.ui.AssemblyTreeViewer;
import org.eclipse.riena.toolbox.assemblyeditor.ui.DetailSection;
import org.eclipse.riena.toolbox.assemblyeditor.ui.IDirtyListener;
+import org.eclipse.riena.toolbox.assemblyeditor.ui.preferences.PreferenceConstants;
import org.eclipse.riena.ui.swt.MessageBox;
/**
@@ -98,6 +103,8 @@ public class AssemblyView extends ViewPart implements ISaveablePart {
private final PluginXmlResourceChangeListener changeListener = new PluginXmlResourceChangeListener();
private RegisterPerspectiveAction registerPerspectiveAction;
private ShowPreview showApplicationPreview;
+ private LinkWithEditorAction linkWidthEditorAction;
+ private OnlyShowProjectsWithAssembliesAction onlyShowProjectsWithAssembliesAction;
public AssemblyView() {
initActions();
@@ -123,19 +130,29 @@ public class AssemblyView extends ViewPart implements ISaveablePart {
refreshAction = new RefreshAction();
registerPerspectiveAction = new RegisterPerspectiveAction();
showApplicationPreview = new ShowPreview();
+ linkWidthEditorAction = new LinkWithEditorAction();
+ onlyShowProjectsWithAssembliesAction = new OnlyShowProjectsWithAssembliesAction();
}
public AssemblyTreeViewer getAssemblyTree() {
return assemblyTree;
}
+ protected void addActionToMenu(final Menu parent, final Action action) {
+ final ActionContributionItem item = new ActionContributionItem(action);
+ item.fill(parent, -1);
+ }
+
@Override
public void createPartControl(final Composite parent) {
parent.setLayout(new FillLayout());
final SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
getViewSite().getActionBars().getToolBarManager().add(refreshAction);
- //getViewSite().getActionBars().getToolBarManager().add(showApplicationPreview);
+ //getViewSite().getActionBars().getToolBarManager().add(new DropDownAction());
+ getViewSite().getActionBars().getMenuManager().add(onlyShowProjectsWithAssembliesAction);
+ getViewSite().getActionBars().getMenuManager().add(linkWidthEditorAction);
+
new TreeComposite(sashForm);
detailSection = new DetailSection(sashForm);
@@ -149,6 +166,58 @@ public class AssemblyView extends ViewPart implements ISaveablePart {
});
}
+ // private class DropDownAction extends Action implements IMenuCreator {
+ // private Menu dropDownMenu;
+ //
+ // public DropDownAction() {
+ // setToolTipText("Settings");
+ // setImageDescriptor(null);
+ // setText("");
+ // setMenuCreator(this);
+ // }
+ //
+ // public void dispose() {
+ // if (dropDownMenu != null) {
+ // dropDownMenu.dispose();
+ // dropDownMenu = null;
+ // }
+ // }
+ //
+ // public Menu getMenu(final Menu parent) {
+ // return null;
+ // }
+ //
+ // public Menu getMenu(final Control parent) {
+ // if (dropDownMenu != null) {
+ // dropDownMenu.dispose();
+ // }
+ //
+ // dropDownMenu = new Menu(parent);
+ // addActionToMenu(dropDownMenu, onlyShowProjectsWithAssembliesAction);
+ // addActionToMenu(dropDownMenu, linkWidthEditorAction);
+ //
+ // return dropDownMenu;
+ // }
+ //
+ // protected void addActionToMenu(final Menu parent, final Action action) {
+ // final ActionContributionItem item = new ActionContributionItem(action);
+ // item.fill(parent, -1);
+ // }
+ //
+ // @Override
+ // public void run() {
+ //
+ // }
+ //
+ // /**
+ // * Get's rid of the menu, because the menu hangs on to the searches,
+ // * etc.
+ // */
+ // void clear() {
+ // dispose();
+ // }
+ // }
+
public void openClassInEditor(final SubModuleNode submod, final String className) {
if (className == null) {
Util.logWarning("Controller is null " + submod); //$NON-NLS-1$
@@ -971,7 +1040,39 @@ public class AssemblyView extends ViewPart implements ISaveablePart {
@Override
public void run() {
- //new ApplicationPreviewer().start();
+ try {
+ new ApplicationPreviewer().start();
+ } catch (final BundleException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private class OnlyShowProjectsWithAssembliesAction extends Action {
+ public OnlyShowProjectsWithAssembliesAction() {
+ super("Hide Projects without Assemblies", Action.AS_CHECK_BOX);
+ setId("org.eclipse.riena.toolbox.assemblyeditor.ui.views.OnlyShowProjectsWithAssemblies.action"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void run() {
+ Activator.getDefault().getPreferenceStore()
+ .setValue(PreferenceConstants.CONST_ONLY_SHOW_PROJECTS_WITH_ASSEMBLIES, isChecked());
+ assemblyTree.rebuild();
+ }
+ }
+
+ private class LinkWithEditorAction extends Action {
+ public LinkWithEditorAction() {
+ super("Link with Editor", Action.AS_CHECK_BOX);
+ setId("org.eclipse.riena.toolbox.assemblyeditor.ui.views.linkwitheditor.action"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void run() {
+ Activator.getDefault().getPreferenceStore()
+ .setValue(PreferenceConstants.CONST_LINK_WITH_EDITOR, isChecked());
+ System.out.println("AssemblyView.LinkWithEditorAction.run() " + isChecked());
}
}
} \ No newline at end of file