JBoss Tools SVN: r2758 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.mozilla/src/org/jboss/tools/vpe/mozilla/browser.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-07-31 10:03:46 -0400 (Tue, 31 Jul 2007)
New Revision: 2758
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.mozilla/src/org/jboss/tools/vpe/mozilla/browser/MozillaBrowser.java
Log:
merge with HEAD revision
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.mozilla/src/org/jboss/tools/vpe/mozilla/browser/MozillaBrowser.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.mozilla/src/org/jboss/tools/vpe/mozilla/browser/MozillaBrowser.java 2007-07-31 13:59:01 UTC (rev 2757)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.mozilla/src/org/jboss/tools/vpe/mozilla/browser/MozillaBrowser.java 2007-07-31 14:03:46 UTC (rev 2758)
@@ -2213,6 +2213,9 @@
if (rc != XPCOM.NS_OK) error(rc);
baseWindow.Release();
+ //set focus current widget
+ super.setFocus();
+
return XPCOM.NS_OK;
}
17 years, 5 months
JBoss Tools SVN: r2757 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-07-31 09:59:01 -0400 (Tue, 31 Jul 2007)
New Revision: 2757
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
context changes
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-07-31 13:30:29 UTC (rev 2756)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-07-31 13:59:01 UTC (rev 2757)
@@ -121,9 +121,11 @@
</orderedlist>
<programlisting role="JAVA"><![CDATA[java -jar jems-installer-1.2.0.GA.jar
]]></programlisting>
-<para>This will start the installation wizard and in the first window you will be proposed to choose a language for install instructions:</para>
+<para>This will start the installation wizard and in the first screen you will be proposed to choose a language for install
+ instructions. This screen only selects the language that the installer will display choices in and has no effect on the
+language used by JBoss or the applications deployed in JBoss.</para>
<figure>
-<title>Choose your language</title>
+<title>The installer language selection screen</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/chooselanguage.png"/>
@@ -136,20 +138,20 @@
<listitem><para>In the following window accept the license agreement and press the Next button.</para></listitem>
</orderedlist>
<figure>
-<title>Accept the license</title>
+<title>Accepting the license</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/licenseagreement.png"/>
</imageobject>
</mediaobject>
</figure>
-
+<para>The installer will ask for the directory to use for the installation. The installer does not write the installation directory into any of the scripts or into any form of registry, so you will be free to move or rename the JBoss installation directory after installation. On Linux platform installation directories that contains spaces can cause problems, so we recommend sticking to simple directory names.</para>
<orderedlist continuation="continues">
<listitem><para>Choose the place where JBoss server will be installed and click Next.</para></listitem>
</orderedlist>
<figure>
-<title>Choosing installation path</title>
+<title>Selecting the installation directory</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/choosinglocation.png"/>
@@ -157,24 +159,31 @@
</mediaobject>
</figure>
<orderedlist continuation="continues">
-<listitem><para>On the next step select server profile.</para></listitem>
+<listitem><para>On the next step you are able to select the starting server configuration set.</para></listitem>
</orderedlist>
<figure>
-<title>Selecting server profile</title>
+<title>Selecting the installation group</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/ejbprofile.png"/>
</imageobject>
</mediaobject>
</figure>
-
+<para>The starting configuration determines which sets of packages are available for installation. After selecting the configuration set, you have the option to further customize the installation, customizing the set of services installed.
+The next screen shows the package selection screen. The installer knows the dependencies between services and will not allow
+ you to configure services in an incompatible way. This is much safer than the trial and error approach of configuring
+services by hand from a raw ZIP install. When choosing configuration sets, be aware that you can not add packages that are
+not a part of the selected configuration set. If you wanted a simple web container (the tomcat configuration) that also had
+JMS support (the jms configuration), it would be necessary to go to a larger configuration, such as the default configuration,
+ and remove the unwanted packages. There are some combinations of JEMS components that are not supported directly through the
+ installer.</para>
<orderedlist continuation="continues">
-<listitem><para>In the following window choose packs you want to be installed and click Next.</para></listitem>
+<listitem><para>Choose packs you want to be installed and click Next.</para></listitem>
</orderedlist>
<figure>
-<title>Selecting installing packs</title>
+<title>Selecting the packages to install</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/selectingpacks.png"/>
@@ -193,13 +202,17 @@
</imageobject>
</mediaobject>
</figure>
+<para>When all this is done you will be asked to confirm your installation.</para>
<orderedlist continuation="continues">
-<listitem><para>When all this is done you will see the information dialog with installation settings. Click the Next button to start installation.</para></listitem>
+<listitem><para>Click the Next button to start installation.</para></listitem>
</orderedlist>
<orderedlist continuation="continues">
<listitem><para>After installation process is complete click the button Next > Done.</para></listitem>
</orderedlist>
-<para>That's it. JBoss server is installed. Now you should add it to server manager in Red Hat Developer Studio.</para>
+<para>That's it. JBoss server is installed. Your JBoss installation can be found in the directory that you specified at
+the beginning of the install. The installer image may contain different services than the archive distribution, depending on
+ the type of installation performed. However, the basic structure and layout of all JBoss instances are the same.</para>
+<para>Now you should add JBoss AS to server manager in Red Hat Developer Studio.</para>
</section>
<section id="AddingJBossServer">
17 years, 5 months
JBoss Tools SVN: r2756 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-07-31 09:30:29 -0400 (Tue, 31 Jul 2007)
New Revision: 2756
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/TextUtil.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/OrmShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
Log:
JBIDE-628: table names handled badly in diagram
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/META-INF/MANIFEST.MF 2007-07-31 13:30:29 UTC (rev 2756)
@@ -14,10 +14,10 @@
org.eclipse.ui.editors,
org.eclipse.core.resources,
org.hibernate.eclipse,
- org.jboss.tools.hibernate.ui.view,
org.jboss.tools.common,
org.eclipse.jdt.core,
- org.jboss.tools.common.model
+ org.jboss.tools.common.model,
+ org.jboss.tools.hibernate.ui.view
Bundle-Version: 2.0.0
Export-Package: org.jboss.tools.hibernate.ui.veditor,
org.jboss.tools.hibernate.ui.veditor.editors,
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -48,6 +48,7 @@
import org.hibernate.type.Type;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.hibernate.ui.veditor.VisualEditorPlugin;
+import org.jboss.tools.hibernate.ui.view.views.TextUtil;
public class OrmDiagram extends ModelElement {
@@ -143,8 +144,7 @@
} else if (ormElement instanceof Table) {
ormShape = new OrmShape(ormElement);
getChildren().add(ormShape);
- Table table = (Table)ormElement;
- elements.put(table.getSchema() + "." + table.getName(), ormShape);
+ elements.put(TextUtil.getTableName((Table)ormElement), ormShape);
} else if (ormElement instanceof Property) {
SpecialRootClass specialRootClass = new SpecialRootClass((Property)ormElement);
ormShape = new SpecialOrmShape(specialRootClass);
@@ -163,8 +163,7 @@
if (ormElement instanceof RootClass) {
ormShape = elements.get(((RootClass)ormElement).getEntityName());
} else if (ormElement instanceof Table) {
- Table table = (Table)ormElement;
- ormShape = elements.get(table.getSchema() + "." + table.getName());
+ ormShape = elements.get(TextUtil.getTableName((Table)ormElement));
} else if (ormElement instanceof Property) {
SpecialRootClass specialRootClass = new SpecialRootClass((Property)ormElement);
ormShape = elements.get(specialRootClass.getEntityName());
@@ -184,7 +183,7 @@
if(componentClassDatabaseTable == null && persistentClass.getTable() != null)
componentClassDatabaseTable = persistentClass.getTable();
if(componentClassDatabaseTable != null) {
- shape = elements.get(componentClassDatabaseTable.getSchema() + "." + componentClassDatabaseTable.getName());
+ shape = elements.get(TextUtil.getTableName(componentClassDatabaseTable));
if (shape == null) shape = getOrCreateDatabaseTable(componentClassDatabaseTable);
createConnections(classShape, shape);
if(!isConnectionExist(classShape, shape)){
@@ -264,7 +263,7 @@
private OrmShape getOrCreateDatabaseTable(Table databaseTable){
OrmShape tableShape = null;
if(databaseTable != null) {
- String tableName = databaseTable.getSchema() + "." + databaseTable.getName();
+ String tableName = TextUtil.getTableName(databaseTable);
tableShape = (OrmShape)elements.get(tableName);
if(tableShape == null) {
tableShape = createShape(databaseTable);
@@ -534,8 +533,7 @@
if (element instanceof RootClass) {
key = ((RootClass)element).getEntityName();
} else if (element instanceof Table) {
- Table table = (Table)element;
- key = table.getSchema() + "." + table.getName();
+ key = TextUtil.getTableName((Table)element);
} else if (element instanceof Property) {
Property property = (Property)element;
key = property.getPersistentClass().getEntityName() + "." + property.getName();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/DiagramEditPart.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -54,6 +54,7 @@
import org.jboss.tools.hibernate.ui.veditor.editors.model.Shape;
import org.jboss.tools.hibernate.ui.veditor.editors.model.SpecialOrmShape;
import org.jboss.tools.hibernate.ui.veditor.editors.model.SpecialRootClass;
+import org.jboss.tools.hibernate.ui.view.views.TextUtil;
class DiagramEditPart extends OrmEditPart implements PropertyChangeListener {
@@ -128,8 +129,7 @@
tempPoint = 40 + getChildrenFigurePreferredHeight(ormShape);
}
Table table = persistentClass.getTable();
- ormShape = (OrmShape) hashMap.remove(table.getSchema() + "."
- + table.getName());
+ ormShape = (OrmShape) hashMap.remove(TextUtil.getTableName(table));
if (ormShape != null) {
ormShape.setLocation(new Point(pointX, 20));
point = 40 + getChildrenFigurePreferredHeight(ormShape);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/OrmShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/OrmShapeEditPart.java 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/OrmShapeEditPart.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -61,8 +61,7 @@
if (element instanceof RootClass) {
text = ormLabelProvider.getText((PersistentClass)element);
} else if (element instanceof Table) {
- Table table = (Table)element;
- text = table.getSchema() + "." + table.getName();
+ text = ormLabelProvider.getText((Table)element);
} else if (element instanceof Subclass) {
text = ormLabelProvider.getText((Subclass)element);
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmLabelProvider.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -84,6 +84,13 @@
} else {
return name;
}
+ } else if (element instanceof Table) {
+ String name = (String)ormModelNameVisitor.visitTable((Table)element, null);
+ if (name == null) {
+ return "OrmElement";
+ } else {
+ return name;
+ }
} else if (element instanceof Subclass) {
String name = (String)ormModelNameVisitor.visitPersistentClass((Subclass)element, null);
if (name == null) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-07-31 13:17:39 UTC (rev 2755)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OrmModelNameVisitor.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -13,6 +13,7 @@
import java.sql.Types;
import java.util.ResourceBundle;
import org.eclipse.jdt.core.Signature;
+import org.eclipse.jface.text.TextUtilities;
import org.eclipse.jface.viewers.ContentViewer;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
@@ -23,10 +24,6 @@
import org.hibernate.mapping.Subclass;
import org.hibernate.mapping.Table;
-/**
- * @author Tau from Minsk
- *
- */
public class OrmModelNameVisitor /*implements IOrmModelVisitor*/ {
private ContentViewer viewer;
@@ -484,7 +481,7 @@
Table table = clazz.getTable(); // upd tau 06.06.2005
//IDatabaseTable table = HibernateAutoMappingHelper.getPrivateTable(classMapping); // upd tau 18.04.2005
if (table != null) {
- String tableName = table.getName();
+ String tableName = TextUtil.getTableName(table);
if (tableName != null) {
//name.append(" (");
name.append(POINTER);
@@ -496,6 +493,12 @@
return name.toString();
}
+ public Object visitTable(Table table, Object argument) {
+ StringBuffer name = new StringBuffer();
+ name.append(TextUtil.getTableName(table));
+ return name.toString();
+ }
+
public Object visitPersistentClass(Subclass clazz, Object argument) {
StringBuffer name = new StringBuffer();
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/TextUtil.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/TextUtil.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/TextUtil.java 2007-07-31 13:30:29 UTC (rev 2756)
@@ -0,0 +1,11 @@
+package org.jboss.tools.hibernate.ui.view.views;
+
+import org.hibernate.mapping.Table;
+
+public class TextUtil {
+ public static String getTableName(Table table) {
+ String schema = table.getSchema();
+ String catalog = table.getCatalog();
+ return (schema != null ? schema + "." : "") + (catalog != null ? catalog + "." : "") + table.getName();
+ }
+}
17 years, 5 months
JBoss Tools SVN: r2755 - trunk/documentation/GettingStartedGuide/docs/userguide/en/images.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-07-31 09:17:39 -0400 (Tue, 31 Jul 2007)
New Revision: 2755
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
Log:
images modified
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
===================================================================
(Binary files differ)
17 years, 5 months
JBoss Tools SVN: r2754 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-31 08:54:53 -0400 (Tue, 31 Jul 2007)
New Revision: 2754
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/FacetObjectImpl.java
Log:
JBIDE-548 Renderer can have an attribute and a facet with the same name
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/FacetObjectImpl.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/FacetObjectImpl.java 2007-07-31 12:51:44 UTC (rev 2753)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/impl/FacetObjectImpl.java 2007-07-31 12:54:53 UTC (rev 2754)
@@ -16,7 +16,10 @@
private static final long serialVersionUID = 534845753792987818L;
public String name() {
- return "" + getAttributeValue("facet-name");
+ return "facet:" + getAttributeValue("facet-name");
}
+ public String getPresentationString() {
+ return "" + getAttributeValue("facet-name");
+ }
}
17 years, 5 months
JBoss Tools SVN: r2753 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-07-31 08:51:44 -0400 (Tue, 31 Jul 2007)
New Revision: 2753
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossname.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/EXIN-401 images added
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/configuringprojects.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossname.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/jbossname.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newjbossserver.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-07-31 12:28:41 UTC (rev 2752)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-07-31 12:51:44 UTC (rev 2753)
@@ -234,6 +234,7 @@
<note>
<title>Note:</title>
<para>When adding a new server you will need to specify what JRE to use. It is important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web applications, JRE will not be enough.</para>
+</note>
<orderedlist continuation="continues">
<listitem><para>In the following window give a name to a new server. After that press Next.</para></listitem>
</orderedlist>
@@ -246,7 +247,7 @@
</mediaobject>
</figure>
- </note>
+
<orderedlist continuation="continues">
<listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click Finish.</para></listitem>
</orderedlist>
17 years, 5 months
JBoss Tools SVN: r2752 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-31 08:28:41 -0400 (Tue, 31 Jul 2007)
New Revision: 2752
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/PropertyEditorFactory.java
Log:
JBIDE-599
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/PropertyEditorFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/PropertyEditorFactory.java 2007-07-31 12:12:18 UTC (rev 2751)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/PropertyEditorFactory.java 2007-07-31 12:28:41 UTC (rev 2752)
@@ -27,7 +27,7 @@
public class PropertyEditorFactory {
public static final String ATTRIBUTE_EDITOR_EXT_POINT = "org.jboss.tools.common.model.ui.attributeEditor";
- private static Map<String,Class> classes = new HashMap<String,Class>();
+ private static Map<String,Class<?>> classes = new HashMap<String,Class<?>>();
private static IWidgetSettings settings = new DefaultSettings();
public PropertyEditorFactory() {}
@@ -62,7 +62,12 @@
propertyEditor = new StringEditor(settings);
}
String labelText = WizardKeys.getAttributeDisplayName(attribute, true);
- labelText += ":";
+ String editorName = attribute.getEditor().getName();
+ if(!"CheckBox".equals(editorName) && !"ListRadio".equals(editorName)) {
+ //Note: If later there appear more cases of editors that do not need ':'
+ //it will be better to add a property to extension point for field editors.
+ labelText += ":";
+ }
if(required) labelText += "*";
propertyEditor.setLabelText(labelText);
@@ -70,14 +75,14 @@
return propertyEditor;
}
- private static Class getEditorClass(XAttribute attribute) {
+ private static Class<?> getEditorClass(XAttribute attribute) {
return getEditorClass(attribute.getEditor().getName());
}
static Set<String> defaultEditorIds = new HashSet<String>();
- private static Class getEditorClass(String id) {
- Class c = (Class)classes.get(id);
+ private static Class<?> getEditorClass(String id) {
+ Class<?> c = classes.get(id);
if(c != null) return c;
try {
c = ExtensionPointUtil.findClassByElementId(ATTRIBUTE_EDITOR_EXT_POINT, id).getClass();
17 years, 5 months
JBoss Tools SVN: r2751 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-31 08:12:18 -0400 (Tue, 31 Jul 2007)
New Revision: 2751
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java
Log:
JBIDE-573 Transition to selected element is run in Display.asyncExec()
to let event loop complete processing current selected widget.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java 2007-07-31 12:01:53 UTC (rev 2750)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/TableStructuredFieldEditor.java 2007-07-31 12:12:18 UTC (rev 2751)
@@ -188,8 +188,12 @@
public void mouseDoubleClick(MouseEvent e) {
if(getActionProvider() == null) return;
- IAction action = getActionProvider().getAction(TableStructuredEditor.DOUBLE_CLICK__ACTION);
- if (action!=null) action.run();
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ IAction action = getActionProvider().getAction(TableStructuredEditor.DOUBLE_CLICK__ACTION);
+ if (action!=null) action.run();
+ }
+ });
}
public void mouseDown(MouseEvent e) {
17 years, 5 months
JBoss Tools SVN: r2750 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors: parts and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-31 08:01:53 -0400 (Tue, 31 Jul 2007)
New Revision: 2750
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java 2007-07-31 11:07:49 UTC (rev 2749)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/ExpandeableShape.java 2007-07-31 12:01:53 UTC (rev 2750)
@@ -22,7 +22,7 @@
public static final String SHOW_REFERENCES = "show references";
- protected boolean refHide = true;
+ public boolean refHide = true;
protected boolean first=false;
private OrmShape reference=null;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-31 11:07:49 UTC (rev 2749)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2007-07-31 12:01:53 UTC (rev 2750)
@@ -557,7 +557,7 @@
}else if(shape instanceof ExpandeableShape){
state = getState(properties, (Shape)shape);
if(!state)
- ((ExpandeableShape)shape).refreshReferences(this);
+ ((ExpandeableShape)shape).refHide = false;
}
for(int i=0;i<shape.getChildren().size();i++){
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-31 11:07:49 UTC (rev 2749)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ComponentShapeEditPart.java 2007-07-31 12:01:53 UTC (rev 2750)
@@ -56,10 +56,11 @@
}
}
- public void addNotify() {
- super.addNotify();
- if(!((ExpandeableShape)getModel()).isReferenceVisible()){
- int i = figure.getPreferredSize().width;
+ public void activate() {
+ super.activate();
+ if(this.getClass().equals(ComponentShapeEditPart.class) && !((ExpandeableShape)getModel()).isReferenceVisible()){
+ ((ComponentShape)getModel()).refreshChildsHiden(((OrmDiagram)getViewer().getContents().getModel()));
+ /*int i = figure.getPreferredSize().width;
((ComponentFigure)figure).setChildsHiden(true);
figure.setSize(i,-1);
@@ -68,7 +69,7 @@
refreshReference((ExpandeableShape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
- ((OrmShape)getParent().getModel()).refreshReference();
+ ((OrmShape)getParent().getModel()).refreshReference();*/
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-31 11:07:49 UTC (rev 2749)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-31 12:01:53 UTC (rev 2750)
@@ -53,11 +53,13 @@
}
}
- public void addNotify() {
- super.addNotify();
- if(!((ExpandeableShape)getModel()).isReferenceVisible()){
- refreshReferences((Shape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
- ((TitleLabel)getFigure()).setHidden(!((ExpandeableShape)getCastedModel()).isReferenceVisible());
+ public void activate() {
+ super.activate();
+ if(this.getClass().equals(ExpandeableShapeEditPart.class) && !((ExpandeableShape)getModel()).isReferenceVisible()){
+ ((ExpandeableShape)getModel()).refHide = true;
+ ((ExpandeableShape)getModel()).refreshReferences(getViewer().getContents().getModel());
+ //refreshReferences((Shape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
+ //((TitleLabel)getFigure()).setHidden(true);
}
}
@@ -80,12 +82,8 @@
((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new RGB(0,0,0)));
}
}else if (ExpandeableShape.SHOW_REFERENCES.equals(prop)) {
- //referenceList.add((OrmShape)getCastedModel().getParent());
- //refreshReference((ExpandeableShape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
refreshReferences((Shape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
((TitleLabel)getFigure()).setHidden(!((ExpandeableShape)getCastedModel()).isReferenceVisible());
-// ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
-// ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new RGB(255,255,255)));
} else {
super.propertyChange(evt);
}
17 years, 5 months
JBoss Tools SVN: r2749 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core: scanner and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-31 07:07:49 -0400 (Tue, 31 Jul 2007)
New Revision: 2749
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/ScannerException.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/IFileScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
EXIN-217 - Most exceptions in throw/catch narrowed.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -41,7 +41,7 @@
}
try {
this.scopeType = scope == null || scope.length() == 0 ? ScopeType.UNSPECIFIED : ScopeType.valueOf(scope.toUpperCase());
- } catch (Exception e) {
+ } catch (IllegalArgumentException e) {
//ignore
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -92,7 +92,7 @@
if(s == null || s.length() == 0) continue;
try {
return Integer.valueOf(s);
- } catch (Exception e) {
+ } catch (NumberFormatException e) {
//ignore here
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -64,7 +64,7 @@
} else {
try {
scopeType = ScopeType.valueOf(scope.toUpperCase());
- } catch (Exception e) {
+ } catch (IllegalArgumentException e) {
scopeType = ScopeType.UNSPECIFIED;
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -132,11 +132,7 @@
public void resolveStorage(boolean load) {
if(isStorageResolved) return;
if(load) {
- try {
- load();
- } catch (Exception e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
+ load();
} else {
isStorageResolved = true;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -7,7 +7,10 @@
import java.util.Map;
import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.FindObjectHelper;
@@ -92,17 +95,17 @@
public void open() {
if(id instanceof XModelObject) {
XModelObject o = (XModelObject)id;
- try {
- FindObjectHelper.findModelObject(o, FindObjectHelper.IN_EDITOR_ONLY);
- } catch(Exception e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
+ FindObjectHelper.findModelObject(o, FindObjectHelper.IN_EDITOR_ONLY);
} else if(getResource() instanceof IFile) {
IFile f = (IFile)getResource();
try {
- IWorkbenchPage page = SeamCorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IWorkbench workbench = SeamCorePlugin.getDefault().getWorkbench();
+ if(workbench == null) return;
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ if(window == null) return;
+ IWorkbenchPage page = window.getActivePage();
if(page != null) IDE.openEditor(page, f);
- } catch(Exception e) {
+ } catch(PartInitException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -41,7 +41,7 @@
if(scope == null || scope.length() == 0) return ScopeType.UNSPECIFIED;
try {
return ScopeType.valueOf(scope.toUpperCase());
- } catch (Exception e) {
+ } catch (IllegalArgumentException e) {
return ScopeType.UNSPECIFIED;
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/IFileScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/IFileScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/IFileScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -34,8 +34,8 @@
* Loading components declared in resource.
* @param f
* @return
- * @throws Exception
+ * @throws ScannerException
*/
- public LoadedDeclarations parse(IFile f) throws Exception;
+ public LoadedDeclarations parse(IFile f) throws ScannerException;
}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/ScannerException.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/ScannerException.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/ScannerException.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -0,0 +1,17 @@
+package org.jboss.tools.seam.internal.core.scanner;
+
+public class ScannerException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public ScannerException() {
+ }
+
+ public ScannerException(Throwable cause) {
+ super(cause);
+ }
+
+ public ScannerException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -18,6 +18,7 @@
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.ASTVisitor;
@@ -299,8 +300,13 @@
if(!name.equals(ms[i].getElementName())) continue;
int s = m.getStartPosition() + m.getLength() / 2;
try {
- int b = ms[i].getSourceRange().getOffset();
- int e = b + ms[i].getSourceRange().getLength();
+ ISourceRange range = ms[i].getSourceRange();
+ if(range == null) {
+ //no source and we cannot check position.
+ return ms[i];
+ }
+ int b = range.getOffset();
+ int e = b + range.getLength();
if(s >= b && s <= e) return ms[i];
} catch (JavaModelException e) {
return ms[i];
@@ -325,8 +331,13 @@
if(!name.equals(fs[i].getElementName())) continue;
int s = f.getStartPosition() + f.getLength() / 2;
try {
- int b = fs[i].getSourceRange().getOffset();
- int e = b + fs[i].getSourceRange().getLength();
+ ISourceRange range = fs[i].getSourceRange();
+ if(range == null) {
+ //no source and we cannot check position.
+ return fs[i];
+ }
+ int b = range.getOffset();
+ int e = b + range.getLength();
if(s >= b && s <= e) return fs[i];
} catch (JavaModelException e) {
return fs[i];
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
@@ -28,6 +29,7 @@
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
/**
* This object collects changes in target that should be fired to listeners.
@@ -70,10 +72,15 @@
* TODO change return type
* @param f
* @return
- * @throws Exception
+ * @throws ScannerException
*/
- public LoadedDeclarations parse(IFile f) throws Exception {
- ICompilationUnit u = getCompilationUnit(f);
+ public LoadedDeclarations parse(IFile f) throws ScannerException {
+ ICompilationUnit u = null;
+ try {
+ u = getCompilationUnit(f);
+ } catch (CoreException e) {
+ throw new ScannerException("Cannot get compilation unit for " + f, e);
+ }
if(u == null) return null;
ASTRequestorImpl requestor = new ASTRequestorImpl(f);
ICompilationUnit[] us = new ICompilationUnit[]{u};
@@ -81,7 +88,7 @@
return requestor.getDeclarations();
}
- private ICompilationUnit getCompilationUnit(IFile f) throws Exception {
+ private ICompilationUnit getCompilationUnit(IFile f) throws CoreException {
IProject project = f.getProject();
IJavaProject javaProject = (IJavaProject)project.getNature(JavaCore.NATURE_ID);
IResource[] rs = EclipseResourceUtil.getJavaSourceRoots(project);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -22,6 +22,7 @@
import java.util.Set;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathContainer;
@@ -38,6 +39,7 @@
import org.jboss.tools.seam.internal.core.InnerModelHelper;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
/**
* Monitors class path of project and loads seam components of it.
@@ -175,7 +177,7 @@
LoadedDeclarations c = null;
try {
c = scanner.parse(o, new Path(p));
- } catch (Exception e) {
+ } catch (ScannerException e) {
SeamCorePlugin.getDefault().logError(e);
}
if(c != null) componentsLoaded(c, new Path(p));
@@ -213,7 +215,7 @@
return classLoader;
}
- public static List<String> getJREClassPath(IProject project) throws Exception {
+ public static List<String> getJREClassPath(IProject project) throws CoreException {
if(!project.hasNature(JavaCore.NATURE_ID)) return null;
ArrayList<String> l = new ArrayList<String>();
IJavaProject javaProject = JavaCore.create(project);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -34,6 +34,7 @@
import org.jboss.tools.seam.internal.core.InnerModelHelper;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
import org.jboss.tools.seam.internal.core.scanner.xml.PropertiesScanner;
import org.jboss.tools.seam.internal.core.scanner.xml.XMLScanner;
@@ -71,7 +72,7 @@
return isLikelyComponentSource(o);
}
- public LoadedDeclarations parse(IFile f) throws Exception {
+ public LoadedDeclarations parse(IFile f) throws ScannerException {
XModel model = InnerModelHelper.createXModel(f.getProject());
if(model == null) return null;
XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
@@ -92,7 +93,7 @@
return false;
}
- public LoadedDeclarations parse(XModelObject o, IPath path) throws Exception {
+ public LoadedDeclarations parse(XModelObject o, IPath path) throws ScannerException {
if(o == null) return null;
sourcePath = path;
XModelObject seamProperties = o.getChildByPath("META-INF/seam.properties");
@@ -102,7 +103,11 @@
LoadedDeclarations ds = new LoadedDeclarations();
- processJavaClasses(o, ds);
+ try {
+ processJavaClasses(o, ds);
+ } catch (JavaModelException e) {
+ throw new ScannerException("Cannot process Java Classes", e);
+ }
if(componentsXML != null) {
LoadedDeclarations ds1 = new XMLScanner().parse(componentsXML, path);
@@ -174,16 +179,10 @@
LoadedDeclarations ds1 = null;
TypeScanner scanner = new TypeScanner();
- try {
- if(!scanner.isLikelyComponentSource(reader)) return;
- ds1 = scanner.parse(type, reader, sourcePath);
- } catch (Throwable t) {
- System.out.println("failed " + className);
-// SeamCorePlugin.getPluginLog().logError(t);
- }
+ if(!scanner.isLikelyComponentSource(reader)) return;
+ ds1 = scanner.parse(type, reader, sourcePath);
if(ds1 != null) {
-// System.out.println("declarations found in " + className);
ds.add(ds1);
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/TypeScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -1,9 +1,6 @@
package org.jboss.tools.seam.internal.core.scanner.lib;
-import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@@ -12,6 +9,7 @@
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
import org.eclipse.jdt.internal.compiler.env.EnumConstantSignature;
@@ -134,7 +132,7 @@
try {
int i = Integer.parseInt(precedence);
component.setPrecedence(i);
- } catch (Exception e) {
+ } catch (NumberFormatException e) {
//ignore
}
}
@@ -269,7 +267,7 @@
IMethod[] ms = null;
try {
ms = type.getMethods();
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
if(ms != null) for (int i = 0; i < ms.length; i++) {
@@ -277,7 +275,7 @@
//check parameters
try {
if(ms[i].getParameterNames().length != m.getArgumentNames().length) continue;
- } catch (Exception e) {
+ } catch (JavaModelException e) {
continue;
}
//compare
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -24,6 +24,7 @@
import org.jboss.tools.seam.internal.core.SeamValueString;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
public class PropertiesScanner implements IFileScanner {
@@ -56,9 +57,9 @@
* Returns list of components
* @param f
* @return
- * @throws Exception
+ * @throws ScannerException
*/
- public LoadedDeclarations parse(IFile f) throws Exception {
+ public LoadedDeclarations parse(IFile f) throws ScannerException {
XModel model = InnerModelHelper.createXModel(f.getProject());
if(model == null) return null;
XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-31 10:54:56 UTC (rev 2748)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-07-31 11:07:49 UTC (rev 2749)
@@ -34,6 +34,7 @@
import org.jboss.tools.seam.internal.core.SeamXmlFactory;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
/**
* @author Viacheslav Kabanovich
@@ -74,9 +75,9 @@
* Returns list of components
* @param f
* @return
- * @throws Exception
+ * @throws ScannerException
*/
- public LoadedDeclarations parse(IFile f) throws Exception {
+ public LoadedDeclarations parse(IFile f) throws ScannerException {
XModel model = InnerModelHelper.createXModel(f.getProject());
if(model == null) return null;
XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
17 years, 5 months