JBoss Tools SVN: r18259 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-10-23 08:09:25 -0400 (Fri, 23 Oct 2009)
New Revision: 18259
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5070 - enhance exception handling
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2009-10-23 11:54:35 UTC (rev 18258)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/ExecuteQueryAction.java 2009-10-23 12:09:25 UTC (rev 18259)
@@ -24,9 +24,11 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.swt.widgets.Event;
+import org.hibernate.HibernateException;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ImageConstants;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.QueryEditor;
import org.hibernate.eclipse.console.utils.EclipseImages;
@@ -60,14 +62,23 @@
protected void execute(QueryEditor queryEditor) {
ConsoleConfiguration cfg = queryEditor.getConsoleConfiguration();
- if(cfg!=null) {
+ if (cfg != null) {
if (!cfg.isSessionFactoryCreated()) {
if (queryEditor.askUserForConfiguration(cfg.getName())) {
- if(cfg.getConfiguration()==null) {
- cfg.build();
+ if (cfg.getConfiguration() == null) {
+ try {
+ cfg.build();
+ } catch (HibernateException he) {
+ HibernateConsolePlugin.getDefault().showError(
+ HibernateConsolePlugin.getShell(),
+ HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration +
+ ' ' + cfg.getName(), he);
+ }
}
- cfg.buildSessionFactory();
- queryEditor.executeQuery(cfg);
+ if (cfg.getConfiguration() != null) {
+ cfg.buildSessionFactory();
+ queryEditor.executeQuery(cfg);
+ }
}
} else {
queryEditor.executeQuery(cfg);
14 years, 8 months
JBoss Tools SVN: r18258 - branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-10-23 07:54:35 -0400 (Fri, 23 Oct 2009)
New Revision: 18258
Added:
branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
Modified:
branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5072
Added: branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
===================================================================
--- branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java (rev 0)
+++ branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java 2009-10-23 11:54:35 UTC (rev 18258)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.common.projecttemplates;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class JarVersionObserver {
+ static String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
+ File folder;
+ Set<File> existedJars = new HashSet<File>();
+ Map<File, JarVersionObserver> children = new HashMap<File, JarVersionObserver>();
+
+ public JarVersionObserver(File f) {
+ folder = f;
+ init();
+ }
+
+ public boolean containsJars() {
+ return !existedJars.isEmpty() || !children.isEmpty();
+ }
+
+ private void init() {
+ if(!folder.isDirectory()) return;
+ File[] fs = folder.listFiles();
+ if(fs == null) return;
+ for (File f: fs) {
+ if(f.isDirectory()) {
+ JarVersionObserver c = new JarVersionObserver(f);
+ if(!c.containsJars()) continue;
+ children.put(f, c);
+ } else if(f.isFile()) {
+ String n = f.getName();
+ if(n.toLowerCase().endsWith(JAR_SUFFIX)) {
+ existedJars.add(f);
+ }
+ }
+ }
+ }
+
+ public void execute() {
+ File[] fs = folder.listFiles();
+ if(fs == null) return;
+ Set<File> oldJars = new HashSet<File>();
+ Set<File> newJars = new HashSet<File>();
+ for (File f: fs) {
+ if(f.isDirectory()) {
+ JarVersionObserver c = children.get(f);
+ if(c != null) c.execute();
+ } else if(f.isFile()) {
+ String n = f.getName();
+ if(n.toLowerCase().endsWith(JAR_SUFFIX)) {
+ if(!existedJars.contains(f)) {
+ newJars.add(f);
+ } else {
+ oldJars.add(f);
+ }
+ }
+ }
+ }
+ filter(oldJars, newJars);
+ }
+
+ public void filter(Set<File> oldJars, Set<File> newJars) {
+ if(oldJars.isEmpty() || newJars.isEmpty()) return;
+ for (File f: newJars) {
+ String n1 = f.getName().substring(0, f.getName().length() - JAR_SUFFIX.length());
+ Iterator<File> it = oldJars.iterator();
+ while(it.hasNext()) {
+ File o = it.next();
+ String n2 = o.getName().substring(0, o.getName().length() - JAR_SUFFIX.length());
+ if(areEqualNamesOfDifferentVersions(n1, n2)) {
+ it.remove();
+ o.delete();
+ }
+ }
+ }
+ }
+
+ static boolean areEqualNamesOfDifferentVersions(String n1, String n2) {
+ int d1 = n1.lastIndexOf('-');
+ int d2 = n2.lastIndexOf('-');
+ String base1 = d1 < 0 ? n1 : n1.substring(0, d1);
+ String base2 = d2 < 0 ? n2 : n2.substring(0, d2);
+ if(!base1.equals(base2)) return false;
+ String regex = "([0-9]+\\.)+([^\\.]+)"; //$NON-NLS-1$
+ boolean isVersion1 = d1 < 0 || n1.substring(d1 + 1).matches(regex);
+ boolean isVersion2 = d2 < 0 || n2.substring(d2 + 1).matches(regex);
+
+ return isVersion1 && isVersion2;
+ }
+
+}
Property changes on: branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java
===================================================================
--- branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java 2009-10-23 11:19:32 UTC (rev 18257)
+++ branches/jbosstools-3.1.0.M4/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java 2009-10-23 11:54:35 UTC (rev 18258)
@@ -50,7 +50,8 @@
void copyProjectTemplates() throws IOException {
Bundle bundle = Platform.getBundle(PLUGIN_ID);
File location = Platform.getStateLocation(bundle).toFile();
- File install = FileLocator.getBundleFile(bundle);
+ File install = FileLocator.getBundleFile(bundle);
+ JarVersionObserver jarVersionObserver = new JarVersionObserver(location);
if(install.isDirectory()) {
FileFilter filter = new FileFilter() {
public boolean accept(File pathname) {
@@ -59,6 +60,7 @@
&& !".svn".equalsIgnoreCase(pathname.getName()); //$NON-NLS-1$
}
};
+
copy(location, install, "templates", filter); //$NON-NLS-1$
copy(location, install, "lib", filter); //$NON-NLS-1$
} else {
@@ -66,6 +68,7 @@
unzip.execute(location, "templates.*"); //$NON-NLS-1$
unzip.execute(location, "lib.*"); //$NON-NLS-1$
}
+ jarVersionObserver.execute();
}
private void copy(File location, File install, String name, FileFilter filter) {
14 years, 8 months
JBoss Tools SVN: r18257 - trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-10-23 07:19:32 -0400 (Fri, 23 Oct 2009)
New Revision: 18257
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5072
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java 2009-10-23 11:19:32 UTC (rev 18257)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.common.projecttemplates;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class JarVersionObserver {
+ static String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
+ File folder;
+ Set<File> existedJars = new HashSet<File>();
+ Map<File, JarVersionObserver> children = new HashMap<File, JarVersionObserver>();
+
+ public JarVersionObserver(File f) {
+ folder = f;
+ init();
+ }
+
+ public boolean containsJars() {
+ return !existedJars.isEmpty() || !children.isEmpty();
+ }
+
+ private void init() {
+ if(!folder.isDirectory()) return;
+ File[] fs = folder.listFiles();
+ if(fs == null) return;
+ for (File f: fs) {
+ if(f.isDirectory()) {
+ JarVersionObserver c = new JarVersionObserver(f);
+ if(!c.containsJars()) continue;
+ children.put(f, c);
+ } else if(f.isFile()) {
+ String n = f.getName();
+ if(n.toLowerCase().endsWith(JAR_SUFFIX)) {
+ existedJars.add(f);
+ }
+ }
+ }
+ }
+
+ public void execute() {
+ File[] fs = folder.listFiles();
+ if(fs == null) return;
+ Set<File> oldJars = new HashSet<File>();
+ Set<File> newJars = new HashSet<File>();
+ for (File f: fs) {
+ if(f.isDirectory()) {
+ JarVersionObserver c = children.get(f);
+ if(c != null) c.execute();
+ } else if(f.isFile()) {
+ String n = f.getName();
+ if(n.toLowerCase().endsWith(JAR_SUFFIX)) {
+ if(!existedJars.contains(f)) {
+ newJars.add(f);
+ } else {
+ oldJars.add(f);
+ }
+ }
+ }
+ }
+ filter(oldJars, newJars);
+ }
+
+ public void filter(Set<File> oldJars, Set<File> newJars) {
+ if(oldJars.isEmpty() || newJars.isEmpty()) return;
+ for (File f: newJars) {
+ String n1 = f.getName().substring(0, f.getName().length() - JAR_SUFFIX.length());
+ Iterator<File> it = oldJars.iterator();
+ while(it.hasNext()) {
+ File o = it.next();
+ String n2 = o.getName().substring(0, o.getName().length() - JAR_SUFFIX.length());
+ if(areEqualNamesOfDifferentVersions(n1, n2)) {
+ it.remove();
+ o.delete();
+ }
+ }
+ }
+ }
+
+ static boolean areEqualNamesOfDifferentVersions(String n1, String n2) {
+ int d1 = n1.lastIndexOf('-');
+ int d2 = n2.lastIndexOf('-');
+ String base1 = d1 < 0 ? n1 : n1.substring(0, d1);
+ String base2 = d2 < 0 ? n2 : n2.substring(0, d2);
+ if(!base1.equals(base2)) return false;
+ String regex = "([0-9]+\\.)+([^\\.]+)"; //$NON-NLS-1$
+ boolean isVersion1 = d1 < 0 || n1.substring(d1 + 1).matches(regex);
+ boolean isVersion2 = d2 < 0 || n2.substring(d2 + 1).matches(regex);
+
+ return isVersion1 && isVersion2;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/JarVersionObserver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java 2009-10-23 08:37:21 UTC (rev 18256)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/src/org/jboss/tools/common/projecttemplates/ProjectTemplatesPlugin.java 2009-10-23 11:19:32 UTC (rev 18257)
@@ -50,7 +50,8 @@
void copyProjectTemplates() throws IOException {
Bundle bundle = Platform.getBundle(PLUGIN_ID);
File location = Platform.getStateLocation(bundle).toFile();
- File install = FileLocator.getBundleFile(bundle);
+ File install = FileLocator.getBundleFile(bundle);
+ JarVersionObserver jarVersionObserver = new JarVersionObserver(location);
if(install.isDirectory()) {
FileFilter filter = new FileFilter() {
public boolean accept(File pathname) {
@@ -59,6 +60,7 @@
&& !".svn".equalsIgnoreCase(pathname.getName()); //$NON-NLS-1$
}
};
+
copy(location, install, "templates", filter); //$NON-NLS-1$
copy(location, install, "lib", filter); //$NON-NLS-1$
} else {
@@ -66,6 +68,7 @@
unzip.execute(location, "templates.*"); //$NON-NLS-1$
unzip.execute(location, "lib.*"); //$NON-NLS-1$
}
+ jarVersionObserver.execute();
}
private void copy(File location, File install, String name, FileFilter filter) {
14 years, 8 months
JBoss Tools SVN: r18256 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-23 04:37:21 -0400 (Fri, 23 Oct 2009)
New Revision: 18256
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-905 - updating the 'Server Editor' section with the description of the Publishing section in the editor;
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2009-10-23 08:32:59 UTC (rev 18255)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2009-10-23 08:37:21 UTC (rev 18256)
@@ -730,7 +730,10 @@
server, it is most likely because your server is protected and hence you need to
fill the username/password fields with appropriate values.</para>
</tip>
-
+
+ <para>Under the <emphasis>
+ <property>Publishing</property></emphasis> section it' possible to disable/inable the automatic publishing of the changes in the workspace.</para>
+
<para>It should be pointed out that our server adapter by default tries to automatically
detect the ports it needs for integrating with a <property>JBoss Server</property>.
Sometimes it can though be relevant to override this automatic detection if you are
14 years, 8 months
JBoss Tools SVN: r18255 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-23 04:32:59 -0400 (Fri, 23 Oct 2009)
New Revision: 18255
Modified:
trunk/as/docs/reference/en/modules/quick_start.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-905 - adding the new section 'Publishing to JBoss Server';
Modified: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml 2009-10-23 08:32:00 UTC (rev 18254)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2009-10-23 08:32:59 UTC (rev 18255)
@@ -10,7 +10,7 @@
<table>
- <title>Key Functionality for JBoss Server</title>
+ <title>Key Functionality for JBoss AS and Archive Tools</title>
<tgroup cols="3">
<colspec colnum="1" align="left" colwidth="2*"/>
@@ -61,27 +61,18 @@
</tgroup>
</table>
-
+
+ <para>If you
+ already have installed JBoss server and runtime you can quickly learn how to configure, start,
+ stop the server, to know deployment and archiving processes. How to install runtimes and servers
+ read in the <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link>
+ chapter.</para>
+
+ <para>To start working with JBoss AS, select a <property>JBoss AS Perspective</property> via
+ <emphasis><property>Window > Open Perspective > Other > JBoss
+ AS</property>.</emphasis></para>
</section>
-
-
-
-
-
-
-
-
-
- <para> If you
- already have installed JBoss server and runtime you can quickly learn how to configure, start,
- stop the server, to know deployment and archiving processes. How to install runtimes and servers
- read in the <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link>
- chapter.</para>
- <para>To start working with JBoss AS, select a <property>JBoss AS Perspective</property> via
- <emphasis><property>Window > Open Perspective > Other > JBoss
- AS</property>.</emphasis></para>
-
<section id="starting">
<title>Starting JBoss Server</title>
@@ -264,13 +255,26 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Here, we have just performed the basic steps you should know to quick start with JBoss
- server. In fact, there are more functionalities which you can make use of. Further we will
- talk about them in detail.</para>
</section>
+
+ <section id="publishing">
+ <title>Publishing to JBoss Server</title>
+ <para>The publishing of all the modules added to a Server is performed automatically when starting a Server.</para>
+ <para>The automatic publish of the changes made to the workspace is turned on by default in order to permanently keep
+ the workspace in sync with the publish folder. If you need to control when to publish the changes,
+ just disable the automatic publish in the <link linkend="server_editor">Server Editor</link> and use the <emphasis>
+ <property>Publish to Server</property></emphasis> (<inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/publish_button.png"/>
+ </imageobject>
+ </inlinemediaobject>) button which initiates an incremental publish.
+ </para>
+
+ <para>Here, we have just performed the basic steps you should know to quick start with JBoss
+ server. In fact, there are more functionalities which you can make use of. Further we will
+ talk about them in detail.</para>
+ </section>
-
<section>
<title>Other relevant resources on the topic</title>
14 years, 8 months
JBoss Tools SVN: r18254 - trunk/as/docs/reference/en/images/perspective.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-23 04:32:00 -0400 (Fri, 23 Oct 2009)
New Revision: 18254
Modified:
trunk/as/docs/reference/en/images/perspective/perspective_4.png
trunk/as/docs/reference/en/images/perspective/perspective_5.png
Log:
https://jira.jboss.org/jira/browse/JBDS-905 - updating the images according to the new UI of the Server Editor;
Modified: trunk/as/docs/reference/en/images/perspective/perspective_4.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_5.png
===================================================================
(Binary files differ)
14 years, 8 months
JBoss Tools SVN: r18253 - trunk/as/docs/reference/en/images/quick_start.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-23 04:31:06 -0400 (Fri, 23 Oct 2009)
New Revision: 18253
Added:
trunk/as/docs/reference/en/images/quick_start/publish_button.png
Log:
https://jira.jboss.org/jira/browse/JBDS-905 - adding the image of the 'Publish to Server' button;
Added: trunk/as/docs/reference/en/images/quick_start/publish_button.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/publish_button.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 8 months
JBoss Tools SVN: r18252 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-10-23 03:58:10 -0400 (Fri, 23 Oct 2009)
New Revision: 18252
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
Log:
JBIDE-5074
Fix some bugs
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-10-23 07:57:57 UTC (rev 18251)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-10-23 07:58:10 UTC (rev 18252)
@@ -129,6 +129,8 @@
private Composite readerConfigComposite;
private ModelPanelCreator modelPanelCreator;
protected boolean lockCheck = false;
+ private Button removeInputDataButton;
+ private Button addInputDataButton;
public SmooksReaderFormPage(FormEditor editor, String id, String title) {
super(editor, id, title);
@@ -179,6 +181,8 @@
gridLayout.horizontalSpacing = 20;
gridLayout.makeColumnsEqualWidth = true;
form.getBody().setLayout(gridLayout);
+
+ refreshInputDataButtons();
}
private void createInputModelViewerSection(FormToolkit toolkit, Composite parent) {
@@ -501,7 +505,19 @@
return null;
}
+ private void refreshInputDataButtons() {
+ this.addInputDataButton.setEnabled(true);
+ this.removeInputDataButton.setEnabled(true);
+
+ String inputType = getSmooksGraphicsExtType().getInputType();
+ if (inputType == null || inputType.trim().equals("")) {
+ this.addInputDataButton.setEnabled(false);
+ this.removeInputDataButton.setEnabled(false);
+ }
+ }
+
private void readerChanged(Object reader) {
+
String type = getCurrentReaderType();
String oldType = this.getSmooksGraphicsExtType().getInputType();
@@ -549,6 +565,7 @@
inputDataViewer.refresh();
}
refreshInputModelView();
+ refreshInputDataButtons();
}
private void deactiveAllInputFile(CompoundCommand command) {
@@ -890,10 +907,10 @@
GridLayout l = new GridLayout();
buttonComposite.setLayout(l);
- Button addButton = toolkit.createButton(buttonComposite, "Add", SWT.FLAT);
+ addInputDataButton = toolkit.createButton(buttonComposite, "Add", SWT.FLAT);
gd = new GridData(GridData.FILL_HORIZONTAL);
- addButton.setLayoutData(gd);
- addButton.addSelectionListener(new SelectionAdapter() {
+ addInputDataButton.setLayoutData(gd);
+ addInputDataButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
showInputDataWizard();
@@ -901,10 +918,10 @@
});
- Button removeButton = toolkit.createButton(buttonComposite, "Delete", SWT.FLAT);
+ removeInputDataButton = toolkit.createButton(buttonComposite, "Delete", SWT.FLAT);
gd = new GridData(GridData.FILL_HORIZONTAL);
- removeButton.setLayoutData(gd);
- removeButton.addSelectionListener(new SelectionAdapter() {
+ removeInputDataButton.setLayoutData(gd);
+ removeInputDataButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
IStructuredSelection selection = (IStructuredSelection) inputDataViewer.getSelection();
@@ -964,12 +981,13 @@
wizard.setForcePreviousAndNextButtons(true);
StructuredDataSelectionWizardDailog dialog = new StructuredDataSelectionWizardDailog(getEditorSite()
.getShell(), wizard, getSmooksGraphicsExtType());
-
+
if (dialog.show() == Dialog.OK) {
String type = dialog.getType();
String path = dialog.getPath();
Properties pros = dialog.getProperties();
- inputTypes = SmooksUIUtils.recordInputDataInfomation(getEditingDomain(), null, extType, type, path, pros);
+ inputTypes = SmooksUIUtils.recordInputDataInfomation(getEditingDomain(), null, extType, type, path,
+ pros);
}
} else {
IStructuredDataSelectionWizard wizard = ViewerInitorStore.getInstance().getStructuredDataCreationWizard(
@@ -979,13 +997,19 @@
if (dialog.open() == Dialog.OK) {
String path = wizard.getStructuredDataSourcePath();
Properties pros = wizard.getProperties();
- inputTypes = SmooksUIUtils.recordInputDataInfomation(getEditingDomain(), null, extType, inputType, path, pros);
+ inputTypes = SmooksUIUtils.recordInputDataInfomation(getEditingDomain(), null, extType, inputType,
+ path, pros);
}
}
-
- if(inputTypes != null && !inputTypes.isEmpty()){
+
+ if (inputTypes != null && !inputTypes.isEmpty()) {
+ InputType addedInputType = inputTypes.get(0);
deactiveAllInputFile(null);
- setInputDataActiveStatus(true, inputTypes.get(0), null);
+ if (inputType.equals(SmooksModelUtils.INPUT_TYPE_CUSTOME)) {
+ // don't active the input file
+ } else {
+ setInputDataActiveStatus(true, addedInputType, null);
+ }
}
}
@@ -998,8 +1022,8 @@
}
public void inputTypeChanged(SmooksGraphicsExtType extType) {
-// if (inputDataViewer != null)
-// inputDataViewer.refresh();
+ if (inputDataViewer != null)
+ inputDataViewer.refresh();
refreshInputModelView();
}
14 years, 8 months
JBoss Tools SVN: r18251 - trunk/smooks/features/org.jboss.tools.smooks.test.feature.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-10-23 03:57:57 -0400 (Fri, 23 Oct 2009)
New Revision: 18251
Modified:
trunk/smooks/features/org.jboss.tools.smooks.test.feature/feature.xml
Log:
JBIDE-5074
Fix some bugs
Modified: trunk/smooks/features/org.jboss.tools.smooks.test.feature/feature.xml
===================================================================
--- trunk/smooks/features/org.jboss.tools.smooks.test.feature/feature.xml 2009-10-23 07:54:05 UTC (rev 18250)
+++ trunk/smooks/features/org.jboss.tools.smooks.test.feature/feature.xml 2009-10-23 07:57:57 UTC (rev 18251)
@@ -21,7 +21,6 @@
id="org.jboss.tools.smooks.core.test"
download-size="0"
install-size="0"
- version="0.0.0"
- unpack="false"/>
+ version="0.0.0"/>
</feature>
14 years, 8 months
JBoss Tools SVN: r18250 - workspace/Denny/esb-example.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-10-23 03:54:05 -0400 (Fri, 23 Oct 2009)
New Revision: 18250
Modified:
workspace/Denny/esb-example/helloworld_testclient.zip
Log:
JBIDE-4016:Small mistakes in ESB Examples
Modified: workspace/Denny/esb-example/helloworld_testclient.zip
===================================================================
(Binary files differ)
14 years, 8 months