JBoss Tools SVN: r13783 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2009-02-24 13:01:12 -0500 (Tue, 24 Feb 2009)
New Revision: 13783
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
Log:
jbide-3859 fixed the are/is
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-02-24 17:54:16 UTC (rev 13782)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-02-24 18:01:12 UTC (rev 13783)
@@ -27,7 +27,7 @@
SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR=Error
ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY=Target Server cannot be empty
ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN=Unknown Target Server
-ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED=There is no available Target Servers for selected Target Runtime
+ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED=There are no available Target Servers for selected Target Runtime
ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE=Target Server is incompatible with Target Runtime selected
ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY=Target Runtime cannot be empty
ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN=Unknown Target Runtime
15 years, 10 months
JBoss Tools SVN: r13782 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2009-02-24 12:54:16 -0500 (Tue, 24 Feb 2009)
New Revision: 13782
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-620
Code Assist for beans in jars archives
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:50:39 UTC (rev 13781)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:54:16 UTC (rev 13782)
@@ -348,6 +348,7 @@
<para>Code Assist can also provide you with access to the beans located in jar archives.</para>
+ <figure>
<title>Code Assist: accessing beans in jar archives</title>
<mediaobject>
<imageobject>
@@ -355,8 +356,8 @@
/>
</imageobject>
</mediaobject>
+ </figure>
-
</section>
<section id="ContentAssistWithinJSFGraphicalEditor44">
15 years, 10 months
JBoss Tools SVN: r13781 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2009-02-24 12:50:39 -0500 (Tue, 24 Feb 2009)
New Revision: 13781
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-620
Code Assist for beans in jars archives
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:48:05 UTC (rev 13780)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:50:39 UTC (rev 13781)
@@ -346,7 +346,7 @@
</mediaobject>
</figure>
- <para>Code Assist can also provide you access to the beans located in jar archives.</para>
+ <para>Code Assist can also provide you with access to the beans located in jar archives.</para>
<title>Code Assist: accessing beans in jar archives</title>
<mediaobject>
15 years, 10 months
JBoss Tools SVN: r13780 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2009-02-24 12:48:05 -0500 (Tue, 24 Feb 2009)
New Revision: 13780
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-620
Code Assist for beans in jars archives
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:47:50 UTC (rev 13779)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-02-24 17:48:05 UTC (rev 13780)
@@ -345,6 +345,18 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>Code Assist can also provide you access to the beans located in jar archives.</para>
+
+ <title>Code Assist: accessing beans in jar archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_14_a.png"
+ />
+ </imageobject>
+ </mediaobject>
+
+
</section>
<section id="ContentAssistWithinJSFGraphicalEditor44">
15 years, 10 months
JBoss Tools SVN: r13779 - trunk/jsf/docs/userguide/en/images/editors_features.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2009-02-24 12:47:50 -0500 (Tue, 24 Feb 2009)
New Revision: 13779
Added:
trunk/jsf/docs/userguide/en/images/editors_features/editors_features_14_a.png
Log:
https://jira.jboss.org/jira/browse/JBDS-620
Code Assist for beans in jars archives
Added: trunk/jsf/docs/userguide/en/images/editors_features/editors_features_14_a.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/editors_features/editors_features_14_a.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 10 months
JBoss Tools SVN: r13778 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2009-02-24 12:40:11 -0500 (Tue, 24 Feb 2009)
New Revision: 13778
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
Log:
jbide-3859 fixed the are/is
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-02-24 16:40:10 UTC (rev 13777)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-02-24 17:40:11 UTC (rev 13778)
@@ -1,16 +1,16 @@
SeamCoreBuilder_1=Error storing build results for ''{0}''
-SeamFacetAbstractInstallDelegate_Could_not_activate_Hibernate_nature_on_project=Could not activate Hibernate nature on project
+SeamFacetAbstractInstallDelegate_Could_not_activate_Hibernate_nature_on_project=Could not activate Hibernate nature on project
SeamFacetAbstractInstallDelegate_Could_not_save_changes_to_preferences=Could not save changes to preferences
SeamFacetAbstractInstallDelegate_Error=Error
SeamFacetAbstractInstallDelegate_Restrict_raw_XHTML_Documents=Restrict raw XHTML Documents
ANT_COPY_UTILS_COPY_FAILED=Copy failed - ''{0}'' does not exist
ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER=Could not find ''{0}''
-ANT_COPY_UTILS_IN=\ in
+ANT_COPY_UTILS_IN=\ in
ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR=Cannot copy JDBC driver jar ''{0}''
DATA_SOURCE_XML_DEPLOYER_DEPLOYING_DATASOURCE_TO_SERVER=Deploying datasource to server
DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO=No server selected to deploy datasource to
DATA_SOURCE_XML_DEPLOYER_SERVER_DID_NOT_SUPPORT_DEPLOY_OF_DATASOURCE=Server did not support deploy of datasource.
-DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE=Could not deploy datasource
+DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE=Could not deploy datasource
JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR=Cannot get compilation unit for ''{0}''
SEAM_EL_VALIDATOR_SETTER=Setter
SEAM_EL_VALIDATOR_GETTER=Getter
@@ -21,13 +21,13 @@
SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT=Can't get Seam Project
SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE=Error validating Seam Core
SEAM_VALIDATION_HELPER_RESOURCE_MUST_NOT_BE_NULL=Resource must not be null
-SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME=Factory method must have name: ''{0}''
+SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME=Factory method must have name: ''{0}''
SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_ERRORS_OCCURED=Error occured during creating Seam Web Project
SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL=Error validating Seam EL
SEAM_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR=Error
ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY=Target Server cannot be empty
ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN=Unknown Target Server
-ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED=There are no available Target Servers for selected Target Runtime
+ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED=There is no available Target Servers for selected Target Runtime
ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE=Target Server is incompatible with Target Runtime selected
ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY=Target Runtime cannot be empty
ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN=Unknown Target Runtime
15 years, 10 months
JBoss Tools SVN: r13777 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-02-24 11:40:10 -0500 (Tue, 24 Feb 2009)
New Revision: 13777
Modified:
trunk/seam/docs/reference/en/modules/seam_preferences.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-579 - updating the "Validator Preferences" section;
Modified: trunk/seam/docs/reference/en/modules/seam_preferences.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_preferences.xml 2009-02-24 16:38:53 UTC (rev 13776)
+++ trunk/seam/docs/reference/en/modules/seam_preferences.xml 2009-02-24 16:40:10 UTC (rev 13777)
@@ -59,7 +59,7 @@
problems. For example, if you want to ignore the case when component name is
duplicated expand the <property>Components</property> node and select
<property>Ignore</property> next to <property>Duplicate component
- name</property>. After that you won't see the error.</para>
+ name</property>. After that you won't see the error.</para>
<figure>
@@ -71,8 +71,22 @@
</mediaobject>
</figure>
+ <para>Notice, that in the <emphasis>
+ <property>Expression language</property>
+ </emphasis> section there is now a preference for setting severity of EL
+ Syntax. You can select whether the Seam validator displays an error, a warning or just ignore the EL Syntax error.</para>
+
+ <figure>
+ <title>Severity Preference for EL Syntax</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/el_syntax_error.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<para>In the upper right corner of the page there is a <property>Configure Project
- Specific</property> link. Clicking on it you get the form where you can choose a
+ Specific Settings</property> link. Clicking on it you get the form where you can choose a
project for specific setting. Project specific configuration allows you to have
different validator settings for each project. Check the <property>Show only
projects with project specific settings</property> if you want to see the
@@ -130,7 +144,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<tip>
<title>Tip:</title>
<para>The wizard doesn't allow the renaming of the artifacts listed in the Seam
@@ -138,12 +152,12 @@
See <link linkend="renaming_projects_folders">Renaming the Projects and
Folders</link>.</para>
</tip>
-
- <para>Also notice, you are not required to use the <property>New Seam Project wizard</property>
- to benefit from Seam artifact wizards. You can just enable Seam on your existing project
- by checking <property>Seam Support</property> and targeting to Seam Runtime, and then
- configure the folders as you want.</para>
+ <para>Also notice, you are not required to use the <property>New Seam Project
+ wizard</property> to benefit from Seam artifact wizards. You can just enable Seam on
+ your existing project by checking <property>Seam Support</property> and targeting to
+ Seam Runtime, and then configure the folders as you want.</para>
+
<figure>
<title>Properties for Seam Project</title>
<mediaobject>
@@ -152,7 +166,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<tip>
<title>Tip:</title>
<para>On the figure above fields for configuring Seam artifacts are dimmed because Seam
15 years, 10 months
JBoss Tools SVN: r13776 - trunk/seam/docs/reference/en/images/seam_preferences.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-02-24 11:38:53 -0500 (Tue, 24 Feb 2009)
New Revision: 13776
Added:
trunk/seam/docs/reference/en/images/seam_preferences/el_syntax_error.png
Log:
https://jira.jboss.org/jira/browse/JBDS-579 - adding a new image;
Added: trunk/seam/docs/reference/en/images/seam_preferences/el_syntax_error.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/seam_preferences/el_syntax_error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 10 months
JBoss Tools SVN: r13775 - in workspace/dart/plugins/org.jboss.tools.smooks.testui: .settings and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-02-24 11:27:17 -0500 (Tue, 24 Feb 2009)
New Revision: 13775
Added:
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/MultiPageEditorContributor.java
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/SmooksTestMultiPageEditor.java
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/SmooksTestEditor.java
Removed:
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestResultView.java
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.testui/.classpath
workspace/dart/plugins/org.jboss.tools.smooks.testui/.settings/org.eclipse.jdt.core.prefs
workspace/dart/plugins/org.jboss.tools.smooks.testui/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.testui/plugin.xml
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/AbstractNode.java
workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestProjectsView.java
Log:
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/.classpath
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/.classpath 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/.classpath 2009-02-24 16:27:17 UTC (rev 13775)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="libs/antlr-2.7.2.jar"/>
@@ -37,5 +36,6 @@
<classpathentry kind="lib" path="libs/xmlbeans-jsr173-api-2.0-dev.jar"/>
<classpathentry kind="lib" path="libs/xpp3_min-1.1.3.4.O.jar"/>
<classpathentry kind="lib" path="libs/xstream-1.2.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/.settings/org.eclipse.jdt.core.prefs 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/.settings/org.eclipse.jdt.core.prefs 2009-02-24 16:27:17 UTC (rev 13775)
@@ -1,7 +1,12 @@
-#Fri Feb 20 17:23:05 CST 2009
+#Wed Feb 25 07:20:13 HKT 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.5
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/META-INF/MANIFEST.MF 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/META-INF/MANIFEST.MF 2009-02-24 16:27:17 UTC (rev 13775)
@@ -8,10 +8,13 @@
org.eclipse.core.runtime,
org.jboss.tools.smooks.core,
org.jboss.tools.smooks.ui,
- org.eclipse.core.resources;bundle-version="3.4.1",
- org.eclipse.jdt.core;bundle-version="3.4.2"
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.jface.text,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: libs/antlr-2.7.2.jar,
libs/commons-lang-2.1.jar,
libs/commons-logging-1.1.jar,
@@ -47,3 +50,5 @@
libs/xpp3_min-1.1.3.4.O.jar,
libs/xstream-1.2.2.jar,
.
+Export-Package: org.smooks.tools.testui,
+ org.smooks.tools.testui.views
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/plugin.xml
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/plugin.xml 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/plugin.xml 2009-02-24 16:27:17 UTC (rev 13775)
@@ -5,15 +5,15 @@
<extension
point="org.eclipse.ui.views">
<category
- name="Sample Category"
+ name="Smooks"
id="org.smooks.tools.testui">
</category>
<view
- name="Sample View"
+ name="Smooks Test View"
icon="icons/sample.gif"
category="org.smooks.tools.testui"
class="org.smooks.tools.testui.views.TestProjectsView"
- id="org.smooks.tools.testui.views.SampleView">
+ id="org.smooks.tools.testui.views.TestProjectView1">
</view>
</extension>
<extension
@@ -34,5 +34,15 @@
file="contexts.xml">
</contexts>
</extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.smooks.tools.testui.editors.SmooksTestMultiPageEditor"
+ contributorClass="org.smooks.tools.testui.editors.MultiPageEditorContributor"
+ icon="icons/sample.gif"
+ id="org.smooks.tools.testui.editors.MultiPageEditor"
+ name="Smooks Test Editor">
+ </editor>
+ </extension>
</plugin>
Added: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/MultiPageEditorContributor.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/MultiPageEditorContributor.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/MultiPageEditorContributor.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -0,0 +1,103 @@
+package org.smooks.tools.testui.editors;
+
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+
+/**
+ * Manages the installation/deinstallation of global actions for multi-page editors.
+ * Responsible for the redirection of global actions to the active editor.
+ * Multi-page contributor replaces the contributors for the individual editors in the multi-page editor.
+ */
+public class MultiPageEditorContributor extends MultiPageEditorActionBarContributor {
+ private IEditorPart activeEditorPart;
+ private Action sampleAction;
+ /**
+ * Creates a multi-page contributor.
+ */
+ public MultiPageEditorContributor() {
+ super();
+ createActions();
+ }
+ /**
+ * Returns the action registed with the given text editor.
+ * @return IAction or null if editor is null.
+ */
+ protected IAction getAction(ITextEditor editor, String actionID) {
+ return (editor == null ? null : editor.getAction(actionID));
+ }
+ /* (non-JavaDoc)
+ * Method declared in AbstractMultiPageEditorActionBarContributor.
+ */
+
+ public void setActivePage(IEditorPart part) {
+ if (activeEditorPart == part)
+ return;
+
+ activeEditorPart = part;
+
+ IActionBars actionBars = getActionBars();
+ if (actionBars != null) {
+
+ ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;
+
+ actionBars.setGlobalActionHandler(
+ ActionFactory.DELETE.getId(),
+ getAction(editor, ITextEditorActionConstants.DELETE));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.UNDO.getId(),
+ getAction(editor, ITextEditorActionConstants.UNDO));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.REDO.getId(),
+ getAction(editor, ITextEditorActionConstants.REDO));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.CUT.getId(),
+ getAction(editor, ITextEditorActionConstants.CUT));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.COPY.getId(),
+ getAction(editor, ITextEditorActionConstants.COPY));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.PASTE.getId(),
+ getAction(editor, ITextEditorActionConstants.PASTE));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.SELECT_ALL.getId(),
+ getAction(editor, ITextEditorActionConstants.SELECT_ALL));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.FIND.getId(),
+ getAction(editor, ITextEditorActionConstants.FIND));
+ actionBars.setGlobalActionHandler(
+ IDEActionFactory.BOOKMARK.getId(),
+ getAction(editor, IDEActionFactory.BOOKMARK.getId()));
+ actionBars.updateActionBars();
+ }
+ }
+ private void createActions() {
+ sampleAction = new Action() {
+ public void run() {
+ MessageDialog.openInformation(null, "SmooksTestUIPlug-in", "Sample Action Executed");
+ }
+ };
+ sampleAction.setText("Sample Action");
+ sampleAction.setToolTipText("Sample Action tool tip");
+ sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
+ getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
+ }
+ public void contributeToMenu(IMenuManager manager) {
+ IMenuManager menu = new MenuManager("Editor &Menu");
+ manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
+ menu.add(sampleAction);
+ }
+ public void contributeToToolBar(IToolBarManager manager) {
+ manager.add(new Separator());
+ manager.add(sampleAction);
+ }
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/MultiPageEditorContributor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/SmooksTestMultiPageEditor.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/SmooksTestMultiPageEditor.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/SmooksTestMultiPageEditor.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -0,0 +1,240 @@
+package org.smooks.tools.testui.editors;
+
+
+import java.io.StringWriter;
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FontDialog;
+import org.eclipse.ui.*;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.ide.IDE;
+import org.smooks.tools.testui.views.SmooksTestEditor;
+
+/**
+ * An example showing how to create a multi-page editor.
+ * This example has 3 pages:
+ * <ul>
+ * <li>page 0 contains a nested text editor.
+ * <li>page 1 allows you to change the font used in page 2
+ * <li>page 2 shows the words in page 0 in sorted order
+ * </ul>
+ */
+public class SmooksTestMultiPageEditor extends MultiPageEditorPart implements IResourceChangeListener{
+
+ /** The text editor used in page 0. */
+ private TextEditor editor;
+
+ /** The font chosen in page 1. */
+ private Font font;
+
+ /** The text widget used in page 2. */
+ private StyledText text;
+
+ private SmooksTestEditor testEditor;
+ /**
+ * Creates a multi-page editor example.
+ */
+ public SmooksTestMultiPageEditor() {
+ super();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
+ }
+ /**
+ * Creates page 0 of the multi-page editor,
+ * which contains a text editor.
+ */
+ void createPage0() {
+ testEditor = new SmooksTestEditor();
+ int index;
+ try {
+ index = addPage(testEditor, getEditorInput());
+ setPageText(index, "Test");
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ /**
+ * Creates page 1 of the multi-page editor,
+ * which allows you to change the font used in page 2.
+ */
+ void createPage1() {
+
+ Composite composite = new Composite(getContainer(), SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ layout.numColumns = 2;
+
+ Button fontButton = new Button(composite, SWT.NONE);
+ GridData gd = new GridData(GridData.BEGINNING);
+ gd.horizontalSpan = 2;
+ fontButton.setLayoutData(gd);
+ fontButton.setText("Change Font...");
+
+ fontButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ setFont();
+ }
+ });
+
+ int index = addPage(composite);
+ setPageText(index, "Properties");
+ }
+ /**
+ * Creates page 2 of the multi-page editor,
+ * which shows the sorted text.
+ */
+ void createPage2() {
+ Composite composite = new Composite(getContainer(), SWT.NONE);
+ FillLayout layout = new FillLayout();
+ composite.setLayout(layout);
+ text = new StyledText(composite, SWT.H_SCROLL | SWT.V_SCROLL);
+ text.setEditable(false);
+
+ int index = addPage(composite);
+ setPageText(index, "Preview");
+ }
+ /**
+ * Creates the pages of the multi-page editor.
+ */
+ protected void createPages() {
+ createPage0();
+ createPage1();
+// createPage2();
+ }
+ /**
+ * The <code>MultiPageEditorPart</code> implementation of this
+ * <code>IWorkbenchPart</code> method disposes all nested editors.
+ * Subclasses may extend.
+ */
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ super.dispose();
+ }
+ /**
+ * Saves the multi-page editor's document.
+ */
+ public void doSave(IProgressMonitor monitor) {
+ getEditor(0).doSave(monitor);
+ }
+ /**
+ * Saves the multi-page editor's document as another file.
+ * Also updates the text for page 0's tab, and updates this multi-page editor's input
+ * to correspond to the nested editor's.
+ */
+ public void doSaveAs() {
+ IEditorPart editor = getEditor(0);
+ editor.doSaveAs();
+ setPageText(0, editor.getTitle());
+ setInput(editor.getEditorInput());
+ }
+ /* (non-Javadoc)
+ * Method declared on IEditorPart
+ */
+ public void gotoMarker(IMarker marker) {
+ setActivePage(0);
+ IDE.gotoMarker(getEditor(0), marker);
+ }
+ /**
+ * The <code>MultiPageEditorExample</code> implementation of this method
+ * checks that the input is an instance of <code>IFileEditorInput</code>.
+ */
+ public void init(IEditorSite site, IEditorInput editorInput)
+ throws PartInitException {
+ if (!(editorInput instanceof IFileEditorInput))
+ throw new PartInitException("Invalid Input: Must be IFileEditorInput");
+ super.init(site, editorInput);
+ }
+ /* (non-Javadoc)
+ * Method declared on IEditorPart.
+ */
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+ /**
+ * Calculates the contents of page 2 when the it is activated.
+ */
+ protected void pageChange(int newPageIndex) {
+ super.pageChange(newPageIndex);
+ if (newPageIndex == 2) {
+ sortWords();
+ }
+ }
+ /**
+ * Closes all project files on project close.
+ */
+ public void resourceChanged(final IResourceChangeEvent event){
+ if(event.getType() == IResourceChangeEvent.PRE_CLOSE){
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run(){
+ IWorkbenchPage[] pages = getSite().getWorkbenchWindow().getPages();
+ for (int i = 0; i<pages.length; i++){
+ if(((FileEditorInput)editor.getEditorInput()).getFile().getProject().equals(event.getResource())){
+ IEditorPart editorPart = pages[i].findEditor(editor.getEditorInput());
+ pages[i].closeEditor(editorPart,true);
+ }
+ }
+ }
+ });
+ }
+ }
+ /**
+ * Sets the font related data to be applied to the text in page 2.
+ */
+ void setFont() {
+ FontDialog fontDialog = new FontDialog(getSite().getShell());
+ fontDialog.setFontList(text.getFont().getFontData());
+ FontData fontData = fontDialog.open();
+ if (fontData != null) {
+ if (font != null)
+ font.dispose();
+ font = new Font(text.getDisplay(), fontData);
+ text.setFont(font);
+ }
+ }
+ /**
+ * Sorts the words in page 0, and shows them in page 2.
+ */
+ void sortWords() {
+
+ String editorText =
+ editor.getDocumentProvider().getDocument(editor.getEditorInput()).get();
+
+ StringTokenizer tokenizer =
+ new StringTokenizer(editorText, " \t\n\r\f!@#\u0024%^&*()-_=+`~[]{};:'\",.<>/?|\\");
+ ArrayList editorWords = new ArrayList();
+ while (tokenizer.hasMoreTokens()) {
+ editorWords.add(tokenizer.nextToken());
+ }
+
+ Collections.sort(editorWords, Collator.getInstance());
+ StringWriter displayText = new StringWriter();
+ for (int i = 0; i < editorWords.size(); i++) {
+ displayText.write(((String) editorWords.get(i)));
+ displayText.write(System.getProperty("line.separator"));
+ }
+ text.setText(displayText.toString());
+ }
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/editors/SmooksTestMultiPageEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/AbstractNode.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/AbstractNode.java 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/AbstractNode.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -53,17 +53,14 @@
support.removePropertyChangeListener(listener);
}
- @Override
public Object adapte(Class type) {
return null;
}
- @Override
public boolean hasChildren() {
return true;
}
- @Override
public void refresh() {
// TODO Auto-generated method stub
Added: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/SmooksTestEditor.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/SmooksTestEditor.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/SmooksTestEditor.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -0,0 +1,182 @@
+/**
+ *
+ */
+package org.smooks.tools.testui.views;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.part.EditorPart;
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
+import org.jboss.tools.smooks.graphical.util.GraphicalInformationSaver;
+import org.jboss.tools.smooks.ui.editors.SmooksFileEditorInput;
+import org.jboss.tools.smooks.ui.wizards.SmooksConfigFileNewWizard;
+import org.jboss.tools.smooks.xml2java.analyzer.AbstractXMLModelAnalyzer;
+
+/**
+ * @author Dart
+ *
+ */
+public class SmooksTestEditor extends EditorPart {
+
+ private GraphInformations graphInformations;
+ private String inputSource;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.
+ * IProgressMonitor)
+ */
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+ */
+ @Override
+ public void doSaveAs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#init(org.eclipse.ui.IEditorSite,
+ * org.eclipse.ui.IEditorInput)
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+ if (!(input instanceof SmooksFileEditorInput)) {
+ throw new PartInitException("Error!");
+ }
+ this.setInput(input);
+ setSite(site);
+ GraphicalInformationSaver saver = new GraphicalInformationSaver(input);
+ try {
+ graphInformations = saver.doLoad();
+ String sourceId = graphInformations.getMappingType()
+ .getSourceTypeID();
+ String targetId = graphInformations.getMappingType()
+ .getTargetTypeID();
+ if (!targetId
+ .equals("org.jboss.tools.smooks.ui.viewerInitor.javabean")) {
+ throw new PartInitException(
+ "can't support this target data type : " + targetId);
+ }
+ if (!sourceId.equals("org.jboss.tools.smooks.xml.viewerInitor.xml")) {
+ throw new PartInitException(
+ "can't support this source data type : " + sourceId);
+ }
+
+ Params params = graphInformations.getParams();
+ if (params != null) {
+ List list = params.getParam();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ Param param = (Param) iterator.next();
+ if (SmooksConfigFileNewWizard.PRO_SOURCE_DATA_PATH
+ .equals(param.getName())) {
+ String p = param.getValue();
+ try {
+ String filePath = AbstractXMLModelAnalyzer
+ .parseFilePath(p);
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(
+ new FileInputStream(filePath)));
+ String line = reader.readLine();
+ StringBuffer buffer = new StringBuffer();
+ while (line != null) {
+ buffer.append(line);
+ line = reader.readLine();
+ buffer.append("\n");
+ }
+ inputSource = buffer.toString();
+ } catch (InvocationTargetException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ } catch (IOException e) {
+ throw new PartInitException(e.toString());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#isDirty()
+ */
+ @Override
+ public boolean isDirty() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ @Override
+ public void createPartControl(Composite parent) {
+ parent.setLayout(new FillLayout());
+ StyledText text = new StyledText(parent, SWT.NONE);
+ if (inputSource != null) {
+ text.setText(inputSource);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/SmooksTestEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestProjectsView.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestProjectsView.java 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestProjectsView.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -32,26 +32,25 @@
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.part.DrillDownAdapter;
import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.smooks.ui.editors.SmooksFileEditorInput;
-
/**
- * This sample class demonstrates how to plug-in a new
- * workbench view. The view shows data obtained from the
- * model. The sample creates a dummy model on the fly,
- * but a real implementation would connect to the model
- * available either in this or another plug-in (e.g. the workspace).
- * The view is connected to the model using a content provider.
+ * This sample class demonstrates how to plug-in a new workbench view. The view
+ * shows data obtained from the model. The sample creates a dummy model on the
+ * fly, but a real implementation would connect to the model available either in
+ * this or another plug-in (e.g. the workspace). The view is connected to the
+ * model using a content provider.
* <p>
- * The view uses a label provider to define how model
- * objects should be presented in the view. Each
- * view can present the same model objects using
- * different labels and icons, if needed. Alternatively,
- * a single label provider can be shared between views
- * in order to ensure that objects of the same type are
- * presented in the same way everywhere.
+ * The view uses a label provider to define how model objects should be
+ * presented in the view. Each view can present the same model objects using
+ * different labels and icons, if needed. Alternatively, a single label provider
+ * can be shared between views in order to ensure that objects of the same type
+ * are presented in the same way everywhere.
* <p>
*/
@@ -63,106 +62,123 @@
private Action doubleClickAction;
/*
- * 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).
+ * 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 TreeObject implements IAdaptable {
private String name;
private TreeParent parent;
-
+
public TreeObject(String name) {
this.name = name;
}
+
public String getName() {
return name;
}
+
public void setParent(TreeParent parent) {
this.parent = parent;
}
+
public TreeParent getParent() {
return parent;
}
+
public String toString() {
return getName();
}
+
public Object getAdapter(Class key) {
return null;
}
}
-
+
class TreeParent extends TreeObject {
private ArrayList children;
+
public TreeParent(String name) {
super(name);
children = new ArrayList();
}
+
public void addChild(TreeObject child) {
children.add(child);
child.setParent(this);
}
+
public void removeChild(TreeObject child) {
children.remove(child);
child.setParent(null);
}
- public TreeObject [] getChildren() {
- return (TreeObject [])children.toArray(new TreeObject[children.size()]);
+
+ public TreeObject[] getChildren() {
+ return (TreeObject[]) children.toArray(new TreeObject[children
+ .size()]);
}
+
public boolean hasChildren() {
- return children.size()>0;
+ return children.size() > 0;
}
}
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
+ class ViewContentProvider implements IStructuredContentProvider,
+ ITreeContentProvider {
private TreeParent invisibleRoot;
public void inputChanged(Viewer v, Object oldInput, Object newInput) {
}
+
public void dispose() {
}
+
public Object[] getElements(Object parent) {
- if(parent instanceof List){
- return ((List)parent).toArray();
+ if (parent instanceof List) {
+ return ((List) parent).toArray();
}
return new Object[0];
}
+
public Object getParent(Object child) {
return null;
}
- public Object [] getChildren(Object parent) {
+
+ public Object[] getChildren(Object parent) {
if (parent instanceof Node) {
- return ((Node)parent).getChildren().toArray();
+ return ((Node) parent).getChildren().toArray();
}
return new Object[0];
}
+
public boolean hasChildren(Object parent) {
if (parent instanceof Node)
- return ((Node)parent).hasChildren();
+ return ((Node) parent).hasChildren();
return false;
}
}
+
class ViewLabelProvider extends LabelProvider {
public String getText(Object obj) {
- if (obj instanceof Node)
- {
- return ((Node)obj).getName();
+ if (obj instanceof Node) {
+ return ((Node) obj).getName();
}
return obj.toString();
}
+
public Image getImage(Object obj) {
String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
if (obj instanceof ProjectNode)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
+ imageKey = ISharedImages.IMG_OBJ_FOLDER;
+ return PlatformUI.getWorkbench().getSharedImages().getImage(
+ imageKey);
}
}
+
class NameSorter extends ViewerSorter {
}
@@ -173,50 +189,50 @@
}
/**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
+ * This is a callback that will allow us to create the viewer and initialize
+ * it.
*/
public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
-
+
viewer.setSorter(new NameSorter());
- viewer.setInput(loadResources());
// Create the help context id for the viewer's control
- PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.smooks.tools.testui.viewer");
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(),
+ "org.smooks.tools.testui.viewer");
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
-
- private List<Node> loadResources(){
+
+ private List<Node> loadResources() {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject[] projects = root.getProjects();
List<Node> list = new ArrayList<Node>();
for (int i = 0; i < projects.length; i++) {
IProject project = projects[i];
- if(isJavaProject(project)){
+ if (isJavaProject(project)) {
ProjectNode pn = new ProjectNode(project);
list.add(pn);
}
}
return list;
}
-
- private boolean isJavaProject(IProject p){
- boolean isJavaProject =false;
- if( p != null){
- try{
- if( p.hasNature(JavaCore.NATURE_ID)){
+
+ private boolean isJavaProject(IProject p) {
+ boolean isJavaProject = false;
+ if (p != null) {
+ try {
+ if (p.hasNature(JavaCore.NATURE_ID)) {
isJavaProject = true;
}
- }catch(Exception e){
-
- }finally{
+ } catch (Exception e) {
+
+ } finally {
return isJavaProject;
}
}
@@ -256,7 +272,7 @@
// Other plug-ins can contribute there actions here
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
-
+
private void fillLocalToolBar(IToolBarManager manager) {
manager.add(action1);
manager.add(action2);
@@ -273,9 +289,9 @@
};
action1.setText("Load Smooks issues");
action1.setToolTipText("Load Smooks issues and show them");
- action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
-
+ action1.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+
action2 = new Action() {
public void run() {
showMessage("Action 2 executed");
@@ -283,13 +299,26 @@
};
action2.setText("Action 2");
action2.setToolTipText("Action 2 tooltip");
- action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
- getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
+ action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));
doubleClickAction = new Action() {
public void run() {
ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection)selection).getFirstElement();
- showMessage("Double-click detected on "+obj.toString());
+ Object obj = ((IStructuredSelection) selection)
+ .getFirstElement();
+ if (obj instanceof SmooksNode) {
+ SmooksFileEditorInput input = new SmooksFileEditorInput(
+ ((SmooksNode) obj).getConfigFile());
+ try {
+ getSite()
+ .getWorkbenchWindow()
+ .getActivePage()
+ .openEditor(input,
+ "org.smooks.tools.testui.editors.MultiPageEditor");
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ }
}
};
}
@@ -301,11 +330,10 @@
}
});
}
+
private void showMessage(String message) {
- MessageDialog.openInformation(
- viewer.getControl().getShell(),
- "Sample View",
- message);
+ MessageDialog.openInformation(viewer.getControl().getShell(),
+ "Sample View", message);
}
/**
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestResultView.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestResultView.java 2009-02-24 16:15:44 UTC (rev 13774)
+++ workspace/dart/plugins/org.jboss.tools.smooks.testui/src/org/smooks/tools/testui/views/TestResultView.java 2009-02-24 16:27:17 UTC (rev 13775)
@@ -1,31 +0,0 @@
-/**
- *
- */
-package org.smooks.tools.testui.views;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
-
-/**
- * @author Dart
- *
- */
-public class TestResultView extends ViewPart {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
- @Override
- public void createPartControl(Composite parent) {
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
- @Override
- public void setFocus() {
-
- }
-
-}
15 years, 10 months
JBoss Tools SVN: r13774 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-02-24 11:15:44 -0500 (Tue, 24 Feb 2009)
New Revision: 13774
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java
Log:
code cleaning
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java 2009-02-24 16:14:55 UTC (rev 13773)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java 2009-02-24 16:15:44 UTC (rev 13774)
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.vpe.editor.template;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-/**
- * The Interface IEditableTemplate.
- *
- * @author Evgenij Stherbin
- * @deprecated
- */
-public interface IEditableTemplate {
-
- /**
- * Gets the output attribute node.
- *
- * @param element the element
- *
- * @return the output attribute node
- */
- public abstract Attr getOutputAttributeNode(Element element);
-}
15 years, 10 months