JBoss Tools SVN: r2452 - in trunk: jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-07-17 04:02:16 -0400 (Tue, 17 Jul 2007)
New Revision: 2452
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IVisualEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
resolve http://jira.jboss.com/jira/browse/JBIDE-531.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IVisualEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IVisualEditor.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/editor/IVisualEditor.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -17,6 +17,9 @@
public static final int VISUALSOURCE_MODE = 0;
public static final int VISUAL_MODE = 1;
public static final int SOURCE_MODE = 2;
+
+ /** PREVIEW_MODE */
+ public static final int PREVIEW_MODE = 3;
public void setVisualMode(int mode);
public IVisualController getController();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2007-07-17 08:02:16 UTC (rev 2452)
@@ -1,4 +1,4 @@
JSPMultiPageEditor.TabLabel.VisualSource = Visual/Source
JSPMultiPageEditor.TabLabel.Visual = Visual
JSPMultiPageEditor.TabLabel.Source = Source
-JSPMultiPageEditor.TabLabel.DefaultWebBrowser = Default web browser
\ No newline at end of file
+JSPMultiPageEditor.TabLabel.Preview = Preview
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -22,8 +22,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.QualifiedName;
-import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
-import org.jboss.tools.common.model.util.XModelTreeListenerSWTSync;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.text.IRegion;
@@ -50,7 +48,6 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IGotoMarker;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.IStatusField;
@@ -62,27 +59,28 @@
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage;
-import org.jboss.tools.jst.jsp.JspEditorPlugin;
-import org.jboss.tools.jst.jsp.editor.IVisualContext;
-import org.jboss.tools.jst.jsp.editor.IVisualController;
-import org.jboss.tools.jst.jsp.editor.IVisualEditor;
-import org.jboss.tools.jst.jsp.editor.IVisualEditorFactory;
-import org.jboss.tools.jst.jsp.preferences.VpePreference;
-import org.osgi.framework.Bundle;
-
+import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.filesystems.impl.DiscardFileHandler;
import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
import org.jboss.tools.common.model.plugin.ModelPlugin;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.XModelTreeListenerSWTSync;
import org.jboss.tools.common.text.ext.IMultiPageEditor;
+import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.editor.IVisualContext;
+import org.jboss.tools.jst.jsp.editor.IVisualController;
+import org.jboss.tools.jst.jsp.editor.IVisualEditor;
+import org.jboss.tools.jst.jsp.editor.IVisualEditorFactory;
+import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.jst.web.tld.VpeTaglibManager;
import org.jboss.tools.jst.web.tld.VpeTaglibManagerProvider;
+import org.osgi.framework.Bundle;
// Fix for EXIN-232: The IMultiPageEditor interface implementation is added.
public class JSPMultiPageEditor extends JSPMultiPageEditorPart implements
@@ -95,6 +93,9 @@
private static final String VISUAL_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Visual";
private static final String SOURCE_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Source";
+
+ /** PREVIEW_TAB_LABEL */
+ private static final String PREVIEW_TAB_LABEL = "JSPMultiPageEditor.TabLabel.Preview";
private IVisualEditor visualEditor;
@@ -105,6 +106,12 @@
JSPTextEditor sourceEditor;
private int sourceIndex;
+
+ /** composite control for default web-browser */
+ private IVisualEditor previewWebBrowser;
+
+ /** index of tab contain default web-browser */
+ private int previewIndex;
private boolean osWindows = true;
@@ -208,13 +215,17 @@
visualEditor.setVisualMode(IVisualEditor.VISUAL_MODE);
else if (newPageIndex == sourceIndex)
visualEditor.setVisualMode(IVisualEditor.SOURCE_MODE);
+ else if (newPageIndex == previewIndex) {
+ visualEditor.setVisualMode(IVisualEditor.PREVIEW_MODE);
+ }
+
superPageChange(newPageIndex);
} else {
super.pageChange(newPageIndex);
}
oldPage = newPageIndex;
}
-
+
public void setInput(IEditorInput input) {
super.setInput(XModelObjectEditorInput.checkInput(input));
if (getEditorInput() instanceof IModelObjectEditorInput) {
@@ -407,6 +418,17 @@
} catch (PartInitException e) {
JspEditorPlugin.getPluginLog().logError(e);
}
+
+ // Add tab contain default web-browser
+ try {
+ previewIndex = addPage(visualEditor, getEditorInput());
+ setPageText(previewIndex, JSPEditorMessages
+ .getString(PREVIEW_TAB_LABEL));
+ setPartName(visualEditor.getTitle());
+ } catch (PartInitException e) {
+ JspEditorPlugin.getPluginLog().logError(e);
+ }
+
}
public void doSave(IProgressMonitor monitor) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeDomBuilder.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeDomBuilder.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -38,7 +38,11 @@
return templateManager;
}
- public void registerNodes(VpeNodeMapping nodeMapping) {
+ public void registerNodes(VpeNodeMapping nodeMapping) {
+ if (sorceAdapter == null) {
+ return;
+ }
+
domMapping.mapNodes(nodeMapping);
Node sourceNode = nodeMapping.getSourceNode();
if (((INodeNotifier) sourceNode).getExistingAdapter(sorceAdapter) == null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -28,7 +28,6 @@
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -49,10 +48,10 @@
import org.eclipse.ui.texteditor.ITextEditorExtension;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.jst.jsp.editor.IVisualEditor;
-
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.mozilla.EditorLoadWindowListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.mozilla.MozillaPreview;
import org.jboss.tools.vpe.editor.xpl.SashForm;
public class VpeEditorPart extends EditorPart implements ITextEditor, ITextEditorExtension, IReusableEditor, IVisualEditor {
@@ -68,6 +67,12 @@
private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName("", "splitter_position2");
private int controlCount = 0;
+ /** default web-browser */
+ private MozillaPreview previewWebBrowser = null;
+
+ /** preview content */
+ private Composite previewContent = null;
+
public StructuredTextEditor getSourceEditor(){
return sourceEditor;
}
@@ -150,10 +155,10 @@
if(sourceEditor!=null)sourceEditor.removeRulerContextMenuListener(listener);
}
public void setStatusField(IStatusField field, String category) {
- if(visualMode == VISUAL_MODE){
- if(field != null){
- field.setImage(null);
- field.setText(null);
+ if(visualMode == VISUAL_MODE) {
+ if(field != null) {
+ field.setImage(null);
+ field.setText(null);
}
}else
if(sourceEditor!=null)sourceEditor.setStatusField(field, category);
@@ -256,15 +261,41 @@
case VISUALSOURCE_MODE:
if(sourceContent!= null)sourceContent.setVisible(true);
if(visualContent!= null)visualContent.setVisible(true);
+ if(previewContent != null) {
+ previewContent.setVisible(false);
+ }
break;
+
case VISUAL_MODE:
if(sourceContent!= null)sourceContent.setVisible(false);
if(visualContent!= null)visualContent.setVisible(true);
+ if(previewContent != null) {
+ previewContent.setVisible(false);
+ }
break;
+
case SOURCE_MODE:
if(sourceContent!= null)sourceContent.setVisible(true);
if(visualContent!= null)visualContent.setVisible(false);
+ if(previewContent != null) {
+ previewContent.setVisible(false);
+ }
break;
+
+ case PREVIEW_MODE:
+ if(sourceContent!= null) {
+ sourceContent.setVisible(false);
+ }
+
+ if(visualContent!= null) {
+ visualContent.setVisible(false);
+ }
+
+ if(previewContent != null) {
+ previewWebBrowser.rebuildDom();
+ previewContent.setVisible(true);
+ }
+ break;
}
container.layout();
if(visualMode == SOURCE_MODE && type != SOURCE_MODE) {
@@ -290,6 +321,12 @@
sourceContent.setLayout(new FillLayout());
visualContent = new Composite(container, SWT.NONE);
visualContent.setLayout(new FillLayout());
+
+
+ // Create a preview content
+ previewContent = new Composite(container, SWT.NONE);
+ previewContent.setLayout(new FillLayout());
+
if(sourceEditor == null)sourceEditor = new StructuredTextEditor() {
public void safelySanityCheckState(IEditorInput input) {
super.safelySanityCheckState(input);
@@ -318,6 +355,13 @@
VpePlugin.reportProblem(e);
}
+ previewWebBrowser = new MozillaPreview(this, sourceEditor);
+ try {
+ previewWebBrowser.init(getEditorSite(), getEditorInput());
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
+
try {
sourceEditor.addPropertyListener(
new IPropertyListener() {
@@ -347,6 +391,18 @@
});
visualEditor.createPartControl(visualContent);
}
+
+
+ if(previewWebBrowser!=null) {
+ previewWebBrowser.setEditorLoadWindowListener(new EditorLoadWindowListener() {
+ public void load() {
+ previewWebBrowser.setEditorLoadWindowListener(null);
+ previewWebBrowser.buildDom();
+ }
+ });
+ previewWebBrowser.createPartControl(previewContent);
+ }
+
activeEditor = sourceEditor;
sourceContent.addListener(SWT.Activate, new Listener() {
@@ -371,6 +427,19 @@
}
});
+
+ previewContent.addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (previewWebBrowser!=null && activeEditor != previewWebBrowser) {
+ activeEditor = previewWebBrowser;
+ setFocus();
+ }
+ }
+ }
+ });
+
+
IWorkbenchWindow window = getSite().getWorkbenchWindow();
window.getPartService().addPartListener(activationListener);
window.getShell().addShellListener(activationListener);
@@ -414,6 +483,11 @@
visualEditor.dispose();
visualEditor = null;
}
+
+ if (previewContent != null) {
+ previewContent.dispose();
+ previewContent = null;
+ }
}
public Object getAdapter(Class adapter) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -39,6 +39,9 @@
protected boolean caseSensitive;
protected boolean children;
protected boolean modify;
+
+ protected boolean haveVisualPreview;
+
private VpeResizer resizer;
private VpeDnd dragger;
private TextFormatingData textFormatingData;
@@ -145,6 +148,16 @@
this.caseSensitive = caseSensitive;
children = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CHILDREN));
modify = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_MODIFY));
+
+ String strHaveVisualPreview = templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_HAVE_VISUAL_PREVIEW);
+
+ if (strHaveVisualPreview != null && strHaveVisualPreview.length() != 0 ) {
+ haveVisualPreview = "yes".equals(strHaveVisualPreview);
+ } else {
+ haveVisualPreview = true;
+ }
+
+
init(templateElement);
}
@@ -892,4 +905,8 @@
public boolean containsText() {
return true;
}
+
+ public boolean isHaveVisualPreview() {
+ return haveVisualPreview;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplate.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplate.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -194,7 +194,13 @@
*/
boolean isCaseSensitive();
+
/**
+ * @return <code>true</code> if the element is have visual preview
+ */
+ boolean isHaveVisualPreview();
+
+ /**
* Returns the data for formatting an element of source tree
* @return <code>TextFormatingData</code>
*/
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2007-07-17 08:02:16 UTC (rev 2452)
@@ -112,6 +112,9 @@
static final String ATTR_TEMPLATE_CLASS = "class";
static final String ATTR_TEMPLATE_CHILDREN = "children";
static final String ATTR_TEMPLATE_MODIFY = "modify";
+
+ /** ATTR_TEMPLATE_HAVE_VISUAL_PREVIEW */
+ static final String ATTR_TEMPLATE_HAVE_VISUAL_PREVIEW = "haveVisualPreview";
static final String ATTR_COPY_ATTRS = "attrs";
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-07-16 21:36:37 UTC (rev 2451)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-07-17 08:02:16 UTC (rev 2452)
@@ -1060,7 +1060,7 @@
</vpe:tag>
<vpe:tag name="f:view" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
+ <vpe:template children="yes" modify="yes" haveVisualPreview="no">
<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -1078,7 +1078,7 @@
</vpe:tag>
<vpe:tag name="f:subview" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
+ <vpe:template children="yes" modify="yes" haveVisualPreview="no">
<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -1096,7 +1096,7 @@
</vpe:tag>
<vpe:tag name="h:form" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
+ <vpe:template children="yes" modify="yes" haveVisualPreview="no">
<div style="border:1px dotted #FF6600;padding: 5px;" title="{tagstring()}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
17 years, 5 months
JBoss Tools SVN: r2451 - in trunk/seam/plugins: org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-16 17:36:37 -0400 (Mon, 16 Jul 2007)
New Revision: 2451
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.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.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
Log:
better scope names in ui
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java 2007-07-16 21:08:48 UTC (rev 2450)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java 2007-07-16 21:36:37 UTC (rev 2451)
@@ -15,27 +15,35 @@
* @author Alexey Kazakov
*/
public enum ScopeType implements SeamScope {
- STATELESS(),
- METHOD(),
- EVENT(EVENT_PRIORITY_ORDER),
- PAGE(PAGE_PRIORITY_ORDER),
- CONVERSATION(CONVERSATION_PRIORITY_ORDER),
- SESSION(SESSION_PRIORITY_ORDER),
- APPLICATION(APPLICATION_PRIORITY_ORDER),
- BUSINESS_PROCESS(BUSINESS_PROCESS_PRIORITY_ORDER),
- UNSPECIFIED(UNDEFINED_PRIORITY_ORDER);
+ STATELESS("Stateless"),
+ METHOD("Method"),
+ EVENT("Event", EVENT_PRIORITY_ORDER),
+ PAGE("Page", PAGE_PRIORITY_ORDER),
+ CONVERSATION("Conversation", CONVERSATION_PRIORITY_ORDER),
+ SESSION("Session", SESSION_PRIORITY_ORDER),
+ APPLICATION("Application", APPLICATION_PRIORITY_ORDER),
+ BUSINESS_PROCESS("Business Process", BUSINESS_PROCESS_PRIORITY_ORDER),
+ UNSPECIFIED("Unspecified", UNDEFINED_PRIORITY_ORDER);
int priority;
+ private String label;
- ScopeType(int priority) {
+ ScopeType(String label, int priority) {
this.priority = priority;
+ this.label = label;
}
- ScopeType() {
+ ScopeType(String label) {
this.priority = UNDEFINED_PRIORITY_ORDER;
+ this.label = label;
}
public int getPriority() {
return priority;
}
+
+ public String getLabel() {
+ return label;
+ }
+
}
\ No newline at end of file
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-16 21:08:48 UTC (rev 2450)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponent.java 2007-07-16 21:36:37 UTC (rev 2451)
@@ -256,4 +256,8 @@
}
}
+ @Override
+ public String toString() {
+ return "SeamComponent: " + getName();
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-07-16 21:08:48 UTC (rev 2450)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-07-16 21:36:37 UTC (rev 2451)
@@ -20,16 +20,16 @@
if(element instanceof ISeamProject) {
return ((ISeamProject)element).getProject().getName();
} else if(element instanceof ISeamScope) {
- return ((ISeamScope)element).getType().toString();
+ return ((ISeamScope)element).getType().getLabel();
} else if(element instanceof ISeamComponent) {
- return "" + ((ISeamComponent)element).getName();
+ return ((ISeamComponent)element).getName();
} else if(element instanceof ISeamJavaSourceReference) {
ISeamJavaSourceReference d = (ISeamJavaSourceReference)element;
IMember m = d.getSourceMember();
IType type = (m instanceof IType) ? (IType)m : m.getTypeRoot().findPrimaryType();
- if(type.isBinary()) {
+ if(type.isBinary()) {
IResource r = ((ISeamElement)element).getResource();
- String s = (r == null) ? "???" : r.getName();
+ String s = (r == null) ? "<no name>" : r.getName();
return s + "/" + type.getFullyQualifiedName();
} else {
return type.getFullyQualifiedName();
17 years, 5 months
JBoss Tools SVN: r2450 - trunk/seam/tests/org.jboss.tools.seam.ui.test.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-16 17:08:48 -0400 (Mon, 16 Jul 2007)
New Revision: 2450
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/.project
Log:
misspelled plugin name
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/.project 2007-07-16 18:18:34 UTC (rev 2449)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/.project 2007-07-16 21:08:48 UTC (rev 2450)
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.seam.ui.tets</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.seam.ui.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
17 years, 5 months
JBoss Tools SVN: r2449 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-16 14:18:34 -0400 (Mon, 16 Jul 2007)
New Revision: 2449
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamScope.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.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/validation/SeamJavaValidator.java
Log:
http://jira.jboss.com/jira/browse/EXIN-327 @Factory validation
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-07-16 18:07:11 UTC (rev 2448)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-07-16 18:18:34 UTC (rev 2449)
@@ -122,6 +122,12 @@
public Set<ISeamFactory> getFactoriesByScope(ScopeType scope);
/**
+ * @param resource path of ISeamFactory that belongs to factory declaration
+ * @return Set of ISeamFactory by resource path.
+ */
+ public Set<ISeamFactory> getFactoriesByPath(IPath path);
+
+ /**
* Adds factory method into project
* @param factory
*/
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java 2007-07-16 18:07:11 UTC (rev 2448)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ScopeType.java 2007-07-16 18:18:34 UTC (rev 2449)
@@ -14,14 +14,28 @@
* Types of Seam Scopes.
* @author Alexey Kazakov
*/
-public enum ScopeType {
- STATELESS,
- METHOD,
- EVENT,
- PAGE,
- CONVERSATION,
- SESSION,
- APPLICATION,
- BUSINESS_PROCESS,
- UNSPECIFIED;
+public enum ScopeType implements SeamScope {
+ STATELESS(),
+ METHOD(),
+ EVENT(EVENT_PRIORITY_ORDER),
+ PAGE(PAGE_PRIORITY_ORDER),
+ CONVERSATION(CONVERSATION_PRIORITY_ORDER),
+ SESSION(SESSION_PRIORITY_ORDER),
+ APPLICATION(APPLICATION_PRIORITY_ORDER),
+ BUSINESS_PROCESS(BUSINESS_PROCESS_PRIORITY_ORDER),
+ UNSPECIFIED(UNDEFINED_PRIORITY_ORDER);
+
+ int priority;
+
+ ScopeType(int priority) {
+ this.priority = priority;
+ }
+
+ ScopeType() {
+ this.priority = UNDEFINED_PRIORITY_ORDER;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
}
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamScope.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamScope.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamScope.java 2007-07-16 18:18:34 UTC (rev 2449)
@@ -0,0 +1,25 @@
+ /*******************************************************************************
+ * 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.seam.core;
+
+/**
+ * @author Alexey Kazakov
+ */
+public interface SeamScope {
+
+ public static final int UNDEFINED_PRIORITY_ORDER = -1;
+ public static final int EVENT_PRIORITY_ORDER = 0;
+ public static final int PAGE_PRIORITY_ORDER = 1;
+ public static final int CONVERSATION_PRIORITY_ORDER = 2;
+ public static final int SESSION_PRIORITY_ORDER = 3;
+ public static final int BUSINESS_PROCESS_PRIORITY_ORDER = 4;
+ public static final int APPLICATION_PRIORITY_ORDER = 5;
+}
\ No newline at end of file
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-16 18:07:11 UTC (rev 2448)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-16 18:18:34 UTC (rev 2449)
@@ -636,6 +636,19 @@
return result;
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.core.ISeamProject#getFactoriesByPath(org.eclipse.core.runtime.IPath)
+ */
+ public Set<ISeamFactory> getFactoriesByPath(IPath path) {
+ Set<ISeamFactory> result = new HashSet<ISeamFactory>();
+ for (ISeamFactory f: allFactories) {
+ if(path.equals(f.getSourcePath())) {
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
public void removeFactory(ISeamFactory factory) {
allFactories.remove(factory);
allVariables.remove(factory);
@@ -781,5 +794,4 @@
return;
}
}
-
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java 2007-07-16 18:07:11 UTC (rev 2448)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamJavaValidator.java 2007-07-16 18:18:34 UTC (rev 2449)
@@ -22,17 +22,21 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+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.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
+import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamComponentMethod;
import org.jboss.tools.seam.core.ISeamContextVariable;
+import org.jboss.tools.seam.core.ISeamFactory;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamTextSourceReference;
@@ -123,6 +127,7 @@
IFile sourceFile = root.getFile(linkedResource);
reporter.removeMessageSubset(this, sourceFile, MARKED_COMPONENT_MESSAGE_GROUP);
validateComponent(linkedResource, checkedComponents);
+ validateFactory(linkedResource);
// TODO
}
} else {
@@ -132,6 +137,58 @@
return OK_STATUS;
}
+ private void validateFactory(IPath sourceFilePath) {
+ Set<ISeamFactory> factories = project.getFactoriesByPath(sourceFilePath);
+ for (ISeamFactory factory : factories) {
+ if(factory instanceof ISeamAnnotatedFactory) {
+ validateFactory((ISeamAnnotatedFactory)factory);
+ }
+ }
+ }
+
+ private void validateFactory(ISeamAnnotatedFactory factory) {
+ IMember sourceMember = factory.getSourceMember();
+ if(sourceMember instanceof IMethod) {
+ IMethod method = (IMethod)sourceMember;
+ try {
+ String returnType = method.getReturnType();
+ if("V".equals(returnType)) {
+ // return type is void
+ String factoryName = factory.getName();
+ if(factoryName==null) {
+ String methodName = method.getElementName();
+ if(methodName.startsWith("get") && methodName.length()>3) {
+ // This is getter
+ factoryName = methodName.substring(3);
+ } else {
+ // TODO
+ // Unknown factory name
+ factoryName = methodName;
+ }
+ }
+ ScopeType factoryScope = factory.getScope();
+ Set<ISeamContextVariable> variables = project.getVariablesByName(factoryName);
+ boolean unknownVariable = true;
+ for (ISeamContextVariable variable : variables) {
+ if((factoryScope == variable.getScope() || factoryScope.getPriority()>variable.getScope().getPriority()) && !(variable instanceof ISeamFactory)) {
+ // It's OK. We have that variable name
+ unknownVariable = false;
+ break;
+ }
+ if(unknownVariable) {
+ // TODO
+ // mark unknown factory name
+ }
+ }
+ }
+ } catch (Exception e) {
+ SeamCorePlugin.getDefault().logError(e);
+ }
+ } else {
+ // factory must be java method!
+ }
+ }
+
private void validateComponent(IPath sourceFilePath, Set<ISeamComponent> checkedComponents) {
Set<ISeamComponent> components = project.getComponentsByPath(sourceFilePath);
for (ISeamComponent component : components) {
@@ -168,8 +225,14 @@
Set<ISeamComponent> components = project.getComponents();
for (ISeamComponent component : components) {
validateComponent(component);
- // TODO
}
+ Set<ISeamFactory> factories = project.getFactories();
+ for (ISeamFactory factory : factories) {
+ if(factory instanceof ISeamAnnotatedFactory) {
+ validateFactory((ISeamAnnotatedFactory)factory);
+ }
+ }
+ // TODO
return OK_STATUS;
}
17 years, 5 months
JBoss Tools SVN: r2448 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-07-16 14:07:11 -0400 (Mon, 16 Jul 2007)
New Revision: 2448
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
JBIDE-581 add/remove seam nature
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-07-16 15:50:25 UTC (rev 2447)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-07-16 18:07:11 UTC (rev 2448)
@@ -205,6 +205,24 @@
<partitiontype id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
</contentAssistProcessor>
- </extension>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <!-- TODO: We should either remove this or move it to a not so prominient place in the final release -->
+ <objectContribution
+ adaptable="true"
+ id="org.jboss.tools.seam.ui.enableSeamAction"
+ nameFilter="*"
+ objectClass="org.eclipse.core.resources.IProject">
+ <action
+ class="org.jboss.tools.seam.ui.builder.ToggleSeamNatureAction"
+ enablesFor="+"
+ id="org.jboss.tools.seam.ui.addRemoveSeamNatureAction"
+ label="Add/Remove Seam support"
+ menubarPath="additions">
+ </action>
+ </objectContribution>
+ </extension>
</plugin>
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/builder/ToggleSeamNatureAction.java 2007-07-16 18:07:11 UTC (rev 2448)
@@ -0,0 +1,103 @@
+package org.jboss.tools.seam.ui.builder;
+
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.jboss.tools.seam.core.ISeamProject;
+
+/**
+ * Class for toggling the Seam Nature.
+ *
+ * @author max
+ *
+ */
+public class ToggleSeamNatureAction implements IObjectActionDelegate {
+
+ private ISelection selection;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ if (selection instanceof IStructuredSelection) {
+ for (Iterator it = ((IStructuredSelection) selection).iterator(); it
+ .hasNext();) {
+ Object element = it.next();
+ IProject project = null;
+ if (element instanceof IProject) {
+ project = (IProject) element;
+ } else if (element instanceof IAdaptable) {
+ project = (IProject) ((IAdaptable) element)
+ .getAdapter(IProject.class);
+ }
+ if (project != null) {
+ toggleNature(project);
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = selection;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction,
+ * org.eclipse.ui.IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ /**
+ * Toggles sample nature on a project
+ *
+ * @param project
+ * to have sample nature added or removed
+ */
+ private void toggleNature(IProject project) {
+ try {
+ IProjectDescription description = project.getDescription();
+ String[] natures = description.getNatureIds();
+
+ for (int i = 0; i < natures.length; ++i) {
+ if (ISeamProject.NATURE_ID.equals(natures[i])) {
+ // Remove the nature
+ String[] newNatures = new String[natures.length - 1];
+ System.arraycopy(natures, 0, newNatures, 0, i);
+ System.arraycopy(natures, i + 1, newNatures, i,
+ natures.length - i - 1);
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ return;
+ }
+ }
+
+ // Add the nature
+ String[] newNatures = new String[natures.length + 1];
+ System.arraycopy(natures, 0, newNatures, 0, natures.length);
+ newNatures[natures.length] = ISeamProject.NATURE_ID;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, null);
+ } catch (CoreException e) {
+ }
+ }
+
+}
17 years, 5 months
JBoss Tools SVN: r2447 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-16 11:50:25 -0400 (Mon, 16 Jul 2007)
New Revision: 2447
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
Log:
EXIN-217 One more null pointer in ComponentBuilder fixed
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-16 15:45:10 UTC (rev 2446)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-16 15:50:25 UTC (rev 2447)
@@ -242,7 +242,7 @@
}
}
ResolvedAnnotation[] as = annotatedType.getAnnotations();
- for (int i = 0; i < as.length; i++) {
+ if(as != null) for (int i = 0; i < as.length; i++) {
if(ROLE_ANNOTATION_TYPE.equals(as[i].getType())) {
createRole(as[i].getAnnotation());
}
@@ -268,6 +268,7 @@
private Annotation findAnnotation(AnnotatedASTNode<?> n, String type) {
ResolvedAnnotation[] as = n.getAnnotations();
+ if(as == null) return null;
for (int i = 0; i < as.length; i++) {
if(type.equals(as[i].getType())) return as[i].getAnnotation();
}
17 years, 5 months
JBoss Tools SVN: r2446 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-16 11:45:10 -0400 (Mon, 16 Jul 2007)
New Revision: 2446
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
Log:
EXIN-217 Null pointer in ComponentBuilder fixed
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-16 15:16:18 UTC (rev 2445)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-16 15:45:10 UTC (rev 2446)
@@ -73,7 +73,7 @@
void process() {
if(annotatedType == null) return;
ResolvedAnnotation[] as = annotatedType.getAnnotations();
- for (int i = 0; i < as.length; i++) {
+ if(as != null) for (int i = 0; i < as.length; i++) {
String type = as[i].getType();
if(NAME_ANNOTATION_TYPE.equals(type)) {
component.setName(ValueInfo.getValueInfo(as[i].getAnnotation(), null));
17 years, 5 months
JBoss Tools SVN: r2445 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-16 11:16:18 -0400 (Mon, 16 Jul 2007)
New Revision: 2445
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.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
Log:
EXIN-217 Merge of variables improved
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java 2007-07-16 14:20:43 UTC (rev 2444)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentDeclaration.java 2007-07-16 15:16:18 UTC (rev 2445)
@@ -13,10 +13,12 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.resources.IResource;
import org.jboss.tools.seam.core.IOpenableElement;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamTextSourceReference;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.IValueInfo;
@@ -118,6 +120,10 @@
name = value == null ? null : value.getValue();
}
+ public Set<ISeamContextVariable> getDeclaredVariables() {
+ return null;
+ }
+
public void open() {
}
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-16 14:20:43 UTC (rev 2444)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-07-16 15:16:18 UTC (rev 2445)
@@ -13,6 +13,7 @@
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamComponentMethod;
+import org.jboss.tools.seam.core.ISeamContextVariable;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
@@ -343,6 +344,15 @@
setStateful(value != null && "true".equals(value.getValue()));
}
+ public Set<ISeamContextVariable> getDeclaredVariables() {
+ Set<ISeamContextVariable> set = new HashSet<ISeamContextVariable>();
+ set.addAll(roles);
+ for (IBijectedAttribute a : bijectedAttributes) {
+ if(a.isContextVariable()) set.add(a);
+ }
+ return set;
+ }
+
public void open() {
if(type == null) return;
try {
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-16 14:20:43 UTC (rev 2444)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-07-16 15:16:18 UTC (rev 2445)
@@ -30,7 +30,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.xml.XMLUtilities;
-import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamContextVariable;
@@ -270,8 +269,24 @@
String oldClassName = c == null ? null : c.getClassName();
if(current != null) {
+ Set<ISeamContextVariable> oldVariables = current.getDeclaredVariables();
List<Change> changes = current.merge(loaded);
if(changes != null && changes.size() > 0) {
+
+ Set<ISeamContextVariable> newVariables = current.getDeclaredVariables();
+ if(oldVariables != null && newVariables != null) {
+ for (ISeamContextVariable v : oldVariables) {
+ if(!newVariables.contains(v)) {
+ allVariables.remove(v);
+ }
+ }
+ for (ISeamContextVariable v : newVariables) {
+ if(!oldVariables.contains(v)) {
+ allVariables.add(v);
+ }
+ }
+ }
+
Change cc = new Change(c, null, null, null);
cc.addChildren(changes);
List<Change> cchanges = Change.addChange(null, cc);
@@ -310,11 +325,7 @@
if(loaded instanceof ISeamJavaComponentDeclaration) {
SeamJavaComponentDeclaration jd = (SeamJavaComponentDeclaration)loaded;
javaDeclarations.put(jd.getClassName(), jd);
- Set<IBijectedAttribute> as = jd.getBijectedAttributes();
- for (IBijectedAttribute a : as) {
- if(a.isContextVariable()) allVariables.add(a);
- }
- allVariables.addAll(jd.getRoles());
+ allVariables.addAll(jd.getDeclaredVariables());
Set<ISeamComponent> cs = getComponentsByClass(jd.getClassName());
for (ISeamComponent ci: cs) {
if(ci == c) continue;
@@ -405,11 +416,10 @@
if(ds[i].source.equals(source)) {
c.removeDeclaration(ds[i]);
if(ds[i] instanceof ISeamJavaComponentDeclaration) {
- ISeamJavaComponentDeclaration jd = (ISeamJavaComponentDeclaration)ds[i];
+ SeamJavaComponentDeclaration jd = (SeamJavaComponentDeclaration)ds[i];
String className = jd.getClassName();
javaDeclarations.remove(className);
- allVariables.removeAll(jd.getBijectedAttributes());
- allVariables.removeAll(jd.getRoles());
+ allVariables.removeAll(jd.getDeclaredVariables());
}
changes = Change.addChange(changes, new Change(c, null, ds[i], null));
}
@@ -450,13 +460,12 @@
Collection<ISeamComponentDeclaration> declarations = removed.values();
for (ISeamComponentDeclaration declaration: declarations) {
if(declaration instanceof ISeamJavaComponentDeclaration) {
- ISeamJavaComponentDeclaration jd = (ISeamJavaComponentDeclaration)declaration;
+ SeamJavaComponentDeclaration jd = (SeamJavaComponentDeclaration)declaration;
String className = jd.getClassName();
if(javaDeclarations.get(className) == jd) {
javaDeclarations.remove(className);
}
- allVariables.removeAll(jd.getRoles());
- allVariables.removeAll(jd.getBijectedAttributes());
+ allVariables.removeAll(jd.getDeclaredVariables());
}
}
17 years, 5 months
JBoss Tools SVN: r2444 - in trunk/common/plugins/org.jboss.tools.common.model: images/navigationtree and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-16 10:20:43 -0400 (Mon, 16 Jul 2007)
New Revision: 2444
Removed:
trunk/common/plugins/org.jboss.tools.common.model/images/java/B2BMap_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/B2BMap_method_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/JMS_Proxy.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/JMS_Proxy_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/RMI_Proxy.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/RMI_Proxy_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/SOAP_Proxy.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/SOAP_Proxy_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/active_class.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/active_class_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/class.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/constructor.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/flow_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/flow_method_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/get_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/get_method_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/interactive_class.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/interactive_class_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/interface.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/interface_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/java_primitive.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/java_primitive_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/method_jsp.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/method_old.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/method_xsl.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/newclass.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/newconstructor.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/newinterface.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/newinterface_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/newmethod.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/set_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/set_method_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/systempackage.gif
trunk/common/plugins/org.jboss.tools.common.model/images/java/usersystempackage.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_compound.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_db.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_java.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_join.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_xml.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/application.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/application_new.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/applications.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/closed_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/data_source.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_filed.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_index.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_meta_data.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_table.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_view.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/file_storage.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/flow.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/flow_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/gold_table.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/interface_method.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/jsp_template.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/map.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/map_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/model_root.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/new_map_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newflow.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newjsp_template.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newxsl_template.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/openned_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/project_reopen.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/projects_folder.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xml_attribute.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xml_element.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xsl_template.gif
trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xstudio.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/bg_icons.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/dv.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/folder_ico.jpg
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/leftArrow.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/leftArrowActive.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/navigation.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/rightArrow.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/rightArrowActive.gif
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/select_ico.jpg
trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/sv.gif
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/base.meta
Log:
EXIN-239 Obsolete gif files are removed form model plugin.
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/B2BMap_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/B2BMap_method_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/JMS_Proxy.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/JMS_Proxy_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/RMI_Proxy.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/RMI_Proxy_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/SOAP_Proxy.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/SOAP_Proxy_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/active_class.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/active_class_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/class.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/constructor.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/flow_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/flow_method_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/get_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/get_method_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/interactive_class.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/interactive_class_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/interface.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/interface_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/java_primitive.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/java_primitive_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/method_jsp.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/method_old.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/method_xsl.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/newclass.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/newconstructor.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/newinterface.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/newinterface_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/newmethod.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/set_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/set_method_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/systempackage.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/java/usersystempackage.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_compound.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_db.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_java.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_join.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/adapter_xml.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/application.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/application_new.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/applications.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/closed_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/data_source.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_filed.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_index.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_meta_data.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_table.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/db_view.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/file_storage.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/flow.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/flow_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/gold_table.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/interface_method.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/jsp_template.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/map.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/map_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/model_root.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/new_map_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newflow.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newjsp_template.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/newxsl_template.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/openned_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/project_reopen.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/projects_folder.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xml_attribute.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xml_element.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xsl_template.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/navigationtree/xstudio.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/bg_icons.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/dv.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/folder_ico.jpg
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/leftArrow.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/leftArrowActive.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/navigation.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/rightArrow.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/rightArrowActive.gif
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/select_ico.jpg
===================================================================
(Binary files differ)
Deleted: trunk/common/plugins/org.jboss.tools.common.model/images/xstudio/sv.gif
===================================================================
(Binary files differ)
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/base.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/base.meta 2007-07-16 14:18:12 UTC (rev 2443)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/base.meta 2007-07-16 14:20:43 UTC (rev 2444)
@@ -135,14 +135,6 @@
<ICON name="baseclass" path="images/flow/change_base_class.gif"/>
</GROUP>
<GROUP name="new">
- <GROUP name="class">
- <ICON name="active" path="images/java/active_class_new.gif"/>
- <ICON name="interactive" path="images/java/interactive_class_new.gif"/>
- <ICON name="jms" path="images/java/JMS_Proxy_new.gif"/>
- <ICON name="regular" path="images/java/newclass.gif"/>
- <ICON name="rmi" path="images/java/RMI_Proxy_new.gif"/>
- <ICON name="soap" path="images/java/SOAP_Proxy_new.gif"/>
- </GROUP>
<GROUP name="file">
<ICON name="ant_file" path="images/file/new_ant_file.gif"/>
<ICON name="folder" path="images/file/new_folder.gif"/>
@@ -157,13 +149,6 @@
<ICON name="xml_file" path="images/file/new_xml_file.gif"/>
<ICON name="xsl_file" path="images/file/new_xsl_file.gif"/>
</GROUP>
- <GROUP name="method">
- <ICON name="b2b" path="images/java/B2BMap_method_new.gif"/>
- <ICON name="flow" path="images/java/flow_method_new.gif"/>
- <ICON name="get" path="images/java/get_method_new.gif"/>
- <ICON name="regular" path="images/java/newmethod.gif"/>
- <ICON name="set" path="images/java/set_method_new.gif"/>
- </GROUP>
<GROUP name="state">
<ICON name="base" path="images/flow/create_base.gif"/>
<ICON name="fork" path="images/flow/create_fork.gif"/>
@@ -193,13 +178,8 @@
<ICON name="generate" path="images/actions/generatecode.gif"/>
<ICON name="history" path="images/actions/model_history.gif"/>
<ICON name="move" path="images/actions/empty.gif"/>
- <ICON name="newapplication" path="images/navigationtree/application_new.gif"/>
<ICON name="newattribute" path="images/java/newattribute.gif"/>
- <ICON name="newconstructor" path="images/java/newconstructor.gif"/>
- <ICON name="newinterface" path="images/java/newinterface.gif"/>
- <ICON name="newmethod" path="images/java/newmethod.gif"/>
<ICON name="newpackage" path="images/java/newpackages.gif"/>
- <ICON name="newproject" path="images/navigationtree/new_project.gif"/>
<ICON name="paste" path="command:org.eclipse.ui.edit.paste"/>
<ICON name="paste_old" path="images/actions/paste.gif"/>
<ICON name="redo" path="images/actions/redo.gif"/>
@@ -219,34 +199,6 @@
<ICON name="unknown" path="images/common/qmark.gif"/>
</GROUP>
<GROUP name="main">
- <GROUP name="classes">
- <ICON name="active" path="images/java/active_class.gif"/>
- <ICON name="interactive" path="images/java/interactive_class.gif"/>
- <ICON name="jms" path="images/java/JMS_Proxy.gif"/>
- <ICON name="rmi" path="images/java/RMI_Proxy.gif"/>
- <ICON name="soap" path="images/java/SOAP_Proxy.gif"/>
- </GROUP>
- <GROUP name="data">
- <GROUP name="adapters">
- <ICON name="compound" path="images/navigationtree/adapter_compound.gif"/>
- <ICON name="db" path="images/navigationtree/adapter_db.gif"/>
- <ICON name="java" path="images/navigationtree/adapter_java.gif"/>
- <ICON name="join" path="images/navigationtree/adapter_join.gif"/>
- <ICON name="xml" path="images/navigationtree/adapter_xml.gif"/>
- </GROUP>
- <GROUP name="db">
- <ICON name="field" path="images/navigationtree/db_filed.gif"/>
- <ICON name="index" path="images/navigationtree/db_index.gif"/>
- <ICON name="meta" path="images/navigationtree/db_meta_data.gif"/>
- <ICON name="table" path="images/navigationtree/db_table.gif"/>
- <ICON name="view" path="images/navigationtree/db_view.gif"/>
- </GROUP>
- <GROUP name="xml">
- <ICON name="attribute" path="images/navigationtree/xml_attribute.gif"/>
- <ICON name="element" path="images/navigationtree/xml_element.gif"/>
- </GROUP>
- <ICON name="root" path="images/navigationtree/adapter_folder.gif"/>
- </GROUP>
<GROUP name="file">
<ICON name="ant_file" path="images/file/ant_file.gif"/>
<ICON name="closed_folder" path="images/file/closed_folder.gif"/>
@@ -268,36 +220,12 @@
<ICON name="xsl" path="images/file/xsl_file.gif"/>
<ICON name="xsl_file" path="images/file/xsl_file.gif"/>
</GROUP>
- <GROUP name="flow">
- <ICON name="folder" path="images/navigationtree/flow_folder.gif"/>
- <ICON name="item" path="images/navigationtree/flow.gif"/>
- </GROUP>
- <GROUP name="mappings">
- <ICON name="folder" path="images/navigationtree/map_folder.gif"/>
- <ICON name="item" path="images/navigationtree/map.gif"/>
- </GROUP>
<GROUP name="methods">
- <ICON name="any" path="images/java/method.gif"/>
- <ICON name="b2b" path="images/java/B2BMap_method.gif"/>
- <ICON name="flow" path="images/java/flow_method.gif"/>
- <ICON name="get" path="images/java/get_method.gif"/>
- <ICON name="i" path="images/java/interface_method.gif"/>
<ICON name="java" path="images/java/method.gif"/>
- <ICON name="jsp" path="images/java/method_jsp.gif"/>
- <ICON name="old" path="images/java/method_old.gif"/>
- <ICON name="set" path="images/java/set_method.gif"/>
- <ICON name="xsl" path="images/java/method_xsl.gif"/>
</GROUP>
- <GROUP name="packages">
- <ICON name="common" path="images/java/usersystempackage.gif"/>
- <ICON name="system" path="images/java/systempackage.gif"/>
- <ICON name="user" path="images/java/package.gif"/>
- </GROUP>
<GROUP name="projects">
- <ICON name="folder" path="images/navigationtree/projects_folder.gif"/>
<ICON name="item" path="images/navigationtree/project.gif"/>
<ICON name="new" path="images/navigationtree/new_project.gif"/>
- <ICON name="reopen" path="images/navigationtree/project_reopen.gif"/>
</GROUP>
<GROUP name="xstudio">
<GROUP name="icons">
@@ -318,25 +246,12 @@
</GROUP>
<ICON name="root" path="images/file/closed_folder.gif"/>
</GROUP>
- <ICON name="application" path="images/navigationtree/application.gif"/>
- <ICON name="applications" path="images/navigationtree/applications.gif"/>
<ICON name="attribute" path="images/java/attr.gif"/>
<ICON name="auxiliary" path="images/file/redhat_file.gif"/>
- <ICON name="class" path="images/java/class.gif"/>
- <ICON name="closedbox" path="images/navigationtree/closed_folder.gif"/>
- <ICON name="constructor" path="images/java/constructor.gif"/>
<ICON name="database" path="images/file/redhat_file.gif"/>
- <ICON name="databases" path="images/file/redhat_file.gif"/>
- <ICON name="datasource" path="images/navigationtree/data_source.gif"/>
- <ICON name="db_method" path="images/file/redhat_file.gif"/>
<ICON name="empty" path="images/common/empty.gif"/>
- <ICON name="interface" path="images/java/interface.gif"/>
<ICON name="java" path="images/navigationtree/java.gif"/>
- <ICON name="method" path="images/java/method.gif"/>
- <ICON name="openedbox" path="images/file/closed_folder.gif"/>
<ICON name="package" path="images/java/package.gif"/>
- <ICON name="primitive" path="images/java/java_primitive.gif"/>
- <ICON name="primitives" path="images/java/java_primitive_folder.gif"/>
<ICON name="properties" path="images/navigationtree/properties.gif"/>
<ICON name="property" path="images/navigationtree/property.gif"/>
<ICON name="root" path="images/file/closed_folder.gif"/>
17 years, 5 months
JBoss Tools SVN: r2443 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-16 10:18:12 -0400 (Mon, 16 Jul 2007)
New Revision: 2443
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
Log:
EXIN-217 Merge of component methods improved
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-16 11:59:25 UTC (rev 2442)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-16 14:18:12 UTC (rev 2443)
@@ -167,7 +167,9 @@
ValueInfo scope = ValueInfo.getValueInfo(main, "scope");
if(scope != null) att.setScope(scope);
- att.setSourceMember(findMethod(m));
+ IMethod im = findMethod(m);
+ att.setSourceMember(im);
+ att.setId(im);
}
for (AnnotatedASTNode<FieldDeclaration> n: annotatedFields) {
@@ -202,7 +204,9 @@
ValueInfo scope = ValueInfo.getValueInfo(main, "scope");
if(scope != null) att.setScope(scope);
- att.setSourceMember(findField(m));
+ IField f = findField(m);
+ att.setSourceMember(f);
+ att.setId(f);
}
}
@@ -218,7 +222,9 @@
component.addMethod(cm);
MethodDeclaration m = n.getNode();
component.addMethod(cm);
- cm.setSourceMember(findMethod(m));
+ IMethod im = findMethod(m);
+ cm.setSourceMember(im);
+ cm.setId(im);
}
cm.getTypes().add(type);
}
17 years, 5 months