JBoss Tools SVN: r35138 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-09-28 18:16:46 -0400 (Wed, 28 Sep 2011)
New Revision: 35138
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/JSPMultiPageEditorPart.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java
trunk/vpe/plugins/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/TestUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
Log:
Improved Exception handling and minor style fixes for vpe
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 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -109,19 +109,12 @@
private IVisualEditor visualEditor;
private int visualSourceIndex;
-
- private JSPTextEditor sourceEditor;
-
private int sourceIndex;
-
- /** composite control for default web-browser */
- // private IVisualEditor previewWebBrowser;
-
/** index of tab contain default web-browser */
private int previewIndex=-1;//by default 1, so if there no visual editor impl, this tab will be not available
- // private boolean osWindows = true;
-
+ private JSPTextEditor sourceEditor;
+
private BundleMap bundleMap;
protected XModelTreeListenerSWTASync syncListener = new XModelTreeListenerSWTASync(
@@ -430,43 +423,48 @@
protected void createPages() {
- createPagesForVPE();
- loadSelectedTab();
+ try {
+ createPagesForVPE();
+ loadSelectedTab();
- switch (selectedPageIndex) {
- case 0: {
- // source/visual mode
- setActivePage(selectedPageIndex);
- pageChange(selectedPageIndex);
- break;
- } case 1: {
- // source mode
- setActivePage(selectedPageIndex);
- pageChange(selectedPageIndex);
- break;
- } case 2: {
- // preview mode
- setActivePage(selectedPageIndex);
- pageChange(selectedPageIndex);
- break;
- } default: {
- // by default we sets source/visual mode
- setActivePage(0);
- pageChange(0);
- break;
+ switch (selectedPageIndex) {
+ case 0: {
+ // source/visual mode
+ setActivePage(selectedPageIndex);
+ pageChange(selectedPageIndex);
+ break;
+ } case 1: {
+ // source mode
+ setActivePage(selectedPageIndex);
+ pageChange(selectedPageIndex);
+ break;
+ } case 2: {
+ // preview mode
+ setActivePage(selectedPageIndex);
+ pageChange(selectedPageIndex);
+ break;
+ } default: {
+ // by default we sets source/visual mode
+ setActivePage(0);
+ pageChange(0);
+ break;
+ }
}
+
+ IFile f = getFile();
+ if (f != null && f.exists()) {
+ new ResourceChangeListener(this, getContainer());
+ }
+ if (getModelObject() != null) {
+ getModelObject().getModel().addModelTreeListener(syncListener);
+ }
+ } catch (PartInitException e) {
+ JspEditorPlugin.getPluginLog().logError(e);
}
-
- IFile f = getFile();
- if (f != null && f.exists()) {
- new ResourceChangeListener(this, getContainer());
- }
- if (getModelObject() != null) {
- getModelObject().getModel().addModelTreeListener(syncListener);
- }
+
}
- private void createPagesForVPE() {
+ private void createPagesForVPE() throws PartInitException {
/*
* Create Source Editor and BundleMap
*/
@@ -478,64 +476,32 @@
* or here if there is only the source part.
*/
bundleMap = new BundleMap();
-
+ String sourceTabLabel = JSPEditorMessages.JSPMultiPageEditor_TabLabel_Source;
if (visualEditorFactory != null) {
- visualEditor = visualEditorFactory.createVisualEditor(this,
- sourceEditor, IVisualEditor.VISUALSOURCE_MODE, bundleMap);
- }
- try {
- if (visualEditor != null) {
- visualSourceIndex = addPage(visualEditor, getEditorInput(),sourceEditor);
- setPageText(
- visualSourceIndex,
- JSPEditorMessages.JSPMultiPageEditor_TabLabel_VisualSource);
- setPartName(visualEditor.getTitle());
- }
- } catch (PartInitException e) {
- JspEditorPlugin.getPluginLog().logError(e);
- }
- /*
- * try { visualIndex = addPage(visualEditor, getEditorInput());
- * setPageText(visualIndex, JSPEditorMessages
- * .getString(VISUAL_TAB_LABEL)); setPartName(visualEditor.getTitle());
- * } catch (PartInitException e) {
- * JspEditorPlugin.getPluginLog().logError(e); }
- */
+ visualEditor = visualEditorFactory.createVisualEditor(this,sourceEditor, IVisualEditor.VISUALSOURCE_MODE, bundleMap);
- try {
- String sourceTabLabel = JSPEditorMessages.JSPMultiPageEditor_TabLabel_Source;
- if (visualEditor != null) {
- sourceIndex = addPage(visualEditor, getEditorInput(),sourceEditor);
- setPageText(sourceIndex, sourceTabLabel);
- setPartName(visualEditor.getTitle());
- } else {
- sourceIndex = addPage(sourceEditor, getEditorInput(),sourceEditor);
- setPageText(sourceIndex, sourceTabLabel);
- setPartName(sourceEditor.getTitle());
- }
- } catch (PartInitException e) {
- JspEditorPlugin.getPluginLog().logError(e);
- }
+ visualSourceIndex = addPage(visualEditor, getEditorInput(),sourceEditor);
+ setPageText(visualSourceIndex,JSPEditorMessages.JSPMultiPageEditor_TabLabel_VisualSource);
+ setPartName(visualEditor.getTitle());
- // Add tab contain default web-browser
- try {
- if (visualEditor != null) {
- setPreviewIndex(addPage(visualEditor, getEditorInput(),sourceEditor));
- setPageText(getPreviewIndex(),
- JSPEditorMessages.JSPMultiPageEditor_TabLabel_Preview);
- setPartName(visualEditor.getTitle());
- }
- } catch (PartInitException e) {
- JspEditorPlugin.getPluginLog().logError(e);
- }
-
- /*
- * When there is only the source part --
- * then VpeController very likely hasn't been created.
- * Thus Bundle Map should be initialized here instead of
- * VpeController.
- */
- if (visualEditor == null) {
+ sourceIndex = addPage(visualEditor, getEditorInput(),sourceEditor);
+ setPageText(sourceIndex, sourceTabLabel);
+ setPartName(visualEditor.getTitle());
+
+ setPreviewIndex(addPage(visualEditor, getEditorInput(),sourceEditor));
+ setPageText(getPreviewIndex(),
+ JSPEditorMessages.JSPMultiPageEditor_TabLabel_Preview);
+ setPartName(visualEditor.getTitle());
+ } else {
+ sourceIndex = addPage(sourceEditor, getEditorInput(),sourceEditor);
+ setPageText(sourceIndex, sourceTabLabel);
+ setPartName(sourceEditor.getTitle());
+ /*
+ * When there is only the source part --
+ * then VpeController very likely hasn't been created.
+ * Thus Bundle Map should be initialized here instead of
+ * VpeController.
+ */
bundleMap.init(sourceEditor.getEditorInput());
}
}
@@ -845,7 +811,7 @@
.getString(IVpePreferencesPage.DEFAULT_VPE_TAB);
try {
int ind = Integer.parseInt(tabIndex);
- getTabFolder().setSelection(ind);
+ setActivePage(ind);
pageChange(ind);
} catch (NumberFormatException e) {
JspEditorPlugin.getPluginLog().logError(e);
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -28,7 +28,9 @@
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -46,6 +48,7 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.EditorPart;
+import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.part.PageSwitcher;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
@@ -55,7 +58,7 @@
/**
*
*/
-public abstract class JSPMultiPageEditorPart extends EditorPart {
+public abstract class JSPMultiPageEditorPart extends MultiPageEditorPart {
private static final String COMMAND_NEXT_SUB_TAB = "org.eclipse.ui.navigate.nextSubTab"; //$NON-NLS-1$
private static final String COMMAND_PREVIOUS_SUB_TAB = "org.eclipse.ui.navigate.previousSubTab"; //$NON-NLS-1$
@@ -71,15 +74,9 @@
super();
}
- public int addPage(Control control) {
- createItem(control);
- return getPageCount() - 1;
- }
-
/**
*
*/
-
Composite ppp = null;
/**
*
@@ -138,143 +135,17 @@
return getPageCount() - 1;
}
- /**
- *
- * @param parent
- * @return
- */
- private CTabFolder createContainer(Composite parent) {
- final CTabFolder newContainer = new CTabFolder(parent, SWT.BOTTOM
- | SWT.FLAT);
- newContainer.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- int newPageIndex = newContainer.indexOf((CTabItem) e.item);
- pageChange(newPageIndex);
- }
- });
- newContainer.addTraverseListener(new TraverseListener() {
- // Switching tabs by Ctrl+PageUp/PageDown must not be caught on the inner tab set
- public void keyTraversed(TraverseEvent e) {
- switch (e.detail) {
- case SWT.TRAVERSE_PAGE_NEXT:
- case SWT.TRAVERSE_PAGE_PREVIOUS:
- int detail = e.detail;
- e.doit = true;
- e.detail = SWT.TRAVERSE_NONE;
- Control control = newContainer.getParent();
- control.traverse(detail, new Event());
- }
- }
- });
-
- return newContainer;
- }
-
/*
*
*/
private CTabItem createItem(Control control) {
- CTabItem item = new CTabItem(getTabFolder(), SWT.NONE);
+ CTabItem item = new CTabItem((CTabFolder)getContainer(), SWT.NONE);
item.setControl(control);
return item;
}
protected abstract void createPages();
- public final void createPartControl(Composite parent) {
- this.tabFolderContainer = createContainer(parent);
- createPages();
- // set the active page (page 0 by default), unless it has already been
- // done
- if (getActivePage() == -1)
- setActivePage(0);
-
- initializePageSwitching();
- initializeSubTabSwitching();
- }
-
- /*
- * Initialize the MultiPageEditorPart to use the page switching command.
- */
- protected void initializePageSwitching() {
- new PageSwitcher(this) {
- public Object[] getPages() {
- int pageCount = getPageCount();
- Object[] result = new Object[pageCount];
- for (int i = 0; i < pageCount; i++) {
- result[i] = new Integer(i);
- }
- return result;
- }
-
- public String getName(Object page) {
- return getPageText(((Integer) page).intValue());
- }
-
- public ImageDescriptor getImageDescriptor(Object page) {
- Image image = getPageImage(((Integer) page).intValue());
- if (image == null)
- return null;
-
- return ImageDescriptor.createFromImage(image);
- }
-
- public void activatePage(Object page) {
- setActivePage(((Integer) page).intValue());
- }
-
- public int getCurrentPageIndex() {
- return getActivePage();
- }
- };
- }
-
- /*
- * Initialize the MultiPageEditorPart to use the sub-tab switching commands.
- */
- private void initializeSubTabSwitching() {
- IHandlerService service = (IHandlerService) getSite().getService(IHandlerService.class);
- service.activateHandler(COMMAND_NEXT_SUB_TAB, new AbstractHandler() {
- /**
- * {@inheritDoc}
- * @throws ExecutionException
- * if an exception occurred during execution
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- int n= getPageCount();
- if (n == 0)
- return null;
-
- int i= getActivePage() + 1;
- if (i >= n)
- i= 0;
- setActivePage(i);
- pageChange(i);
- return null;
- }
- });
-
- service.activateHandler(COMMAND_PREVIOUS_SUB_TAB, new AbstractHandler() {
- /**
- * {@inheritDoc}
- * @throws ExecutionException
- * if an exception occurred during execution
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- int n= getPageCount();
- if (n == 0)
- return null;
-
- int i= getActivePage() - 1;
- if (i < 0)
- i= n - 1;
- setActivePage(i);
- pageChange(i);
- return null;
- }
- });
- }
-
protected abstract IEditorSite createSite(IEditorPart editor);
public void dispose() {
@@ -288,7 +159,7 @@
}
nestedEditors.clear();
}
-
+
protected IEditorPart getActiveEditor() {
int index = getActivePage();
if (index != -1)
@@ -296,88 +167,10 @@
return null;
}
- protected int getActivePage() {
- CTabFolder tabFolder = getTabFolder();
- if (tabFolder != null && !tabFolder.isDisposed())
- return tabFolder.getSelectionIndex();
- return -1;
- }
-
- protected Composite getContainer() {
- return tabFolderContainer;
- }
-
- protected Control getControl(int pageIndex) {
- return getItem(0).getControl();
- }
-
- protected IEditorPart getEditor(int pageIndex) {
- Item item = getItem(pageIndex);
- if (item != null) {
- Object data = item.getData();
- if (data instanceof IEditorPart) {
- return (IEditorPart) data;
- }
- }
- return null;
- }
-
- /**
- * Find the editors contained in this multi-page editor
- * whose editor input match the provided input.
- * @param input the editor input
- * @return the editors contained in this multi-page editor
- * whose editor input match the provided input
- * @since 3.3
- */
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public final IEditorPart[] findEditors(IEditorInput input) {
- List result = new ArrayList();
- int count = getPageCount();
- for (int i = 0; i < count; i++) {
- IEditorPart editor = getEditor(i);
- if (editor != null
- && editor.getEditorInput() != null
- && editor.getEditorInput().equals(input)) {
- result.add(editor);
- }
- }
- return (IEditorPart[]) result.toArray(new IEditorPart[result.size()]);
- }
-
-
- private CTabItem getItem(int pageIndex) {
- return getTabFolder().getItem(pageIndex);
- }
-
- protected int getPageCount() {
- CTabFolder folder = getTabFolder();
- // May not have been created yet, or may have been disposed.
- if (folder != null && !folder.isDisposed())
- return folder.getItemCount();
- return 0;
- }
-
- protected Image getPageImage(int pageIndex) {
- return getItem(pageIndex).getImage();
- }
-
- protected String getPageText(int pageIndex) {
- return getItem(pageIndex).getText();
- }
-
- protected CTabFolder getTabFolder() {
- return tabFolderContainer;
- }
-
public SelectionBar getSelectionBar() {
return selectionBar;
}
- protected void handlePropertyChange(int propertyId) {
- firePropertyChange(propertyId);
- }
-
public void init(IEditorSite site, IEditorInput input)
throws PartInitException {
setSite(site);
@@ -385,17 +178,6 @@
site.setSelectionProvider(new JSPMultiPageSelectionProvider(this));
}
- public boolean isDirty() {
- // use nestedEditors to avoid SWT requests; see bug 12996
- for (Iterator i = nestedEditors.iterator(); i.hasNext();) {
- IEditorPart editor = (IEditorPart) i.next();
- if (editor.isDirty()) {
- return true;
- }
- }
- return false;
- }
-
protected abstract void pageChange(int newPageIndex);
private void disposePart(final IWorkbenchPart part) {
@@ -414,25 +196,6 @@
});
}
- public void removePage(int pageIndex) {
- Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
- IEditorPart editor = getEditor(pageIndex);
- getItem(pageIndex).dispose();
- if (editor != null) {
- nestedEditors.remove(editor);
- disposePart(editor);
- }
- }
-
- protected void setActivePage(int pageIndex) {
- Assert.isTrue(pageIndex >= 0 && pageIndex < getPageCount());
- getTabFolder().setSelection(pageIndex);
- }
-
- protected void setControl(int pageIndex, Control control) {
- getItem(pageIndex).setControl(control);
- }
-
public void setFocus() {
setFocus(getActivePage());
}
@@ -471,13 +234,4 @@
}
}
}
-
- protected void setPageImage(int pageIndex, Image image) {
- getItem(pageIndex).setImage(image);
- }
-
- protected void setPageText(int pageIndex, String text) {
- getItem(pageIndex).setText(text);
- }
-
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageSelectionProvider.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -64,7 +64,7 @@
}
public ISelection getSelection() {
- IEditorPart activeEditor = multiPageEditor.getActiveEditor();
+ IEditorPart activeEditor = ((JSPMultiPageEditorPart) multiPageEditor).getActiveEditor();
if (activeEditor != null) {
ISelectionProvider selectionProvider = activeEditor.getSite()
.getSelectionProvider();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -1533,40 +1533,31 @@
}
// for debug
- private void printSourceEvent(INodeNotifier notifier, int eventType,
- Object feature, Object oldValue, Object newValue, int pos) {
- System.out
- .println(">>> eventType: " + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + //$NON-NLS-1$
- " pos: " + pos
- + " notifier: " + ((Node) notifier).getNodeName() + //$NON-NLS-1$ //$NON-NLS-2$
- " hashCode: " + notifier.hashCode()); //$NON-NLS-1$
+ private void printSourceEvent(INodeNotifier notifier, int eventType, Object feature, Object oldValue,
+ Object newValue, int pos) {
+ System.out.println(">>> eventType: " + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + //$NON-NLS-1$
+ " pos: " + pos + " notifier: " + ((Node) notifier).getNodeName() + //$NON-NLS-1$ //$NON-NLS-2$
+ " hashCode: " + notifier.hashCode()); //$NON-NLS-1$
if (feature != null) {
if (feature instanceof Node) {
- System.out
- .println(" feature: " + ((Node) feature).getNodeType() + //$NON-NLS-1$
- Constants.WHITE_SPACE
- + ((Node) feature).getNodeName()
- + " hashCode: " + feature.hashCode()); //$NON-NLS-1$
+ System.out.println(" feature: " + ((Node) feature).getNodeType() + //$NON-NLS-1$
+ Constants.WHITE_SPACE + ((Node) feature).getNodeName() + " hashCode: " + feature.hashCode()); //$NON-NLS-1$
} else {
System.out.println(" feature: " + feature); //$NON-NLS-1$
}
}
if (oldValue != null) {
if (oldValue instanceof Node) {
- System.out
- .println(" oldValue: " + ((Node) oldValue).getNodeName() + //$NON-NLS-1$
- " hashCode: " + oldValue.hashCode()); //$NON-NLS-1$
+ System.out.println(" oldValue: " + ((Node) oldValue).getNodeName() + //$NON-NLS-1$
+ " hashCode: " + oldValue.hashCode()); //$NON-NLS-1$
} else {
System.out.println(" oldValue: " + oldValue); //$NON-NLS-1$
}
}
if (newValue != null) {
if (newValue instanceof Node) {
- System.out
- .println(" newValue: " + ((Node) newValue).getNodeName() + //$NON-NLS-1$
- " hashCode: " + newValue.hashCode()
- + Constants.WHITE_SPACE
- + ((Node) newValue).getNodeType()); //$NON-NLS-1$
+ System.out.println(" newValue: " + ((Node) newValue).getNodeName() + //$NON-NLS-1$
+ " hashCode: " + newValue.hashCode() + Constants.WHITE_SPACE + ((Node) newValue).getNodeType()); //$NON-NLS-1$
} else {
System.out.println(" newValue: " + newValue); //$NON-NLS-1$
}
@@ -1629,24 +1620,6 @@
}
}
- // void refreshBundleValues() {
- // if
- // (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE))
- // {
- // return;
- // }
- // try {
- // if (bundle != null) {
- // bundle.refresh();
- // if (pageContext != null) {
- // pageContext.refreshBundleValues();
- // }
- // }
- // } finally {
- // switcher.stopActiveEditor();
- // }
- // }
- //
void refreshTemplates() {
if (includeList.includesRefresh()) {
visualRefresh();
@@ -1678,164 +1651,6 @@
public void structureChanged(XModelTreeEvent event) {
}
- // private Node getSourceNodeAt(int offset) {
- // if (sourceEditor != null && getModel() != null) {
- // IndexedRegion node = getModel().getIndexedRegion(offset);
- // if (node instanceof IDOMNode) {
- // VpeElementMapping elementMapping = domMapping
- // .getNearElementMapping((IDOMNode) node);
- // if (elementMapping != null) {
- // if (node instanceof IDOMElement) {
- // IDOMElement element = (IDOMElement) node;
- //
- // if (offset < element.getEndStartOffset()) {
- // NamedNodeMap attrs = element.getAttributes();
- // if (attrs != null) {
- // for (int i = 0; i < attrs.getLength(); i++) {
- // if (attrs.item(i) instanceof AttrImpl) {
- // AttrImpl attr = (AttrImpl) attrs.item(i);
- // if (getSourceAttributeOffset(attr, offset) != -1) {
- // String[] atributeNames =
- // elementMapping.getTemplate().getOutputAtributeNames();
- // if (atributeNames != null
- // && atributeNames.length > 0
- // && attr.getName().equalsIgnoreCase(atributeNames[0])) {
- // return attr;
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // }
- // if (node == null) {
- // node = getModel().getIndexedRegion(offset - 1);
- // }
- // if (node instanceof Node) {
- // return (Node) node;
- // }
- // }
- // return null;
- // }
- //
- // private int getSourceNodeOffset(Node node, int pos, boolean endFlag) {
- // if (node == null)
- // return 0;
- // int start = ((IndexedRegion) node).getStartOffset();
- // int end = ((IndexedRegion) node).getEndOffset();
- //
- // switch (node.getNodeType()) {
- // case Node.ATTRIBUTE_NODE:
- // if (node instanceof AttrImpl) {
- // return getSourceAttributeOffset((AttrImpl) node, pos);
- // }
- // case Node.TEXT_NODE:
- // if (pos < start) {
- // return 0;
- // } else if (pos > end) {
- // return end - start;
- // } else {
- // return pos - start;
- // }
- // case Node.COMMENT_NODE:
- // if (pos > end) {
- // pos = end;
- // }
- // int offset = pos - start - 4;
- // return offset < 0 ? 0 : offset;
- // case Node.ELEMENT_NODE:
- // ElementImpl element = (ElementImpl) node;
- // if (element.isContainer()) {
- // if (pos < element.getStartEndOffset()) {
- // return 0;
- // } else {
- // return 1;
- // }
- // } else {
- // return endFlag ? 1 : 0;
- // }
- // default:
- // return endFlag ? 1 : 0;
- // }
- // }
- //
- // private int getSourceAttributeOffset(AttrImpl attr, int pos) {
- // if (attr.getValueRegion() != null) {
- // int start = attr.getValueRegionStartOffset();
- // String value = attr.getValueRegionText();
- // int len = value.length();
- // if (pos >= start && pos <= start + len) {
- // int offset = pos - start;
- // if (len > 1 && value.charAt(0) == '"'
- // && value.charAt(len - 1) == '"') {
- // if (offset <= 0 || offset >= len) {
- // return -1;
- // }
- // offset--;
- // }
- // return offset;
- // }
- // }
- // return -1;
- // }
- //
- // private int getSourceNodeOffset1(Node node, int pos, boolean endFlag) {
- // if (node == null)
- // return 0;
- // int start = ((IndexedRegion) node).getStartOffset();
- // int end = ((IndexedRegion) node).getEndOffset();
- //
- // switch (node.getNodeType()) {
- // case Node.ATTRIBUTE_NODE:
- // if (node instanceof AttrImpl) {
- // AttrImpl attr = (AttrImpl) node;
- // start = attr.getValueRegionStartOffset();
- // end = start + attr.getValueRegion().getLength();
- // int ret = 0;
- // if (pos > end) {
- // ret = end - start;
- // } else {
- // ret = pos - start;
- // }
- // if (ret > 0 && attr.getValueRegionText().charAt(0) == '"') {
- // ret--;
- // }
- // return ret;
- // }
- // case Node.TEXT_NODE:
- // if (pos < start) {
- // return 0;
- // } else if (pos > end) {
- // return end - start;
- // } else {
- // return pos - start;
- // }
- // case Node.COMMENT_NODE:
- // if (pos > end) {
- // pos = end;
- // }
- // int offset = pos - start - 4;
- // return offset < 0 ? 0 : offset;
- // case Node.ELEMENT_NODE:
- // ElementImpl element = (ElementImpl) node;
- // if (element.isContainer()) {
- // if (pos < element.getStartEndOffset()) {
- // return 0;
- // } else if (pos < element.getStartEndOffset()) {
- // return 1;
- // } else if (pos == element.getStartEndOffset()) {
- // return 2;
- // }
- // } else {
- // return endFlag ? 1 : 0;
- // }
- // default:
- // return endFlag ? 1 : 0;
- // }
- // }
-
public class VpeSelectionProvider implements ISelectionProvider {
VpeSelection selection;
@@ -1952,22 +1767,6 @@
}
}
-// this method is never used
-// public void dragEnter(nsIDOMEvent event) {
-// if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
-// System.out.println("<<<<<<<<<<<<<<<<<<<< DragEnter"); //$NON-NLS-1$
-// }
-// }
-
-// this method is never used
-// public void dragExit(nsIDOMEvent event) {
-// if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
-// System.out.println("<<<<<<<<<<<<<<<<<<<< dragExit"); //$NON-NLS-1$
-// }
-// // TODO Sergey Vasilyev figure out with drag caret
-// // xulRunnerEditor.hideDragCaret();
-// }
-
public String getTagName(XModelObject object) {
String tagname = object.getAttributeValue("name"); //$NON-NLS-1$
@@ -2198,66 +1997,10 @@
}
}
-// this method is never used
-// // nsIClipboardDragDropHooks implementation
-// public void onPasteOrDrop(nsIDOMMouseEvent mouseEvent, String flavor,
-// String data) {
-// onHideTooltip();
-//
-// VpeVisualInnerDropInfo visualDropInfo = selectionBuilder
-// .getInnerDropInfo(mouseEvent);
-// Point range = selectionBuilder.getSourceSelectionRangeAtVisualNode(
-// visualDropInfo.getDropContainer(), (int) visualDropInfo
-// .getDropOffset());
-// VpeSourceInnerDropInfo sourceDropInfo = null;
-//
-// XModelObject object = PreferenceModelUtilities.getPreferenceModel()
-// .getModelBuffer().source();
-//
-// String tagname = getTagName(object);
-// if (tagname.indexOf("taglib") >= 0)tagname = "taglib"; //$NON-NLS-1$ //$NON-NLS-2$
-// Node sourceDragNode = ((Document) getModel().getAdapter(Document.class))
-// .createElement(tagname);
-// if (visualDropInfo.getDropContainer() != null) {
-// sourceDropInfo = visualBuilder.getSourceInnerDropInfo(
-// sourceDragNode, visualDropInfo, true);
-// range = selectionBuilder.getSourceSelectionRange(sourceDropInfo
-// .getContainer(), sourceDropInfo.getOffset());
-// }
-//
-// if (visualDropInfo.getDropContainer() != null) {
-// if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
-// System.out
-// .println(" drop! container: " + visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
-// }
-// final String finalFlavor = flavor;
-// final String finalData = data;
-// final Point finalRange = range;
-// final Node finalDropContainer = sourceDropInfo == null ? null
-// : sourceDropInfo.getContainer();
-// Display.getDefault().asyncExec(new Runnable() {
-// public void run() {
-// externalDropAny(finalFlavor, finalData, finalRange,
-// finalDropContainer);
-// }
-// });
-// }
-// }
-
public void drop(Node node, Node parentNode, int offset) {
visualBuilder.innerDrop(node, parentNode, offset);
}
-// this method is never used
-// /*
-// * (non-Javadoc)
-// *
-// * @see org.mozilla.interfaces.nsISupports#queryInterface(java.lang.String)
-// */
-// public nsISupports queryInterface(String arg0) {
-// return Mozilla.getInstance().queryInterface(this, arg0);
-// }
-
/**
* Calls when editor content changed, and we should highlight selected element.
*/
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -340,12 +340,11 @@
}
// check source node can be changed and link can be a null in this case
// we shouldn't process this node
- if (sourceNode == null
- || (sourceNode.getNodeType() != Node.TEXT_NODE
- && sourceNode.getNodeType() != Node.ELEMENT_NODE
- && sourceNode.getNodeType() != Node.COMMENT_NODE
- && sourceNode.getNodeType() != Node.CDATA_SECTION_NODE
- && sourceNode.getNodeType() != Node.DOCUMENT_NODE)) {
+ if (sourceNode.getNodeType() != Node.TEXT_NODE
+ && sourceNode.getNodeType() != Node.ELEMENT_NODE
+ && sourceNode.getNodeType() != Node.COMMENT_NODE
+ && sourceNode.getNodeType() != Node.CDATA_SECTION_NODE
+ && sourceNode.getNodeType() != Node.DOCUMENT_NODE) {
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -75,24 +75,9 @@
}
public VpeNodeMapping getNodeMappingAtVisualNode(nsIDOMNode visualNode) {
-
-
- Iterator<Map.Entry<nsIDOMNode, VpeNodeMapping>> iter = visualMap.entrySet().iterator();
- //Map.get() doesn't work correctly for this situation
- while(iter.hasNext()){
- Map.Entry<nsIDOMNode,VpeNodeMapping> element = iter.next();
- nsIDOMNode key = element.getKey();
- if(visualNode!=null&&visualNode.equals(key)) {
-
- return element.getValue();
- }
-
+ if(visualNode!=null) {
+ return visualMap.get(visualNode);
}
-//
-// if (visualNode != null) {
-// return visualMap.get(visualNode);
-// }
-
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -58,7 +58,7 @@
}
public nsIDOMElement getVisualElement() {
- return (nsIDOMElement) getVisualNode();
+ return (nsIDOMElement) this.visualNode;
}
public VpeTemplate getTemplate() {
@@ -96,7 +96,7 @@
while(true){
if(this.border.equals(element)) return true;
- if(getVisualNode().equals(element)) return false;
+ if(this.visualNode.equals(element)) return false;
element = element.getParentNode();
if(element == null) break;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeNodeMapping.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -13,9 +13,13 @@
import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Node;
+/**
+ * Stores a relation between Node in source model and nsIDOMNode in in visual model
+ * @see VpeDomMapping
+ */
public class VpeNodeMapping {
- private Node sourceNode;
- private nsIDOMNode visualNode;
+ Node sourceNode;
+ nsIDOMNode visualNode;
public VpeNodeMapping(Node sourceNode, nsIDOMNode visualNode) {
this.sourceNode = sourceNode;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -122,12 +122,11 @@
public static final String ICON_NON_VISUAL_TAGS = "icons/non-visusal-tags.gif"; //$NON-NLS-1$
public static final String ICON_TEXT_FORMATTING = "icons/text-formatting.gif"; //$NON-NLS-1$
public static final String ICON_BUNDLE_AS_EL= "icons/bundle-as-el.gif"; //$NON-NLS-1$
-//static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
+
private XulRunnerEditor xulRunnerEditor;
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
- private MozillaEventAdapter mozillaEventAdapter
- = createMozillaEventAdapter();
+ private MozillaEventAdapter mozillaEventAdapter = createMozillaEventAdapter();
private EditorLoadWindowListener editorLoadWindowListener;
@@ -149,7 +148,7 @@
private Action showNonVisualTagsAction;
private Action showTextFormattingAction;
private Action showBundleAsELAction;
-// private Action externalizeStringsAction;
+
static {
/*
@@ -477,28 +476,15 @@
*/
@Override
public void createPartControl(final Composite parent) {
- //Setting Layout for the parent Composite
-// parent.setLayout(new FillLayout());
-
- /*
- * https://jira.jboss.org/jira/browse/JBIDE-4062
- * Creating scrollable eclipse element.
- */
-// ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-// sc.setLayout(new FillLayout());
-// Composite composite = new Composite(parent, SWT.NATIVE);
- GridLayout layout = new GridLayout(2,false);
+ GridLayout layout = new GridLayout(2,false);
layout.marginHeight = 0;
layout.marginWidth = 2;
layout.verticalSpacing = 2;
layout.horizontalSpacing = 2;
layout.marginBottom = 0;
parent.setLayout(layout);
-// composite.setLayout(layout);
-// composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-
+
// Editors and Toolbar composite
Composite cmpEdTl = new Composite(parent, SWT.NONE);
GridLayout layoutEdTl = new GridLayout(1, false);
@@ -537,49 +523,11 @@
cmpEd.setLayout(layoutEd);
cmpEd.setLayoutData(new GridData(GridData.FILL_BOTH));
- //TODO Add a paintListener to cmpEd and give him a border top and left only
+ //TODO Add a paintListener to cmpEd and give him a border top and left only
Color buttonDarker = parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
cmpEd.setBackground(buttonDarker);
try {
- /*xulRunnerEditor = new XulRunnerEditor(cmpEd) {
- public void onLoadWindow() {
- // if the first load page
- if (!isRefreshPage()) {
- super.onLoadWindow();
-// MozillaEditor.this.onLoadWindow();
- }
- // if only refresh page
- else {
-
- MozillaEditor.this.onReloadWindow();
- setRefreshPage(false);
- }
-
- }
- public void onElementResize(nsIDOMElement element, int constrains, int top, int left, int width, int height) {
- if (editorDomEventListener != null) {
- editorDomEventListener.elementResized(element, constrains, top, left, width, height);
- }
- }
- public void onShowTooltip(int x, int y, String text) {
- if (editorDomEventListener != null) {
- editorDomEventListener.onShowTooltip(x, y, text);
- }
- }
- public void onHideTooltip() {
- if (editorDomEventListener != null) {
- editorDomEventListener.onHideTooltip();
- }
- }
- public void onDispose() {
- tearDownEditor();
- removeDomEventListeners();
- headNode = null;
- contentArea = null;
- super.onDispose();
- }
- };*/
xulRunnerEditor = new XulRunnerEditor2(cmpEd, this);
xulRunnerEditor.getBrowser().addProgressListener(new ProgressListener() {
@@ -598,41 +546,20 @@
showXulRunnerError(cmpEd, ex);
}
}
-
});
-
+
setInitialContent();
- // Wait while visual part is loaded
- //commented by mareshkau, fix for jbide-3032
-// while (!loaded) {
-// if (!Display.getCurrent().readAndDispatch())
-// Display.getCurrent().sleep();
-// }
xulRunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
} catch (Throwable t) {
/*
- * https://jira.jboss.org/browse/JBIDE-6690
* Disable VPE toolbar
*/
if (verBar != null) {
verBar.setEnabled(false);
}
- /*
- * Show the exception
- */
showXulRunnerError(cmpEd, t);
}
-
- /*
- * https://jira.jboss.org/jira/browse/JBIDE-4062
- * Computing elements sizes to set up scroll bars.
- */
-// Point totalSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-// sc.setContent(composite);
-// sc.setExpandHorizontal(true);
-// sc.setExpandVertical(true);
-// sc.setMinSize(totalSize);
}
/**
@@ -716,23 +643,24 @@
link.addMouseListener(new MouseListener() {
public void mouseDown(org.eclipse.swt.events.MouseEvent e) {
- BusyIndicator.showWhile(link.getDisplay(), new Runnable() {
- public void run() {
- URL theURL=null;;
+ BusyIndicator.showWhile(link.getDisplay(), new Runnable() {
+ public void run() {
+ URL theURL = null;
+ ;
try {
theURL = new URL(VpeUIMessages.MOZILLA_LOADING_ERROR_LINK);
} catch (MalformedURLException e) {
VpePlugin.reportProblem(e);
}
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
- try {
+ IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
+ try {
support.getExternalBrowser().openURL(theURL);
} catch (PartInitException e) {
VpePlugin.reportProblem(e);
}
- }
- });
- }
+ }
+ });
+ }
public void mouseDoubleClick(MouseEvent e) {
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -26,6 +26,10 @@
import org.jboss.tools.vpe.editor.mozilla.listener.EditorLoadWindowListener;
import org.jboss.tools.vpe.editor.mozilla.listener.MozillaDndListener;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.xulrunner.PlatformIsNotSupportedException;
+import org.jboss.tools.vpe.xulrunner.XulRunnerBundleNotFoundException;
+import org.jboss.tools.vpe.xulrunner.XulRunnerException;
+import org.mozilla.xpcom.XPCOMException;
/**
* a class implementation of mozilla preview
@@ -55,33 +59,20 @@
@Override
public void createPartControl(final Composite parent) {
try {
- /*setXulRunnerEditor(new XulRunnerEditor(parent) {
- public void onLoadWindow() {
- super.onLoadWindow();
- MozillaPreview.this.onLoadWindow();
- }
-
- public void onShowTooltip(int x, int y, String text) {
- if (editorDomEventListener != null) {
- editorDomEventListener.onShowTooltip(x, y, text);
- }
- }
- public void onHideTooltip() {
- if (editorDomEventListener != null) {
- editorDomEventListener.onHideTooltip();
- }
- }
- public void onDispose() {
- removeDomEventListeners();
- super.onDispose();
- }
- });*/
setXulRunnerEditor(new XulRunnerPreview(parent, this));
setInitialContent();
getXulRunnerEditor().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- } catch (Throwable e) {
+ } catch (XulRunnerBundleNotFoundException e) {
+ // TODO add page with explanation what to do
showXulRunnerError(parent, e);
- }
+ } catch (PlatformIsNotSupportedException e) {
+ // TODO add page with explanation what platforms supported and what tod o
+ showXulRunnerError(parent, e);
+ } catch (XulRunnerException e) {
+ showXulRunnerError(parent, e);
+ } catch(XPCOMException e) {
+ showXulRunnerError(parent, e);
+ }
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/TestUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/TestUtil.java 2011-09-28 20:37:11 UTC (rev 35137)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.base.test/src/org/jboss/tools/vpe/base/test/TestUtil.java 2011-09-28 22:16:46 UTC (rev 35138)
@@ -155,12 +155,6 @@
* Wait until all background tasks are complete.
*/
public static void waitForJobs() {
- //commented by Maksim Areshkau
- //because this method wait only for jobs which has been runned in current thread,
- //and don't wait for others. It can cause https://jira.jboss.org/jira/browse/JBIDE-5820
- //https://jira.jboss.org/jira/browse/JBIDE-5821
-// while (Job.getJobManager().currentJob() != null)
-// delay(100);
waitForIdle();
}
14 years, 2 months
JBoss Tools SVN: r35137 - in trunk/esb/plugins: org.jboss.tools.esb.project.core/META-INF and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-09-28 16:37:11 -0400 (Wed, 28 Sep 2011)
New Revision: 35137
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
Log:
JBDS-1864- adding ESB 4.10 to the list of supported runtimes
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2011-09-28 20:37:11 UTC (rev 35137)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.jboss.tools.esb.project.core;singleton:=true
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.5.1.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.jboss.tools.esb.core.ESBProjectCorePlugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2011-09-28 20:37:11 UTC (rev 35137)
@@ -9,6 +9,9 @@
<label>
JBoss ESB
</label>
+ <version-comparator
+ class="org.jboss.tools.esb.project.core.comparator.ESBRuntimeVersionComparator">
+ </version-comparator>
</project-facet>
<project-facet-version
facet="jst.jboss.esb"
@@ -136,6 +139,24 @@
</and>
</constraint>
</project-facet-version>
+ <project-facet-version
+ facet="jst.jboss.esb"
+ version="4.10">
+ <group-member
+ id="modules">
+ </group-member>
+ <constraint>
+ <and>
+ <conflicts
+ group="modules">
+ </conflicts>
+ <requires
+ facet="jst.java"
+ version="[5.0">
+ </requires>
+ </and>
+ </constraint>
+ </project-facet-version>
<action
facet="jst.jboss.esb"
id="jst.jboss.esb.install"
@@ -165,7 +186,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component"
@@ -175,7 +196,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.eap.runtime.component"
@@ -218,7 +239,7 @@
projects="true">
<moduleType
types="jst.jboss.esb"
- versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</moduleType>
</moduleFactory>
</extension>
@@ -317,6 +338,23 @@
id="org.jboss.ide.eclipse.as.runtime.60">
</supportedRuntimeType>
</Resolver>
+ <Resolver
+ class="org.jboss.tools.esb.core.runtime.ESBRuntimeResolver_410"
+ esbVersion="4.10"
+ name="ESB runtime resolver">
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.eap.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.50">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.60">
+ </supportedRuntimeType>
+ </Resolver>
</extension>
</plugin>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2011-09-28 20:37:11 UTC (rev 35137)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.tools.esb</groupId>
<artifactId>plugins</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.5.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.core</artifactId>
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java 2011-09-28 20:37:11 UTC (rev 35137)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.esb.core.runtime;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+
+public class ESBRuntimeResolver_410 extends AbstractESBRuntimeResolver implements
+ IESBRuntimeResolver {
+
+ private final static String JUDDI_CLIENT_JAR_31 = "juddi-client-3.1.0.jar";
+ private final static String JUDDI_CLIENT_JAR_311 = "juddi-client-3.1.1.jar";
+
+ public boolean isValidESBRuntime(String location, String version, String configuration){
+ List<String> jarNames = new ArrayList<String>();
+
+ for(File file : getAllRuntimeJars(location, configuration)){
+ jarNames.add(file.getName());
+ }
+
+ return jarNames.contains(ROSETTA_JAR) &&
+ (jarNames.contains(JUDDI_CLIENT_JAR_31) || jarNames.contains(JUDDI_CLIENT_JAR_311));
+ }
+
+
+ public List<IPath> getJarDirectories(String runtimeLocation, String configuration) {
+ List<IPath> directories = super.getJarDirectories(runtimeLocation, configuration);
+ IPath rtHome = new Path(runtimeLocation);
+ IPath soapDeployPath = rtHome.append(SOAP_AS_LOCATION)
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+
+ IPath deployPath = rtHome
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+ directories.add(soapDeployPath);
+ directories.add(deployPath);
+
+ return directories;
+ }
+
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java 2011-09-28 20:37:11 UTC (rev 35137)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2009, 2011 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,
@@ -23,6 +23,8 @@
private final static String CONFIG_MODEL_JAR_12 = "jbossesb-config-model-1.2.0.jar";
private final static String CONFIG_MODEL_JAR_13 = "jbossesb-config-model-1.3.0.jar";
+ private final static String JUDDI_CLIENT_JAR_303 = "juddi-client-3.0.3.jar";
+ private final static String JUDDI_CLIENT_JAR_304 = "juddi-client-3.0.4.jar";
public boolean isValidESBRuntime(String location, String version, String configuration){
@@ -34,7 +36,8 @@
return jarNames.contains(ROSETTA_JAR)
&& jarNames.contains(CONFIG_MODEL_JAR_12)
- && jarNames.contains(CONFIG_MODEL_JAR_13);
+ && jarNames.contains(CONFIG_MODEL_JAR_13)
+ && (jarNames.contains(JUDDI_CLIENT_JAR_303) || jarNames.contains(JUDDI_CLIENT_JAR_304));
}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java 2011-09-28 20:37:11 UTC (rev 35137)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.esb.project.core.comparator;
+
+import java.util.Comparator;
+
+/**
+ * @author bfitzpat
+ *
+ */
+public class ESBRuntimeVersionComparator implements Comparator<String> {
+
+ public int compare(String arg0, String arg1) {
+ Integer[] versions1 = parse(arg0, '.');
+ Integer[] versions2 = parse(arg1, '.');
+ if (versions1 != null && versions2 != null) {
+ int compareMajor = versions1[0].compareTo(versions2[0]);
+ int compareMinor = versions1[1].compareTo(versions2[1]);
+ if (compareMajor == 0) {
+ return compareMinor;
+ } else {
+ return compareMajor;
+ }
+ }
+ return 0;
+ }
+
+ private Integer[] parse ( String input, char separator) {
+ if (input == null)
+ return null;
+ int pos = input.indexOf(separator);
+ String out1 = input.substring(0, pos);
+ String out2 = input.substring(pos + 1, input.length());
+ if (out1 != null && out2 != null) {
+ Integer intOut1 = Integer.parseInt(out1);
+ Integer intOut2 = Integer.parseInt(out2);
+ return new Integer[]{intOut1, intOut2};
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2011-09-28 20:37:11 UTC (rev 35137)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.esb.project.ui;singleton:=true
-Bundle-Version: 1.5.0.qualifier
+Bundle-Version: 1.5.1.qualifier
Bundle-Activator: org.jboss.tools.esb.project.ui.ESBProjectPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2011-09-28 20:37:11 UTC (rev 35137)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.tools.esb</groupId>
<artifactId>plugins</artifactId>
- <version>1.5.0-SNAPSHOT</version>
+ <version>1.5.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.ui</artifactId>
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2011-09-28 20:36:01 UTC (rev 35136)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2011-09-28 20:37:11 UTC (rev 35137)
@@ -636,7 +636,7 @@
if(versionNumber >= 4.7){
cmVersions.add("1.2.0"); //$NON-NLS-1$
}
- if(versionNumber >= 4.9){
+ if(versionNumber >= 4.9 || versionNumber == 4.10){
cmVersions.add("1.3.0"); //$NON-NLS-1$
}
int index = cmVersions.getItemCount() - 1;
14 years, 2 months
JBoss Tools SVN: r35136 - in branches/jbosstools-3.2.x/esb/plugins: org.jboss.tools.esb.project.core/META-INF and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-09-28 16:36:01 -0400 (Wed, 28 Sep 2011)
New Revision: 35136
Added:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
Log:
JBDS-1864- adding ESB 4.10 to the list of supported runtimes
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2011-09-28 20:36:01 UTC (rev 35136)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.jboss.tools.esb.project.core;singleton:=true
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.4.1.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.jboss.tools.esb.core.ESBProjectCorePlugin
Require-Bundle: org.eclipse.ui,
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/plugin.xml 2011-09-28 20:36:01 UTC (rev 35136)
@@ -9,6 +9,9 @@
<label>
JBoss ESB
</label>
+ <version-comparator
+ class="org.jboss.tools.esb.project.core.comparator.ESBRuntimeVersionComparator">
+ </version-comparator>
</project-facet>
<project-facet-version
facet="jst.jboss.esb"
@@ -136,6 +139,24 @@
</and>
</constraint>
</project-facet-version>
+ <project-facet-version
+ facet="jst.jboss.esb"
+ version="4.10">
+ <group-member
+ id="modules">
+ </group-member>
+ <constraint>
+ <and>
+ <conflicts
+ group="modules">
+ </conflicts>
+ <requires
+ facet="jst.java"
+ version="[5.0">
+ </requires>
+ </and>
+ </constraint>
+ </project-facet-version>
<action
facet="jst.jboss.esb"
id="jst.jboss.esb.install"
@@ -165,7 +186,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component"
@@ -175,7 +196,7 @@
<supported>
<facet
id="jst.jboss.esb"
- version="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ version="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</facet>
<runtime-component
id="org.jboss.ide.eclipse.eap.runtime.component"
@@ -218,7 +239,7 @@
projects="true">
<moduleType
types="jst.jboss.esb"
- versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
+ versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9,4.10">
</moduleType>
</moduleFactory>
</extension>
@@ -317,6 +338,23 @@
id="org.jboss.ide.eclipse.as.runtime.60">
</supportedRuntimeType>
</Resolver>
+ <Resolver
+ class="org.jboss.tools.esb.core.runtime.ESBRuntimeResolver_410"
+ esbVersion="4.10"
+ name="ESB runtime resolver">
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.eap.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.50">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.51">
+ </supportedRuntimeType>
+ <supportedRuntimeType
+ id="org.jboss.ide.eclipse.as.runtime.60">
+ </supportedRuntimeType>
+ </Resolver>
</extension>
</plugin>
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/pom.xml 2011-09-28 20:36:01 UTC (rev 35136)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.core</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Added: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java (rev 0)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java 2011-09-28 20:36:01 UTC (rev 35136)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.esb.core.runtime;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+
+public class ESBRuntimeResolver_410 extends AbstractESBRuntimeResolver implements
+ IESBRuntimeResolver {
+
+ private final static String JUDDI_CLIENT_JAR_31 = "juddi-client-3.1.0.jar";
+ private final static String JUDDI_CLIENT_JAR_311 = "juddi-client-3.1.1.jar";
+
+ public boolean isValidESBRuntime(String location, String version, String configuration){
+ List<String> jarNames = new ArrayList<String>();
+
+ for(File file : getAllRuntimeJars(location, configuration)){
+ jarNames.add(file.getName());
+ }
+
+ return jarNames.contains(ROSETTA_JAR) &&
+ (jarNames.contains(JUDDI_CLIENT_JAR_31) || jarNames.contains(JUDDI_CLIENT_JAR_311));
+ }
+
+
+ public List<IPath> getJarDirectories(String runtimeLocation, String configuration) {
+ List<IPath> directories = super.getJarDirectories(runtimeLocation, configuration);
+ IPath rtHome = new Path(runtimeLocation);
+ IPath soapDeployPath = rtHome.append(SOAP_AS_LOCATION)
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+
+ IPath deployPath = rtHome
+ .append(IJBossRuntimeResourceConstants.SERVER).append(configuration)
+ .append(IJBossRuntimeResourceConstants.DEPLOYERS)
+ .append("esb.deployer").append("lib");
+ directories.add(soapDeployPath);
+ directories.add(deployPath);
+
+ return directories;
+ }
+
+
+}
Property changes on: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_410.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/ESBRuntimeResolver_49.java 2011-09-28 20:36:01 UTC (rev 35136)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
+ * Copyright (c) 2009, 2011 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,
@@ -23,6 +23,8 @@
private final static String CONFIG_MODEL_JAR_12 = "jbossesb-config-model-1.2.0.jar";
private final static String CONFIG_MODEL_JAR_13 = "jbossesb-config-model-1.3.0.jar";
+ private final static String JUDDI_CLIENT_JAR_303 = "juddi-client-3.0.3.jar";
+ private final static String JUDDI_CLIENT_JAR_304 = "juddi-client-3.0.4.jar";
public boolean isValidESBRuntime(String location, String version, String configuration){
@@ -34,7 +36,8 @@
return jarNames.contains(ROSETTA_JAR)
&& jarNames.contains(CONFIG_MODEL_JAR_12)
- && jarNames.contains(CONFIG_MODEL_JAR_13);
+ && jarNames.contains(CONFIG_MODEL_JAR_13)
+ && (jarNames.contains(JUDDI_CLIENT_JAR_303) || jarNames.contains(JUDDI_CLIENT_JAR_304));
}
Added: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java (rev 0)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java 2011-09-28 20:36:01 UTC (rev 35136)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.esb.project.core.comparator;
+
+import java.util.Comparator;
+
+/**
+ * @author bfitzpat
+ *
+ */
+public class ESBRuntimeVersionComparator implements Comparator<String> {
+
+ public int compare(String arg0, String arg1) {
+ Integer[] versions1 = parse(arg0, '.');
+ Integer[] versions2 = parse(arg1, '.');
+ if (versions1 != null && versions2 != null) {
+ int compareMajor = versions1[0].compareTo(versions2[0]);
+ int compareMinor = versions1[1].compareTo(versions2[1]);
+ if (compareMajor == 0) {
+ return compareMinor;
+ } else {
+ return compareMajor;
+ }
+ }
+ return 0;
+ }
+
+ private Integer[] parse ( String input, char separator) {
+ if (input == null)
+ return null;
+ int pos = input.indexOf(separator);
+ String out1 = input.substring(0, pos);
+ String out2 = input.substring(pos + 1, input.length());
+ if (out1 != null && out2 != null) {
+ Integer intOut1 = Integer.parseInt(out1);
+ Integer intOut2 = Integer.parseInt(out2);
+ return new Integer[]{intOut1, intOut2};
+ }
+ return null;
+ }
+
+}
Property changes on: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/project/core/comparator/ESBRuntimeVersionComparator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/META-INF/MANIFEST.MF 2011-09-28 20:36:01 UTC (rev 35136)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.esb.project.ui;singleton:=true
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.4.1.qualifier
Bundle-Activator: org.jboss.tools.esb.project.ui.ESBProjectPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/pom.xml 2011-09-28 20:36:01 UTC (rev 35136)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.esb.plugins</groupId>
<artifactId>org.jboss.tools.esb.project.ui</artifactId>
- <version>1.4.0-SNAPSHOT</version>
+ <version>1.4.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2011-09-28 20:09:29 UTC (rev 35135)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2011-09-28 20:36:01 UTC (rev 35136)
@@ -636,7 +636,7 @@
if(versionNumber >= 4.7){
cmVersions.add("1.2.0"); //$NON-NLS-1$
}
- if(versionNumber >= 4.9){
+ if(versionNumber >= 4.9 || versionNumber == 4.10){
cmVersions.add("1.3.0"); //$NON-NLS-1$
}
int index = cmVersions.getItemCount() - 1;
14 years, 2 months
JBoss Tools SVN: r35135 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-09-28 16:09:29 -0400 (Wed, 28 Sep 2011)
New Revision: 35135
Modified:
trunk/build/pom-core.xml
trunk/build/pom-soa-tooling.xml
trunk/build/pom.xml
Log:
tweak build/pom*.xml (for consistency between files) and add new central and central-bootstrap profiles
Modified: trunk/build/pom-core.xml
===================================================================
--- trunk/build/pom-core.xml 2011-09-28 20:09:11 UTC (rev 35134)
+++ trunk/build/pom-core.xml 2011-09-28 20:09:29 UTC (rev 35135)
@@ -14,7 +14,7 @@
mvn clean install -P parent,\!libs,\!tests,\!jmx,\!archives,\!as,\!common,\!jst,\!xulrunner,\!vpe \
-P \!jsf,\!freemarker,\!hibernatetools,\!portlet,\!struts,\!cdi,\!birt,\!seam,\!examples \
- -P \!maven,\!ws,\!gwt,\!deltacloud,\!runtime,\!usage,\!aggregate-coverage
+ -P \!maven,\!ws,\!gwt,\!deltacloud,\!runtime,\!usage,\!central,\!aggregate-coverage
-->
<profile>
@@ -26,11 +26,14 @@
<module>parent</module>
</modules>
</profile>
-
+
<profile>
<id>libs</id>
<activation>
<activeByDefault>true</activeByDefault>
+ <property>
+ <name>coverage</name>
+ </property>
</activation>
<modules>
<module>libs</module>
@@ -433,7 +436,7 @@
<modules>
<module>../gwt</module>
</modules>
- </profile>
+ </profile>
<profile>
<id>deltacloud</id>
@@ -463,7 +466,7 @@
<module>../runtime</module>
</modules>
</profile>
-
+
<profile>
<id>usage</id>
<activation>
@@ -475,9 +478,46 @@
</profile>
<profile>
+ <id>central</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../central</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>central-bootstrap</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../common</module>
+ <module>../runtime</module>
+ <module>../freemarker</module>
+ <module>../hibernatetools</module>
+ <module>../jst</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../seam</module>
+ <module>../portlet</module>
+ <module>../examples</module>
+ <module>../central</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>aggregate-coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
+ <property>
+ <name>coverage</name>
+ </property>
</activation>
<modules>
<module>reports/emma-coverage</module>
Modified: trunk/build/pom-soa-tooling.xml
===================================================================
--- trunk/build/pom-soa-tooling.xml 2011-09-28 20:09:11 UTC (rev 35134)
+++ trunk/build/pom-soa-tooling.xml 2011-09-28 20:09:29 UTC (rev 35135)
@@ -25,11 +25,14 @@
<module>parent</module>
</modules>
</profile>
-
+
<profile>
<id>libs</id>
<activation>
<activeByDefault>true</activeByDefault>
+ <property>
+ <name>coverage</name>
+ </property>
</activation>
<modules>
<module>libs</module>
@@ -139,6 +142,7 @@
<id>smooks-bootstrap</id>
<modules>
<module>../tests</module>
+ <module>../common</module>
<module>../smooks</module>
</modules>
</profile>
@@ -268,12 +272,14 @@
<id>aggregate-coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
+ <property>
+ <name>coverage</name>
+ </property>
</activation>
<modules>
<module>reports/emma-coverage</module>
</modules>
</profile>
-
</profiles>
</project>
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2011-09-28 20:09:11 UTC (rev 35134)
+++ trunk/build/pom.xml 2011-09-28 20:09:29 UTC (rev 35135)
@@ -14,10 +14,20 @@
mvn clean install -P parent,\!libs,\!tests,\!jmx,\!archives,\!as,\!common,\!jst,\!xulrunner,\!vpe \
-P \!jsf,\!freemarker,\!hibernatetools,\!portlet,\!struts,\!smooks,\!cdi,\!birt,\!bpel,\!esb,\!seam,\!examples \
- -P \!maven,\!ws,\!modeshape,\!flow,\!jbpm,\!gwt,\!deltacloud,\!runtime,\!usage,\!aggregate-coverage
+ -P \!maven,\!ws,\!modeshape,\!flow,\!jbpm,\!gwt,\!deltacloud,\!runtime,\!usage,\!central,\!aggregate-coverage
-->
<profile>
+ <id>parent</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <modules>
+ <module>parent</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>libs</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -259,24 +269,6 @@
</profile>
<profile>
- <id>workingset</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>../portlet</module>
- </modules>
- </profile>
-
- <profile>
- <id>workingset-bootstrap</id>
- <modules>
- <module>../tests</module>
- <module>../workingset</module>
- </modules>
- </profile>
-
- <profile>
<id>struts</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -650,6 +642,40 @@
</profile>
<profile>
+ <id>central</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../central</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>central-bootstrap</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../common</module>
+ <module>../runtime</module>
+ <module>../freemarker</module>
+ <module>../hibernatetools</module>
+ <module>../jst</module>
+ <module>../vpe</module>
+ <module>../jsf</module>
+ <module>../jmx</module>
+ <module>../archives</module>
+ <module>../as</module>
+ <module>../seam</module>
+ <module>../portlet</module>
+ <module>../examples</module>
+ <module>../central</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>aggregate-coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
@@ -661,7 +687,32 @@
<module>reports/emma-coverage</module>
</modules>
</profile>
+ </profiles>
- </profiles>
+ <repositories>
+ <!-- Cannot redistribute GWT plugins due to license therefore cannot be included in target platform; must reference as 3rd party URL -->
+ <repository>
+ <id>gwt-e37</id>
+ <url>http://dl.google.com/eclipse/plugin/3.7/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <!-- no longer needed (https://issues.jboss.org/browse/JBIDE-9585) <repository>
+ <id>egit11</id>
+ <url>http://download.jboss.org/jbosstools/updates/requirements/egit/1.1.0.2011...</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository> -->
+ </repositories>
</project>
14 years, 2 months
JBoss Tools SVN: r35134 - trunk/central.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-09-28 16:09:11 -0400 (Wed, 28 Sep 2011)
New Revision: 35134
Modified:
trunk/central/pom.xml
Log:
fix typo
Modified: trunk/central/pom.xml
===================================================================
--- trunk/central/pom.xml 2011-09-28 20:08:57 UTC (rev 35133)
+++ trunk/central/pom.xml 2011-09-28 20:09:11 UTC (rev 35134)
@@ -11,7 +11,7 @@
<groupId>org.jboss.tools</groupId>
<artifactId>central</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name>centrall.all</name>
+ <name>central.all</name>
<packaging>pom</packaging>
<!--
mvn clean install
14 years, 2 months
JBoss Tools SVN: r35133 - trunk/download.jboss.org/jbosstools/builds/cascade.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-09-28 16:08:57 -0400 (Wed, 28 Sep 2011)
New Revision: 35133
Modified:
trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt
Log:
central depends on runtime and examples, which means also depending on portlet, seam, as, archives, jmx, jsf, vpe, jst, hibernate, freemarker, common, tests
Modified: trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt 2011-09-28 18:55:04 UTC (rev 35132)
+++ trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt 2011-09-28 20:08:57 UTC (rev 35133)
@@ -1,4 +1,4 @@
-Revised swimlanes, as implemented in 3.2_stable_branch, 3.3_stable_branch and 3.3_trunk jobs, 2011/09/27
+Revised swimlanes, as implemented in 3.2_stable_branch, 3.3_stable_branch and 3.3_trunk jobs, 2011/09/28
------------------------
@@ -37,6 +37,6 @@
tptp [REMOVED]
smooks [removed from JBDS, still in JBT]
seam -> hibernate, jsf
-central -> runtime, examples
+central -> examples, portlet, seam, as, archives, jmx, jsf, vpe, jst, hibernate, freemarker, runtime, common, tests
------------------------
14 years, 2 months
JBoss Tools SVN: r35132 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-09-28 14:55:04 -0400 (Wed, 28 Sep 2011)
New Revision: 35132
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
Log:
removed reference to MultipleWebRootFoldersTest which is not in version control yet
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2011-09-28 18:54:46 UTC (rev 35131)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllImportantTests.java 2011-09-28 18:55:04 UTC (rev 35132)
@@ -68,7 +68,6 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide2362Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MessageResolutionInPreviewTabTest;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.MozDirtyTest_JBIDE5105;
-import org.jboss.tools.jsf.vpe.jsf.test.jbide.MultipleWebRootFoldersTest_JBIDE9753;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.NullPointerWithStyleProperty_JBIDE5193;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnCssClassTest_JBIDE4775;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.OpenOnInJarPackageFragment_JBIDE5682;
@@ -106,7 +105,6 @@
suite.addTestSuite(UnclosedELExpressionTest.class);
suite.addTestSuite(TestContextPathResolution.class);
suite.addTestSuite(JBIDE5920Test.class);
- suite.addTestSuite(MultipleWebRootFoldersTest_JBIDE9753.class);
suite.addTestSuite(RenderFacetAndInsertChildrenTest.class);
suite.addTestSuite(EditFontFamilyTest_JBIDE5872.class);
suite.addTestSuite(ChangeMessageBundleTest_JBIDE5818.class);
14 years, 2 months
JBoss Tools SVN: r35131 - in trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-09-28 14:54:46 -0400 (Wed, 28 Sep 2011)
New Revision: 35131
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
JBIDE-7892
Search for @Named beans.
JUnit test case is added
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-09-28 18:53:47 UTC (rev 35130)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-09-28 18:54:46 UTC (rev 35131)
@@ -25,6 +25,7 @@
import org.jboss.tools.cdi.ui.test.wizard.AddQualifiersToBeanWizardTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIClassWizardFactoryTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
+import org.jboss.tools.cdi.ui.test.wizard.OpenCDINamedBeanDialogTest;
import org.jboss.tools.test.util.ResourcesUtils;
/**
@@ -50,11 +51,13 @@
suiteAll.addTestSuite(NewCDIClassWizardFactoryTest.class);
suiteAll.addTestSuite(CDIPreferencePageTest.class);
suiteAll.addTestSuite(NewCDIWizardTest.class);
+
suite.addTestSuite(CAELProposalFilteringTest.class);
-
suite.addTestSuite(CDISearchParticipantTest.class);
suite.addTestSuite(ELReferencesQueryParticipantTest.class);
suite.addTestSuite(CATest.class);
+ suite.addTestSuite(OpenCDINamedBeanDialogTest.class);
+
suiteAll.addTest(new CDICoreTestSetup(suite));
suiteAll.addTestSuite(AddQualifiersToBeanWizardTest.class);
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java 2011-09-28 18:54:46 UTC (rev 35131)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.cdi.ui.test.wizard;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog;
+import org.jboss.tools.cdi.ui.wizard.OpenCDINamedBeanDialog.CDINamedBeanWrapper;
+import org.jboss.tools.test.util.JobUtils;
+
+/**
+ * JUnit Test case due to test JBIDE-7892 issue.
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class OpenCDINamedBeanDialogTest extends TCKTest {
+ private IProject project;
+
+ @Override
+ protected void setUp() throws Exception {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(TCKTest.PROJECT_NAME);
+ }
+
+ public void testCDINamedBeanDialogSearch() {
+ find("spi", "SpiderSize", true);
+ find("bla", "blackWidow", false);
+ find("lady", "ladybirdSpider", false);
+ }
+
+ public void testCDINamedBeanDialogSearchShortHand() {
+ find("s*ze", "SpiderSize", true);
+ find("b*w", "blackWidow", false);
+ find("*dSp*r", "ladybirdSpider", false);
+ find("foo?", "foo3", false);
+ }
+
+ private void find(String pattern, String beanName, boolean wait){
+ OpenCDINamedBeanDialog dialog = new OpenCDINamedBeanDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+
+ dialog.setBlockOnOpen(false);
+ dialog.setInitialPattern(pattern);
+ dialog.open();
+ try {
+ dialog.startSearch();
+ if(wait){
+ JobUtils.waitForIdle();
+ JobUtils.delay(2000);
+ }
+ dialog.stopSearchAndShowResults();
+ Object[] objects = dialog.getResult();
+
+ assertNotNull("Search dialog returned null when searching for " + pattern, objects);
+
+ assertTrue("Component "+beanName+" not found", objects.length != 0);
+
+ IBean bean = findNamedBean(objects, beanName);
+
+ assertNotNull("Component "+beanName+" not found with " + pattern, bean);
+ } finally {
+ dialog.okPressed();
+ dialog.close();
+ }
+ }
+
+ private IBean findNamedBean(Object[] objects, String beanName) {
+ for (Object o: objects) {
+ CDINamedBeanWrapper wrapper = (CDINamedBeanWrapper)o;
+ assertNotNull(wrapper.getBean());
+ if(beanName.equals(wrapper.getBeanName())) {
+ return wrapper.getBean();
+ }
+ }
+ return null;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/OpenCDINamedBeanDialogTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r35130 - in trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core: utils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-09-28 14:53:47 -0400 (Wed, 28 Sep 2011)
New Revision: 35130
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java
Log:
[JBIDE-9591] added javadoc, cleaned API
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java 2011-09-28 18:46:59 UTC (rev 35129)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationIntegrationTest.java 2011-09-28 18:53:47 UTC (rev 35130)
@@ -20,7 +20,6 @@
import org.jboss.ide.eclipse.as.openshift.core.InvalidCredentialsOpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.User;
-import org.jboss.ide.eclipse.as.openshift.core.internal.Application;
import org.jboss.ide.eclipse.as.openshift.core.internal.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.internal.OpenshiftService;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.fakes.TestUser;
@@ -55,7 +54,7 @@
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
ICartridge cartridge = ICartridge.JBOSSAS_7;
- Application application = service.createApplication(applicationName, cartridge, user);
+ IApplication application = service.createApplication(applicationName, cartridge, user);
assertNotNull(application);
assertEquals(applicationName, application.getName());
assertEquals(cartridge, application.getCartridge());
@@ -164,7 +163,7 @@
public void canGetStatus() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- Application application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ IApplication application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
String applicationStatus = service.getStatus(application.getName(), application.getCartridge(), user);
assertNotNull(applicationStatus);
} finally {
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderIntegrationTest.java 2011-09-28 18:46:59 UTC (rev 35129)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/ApplicationLogReaderIntegrationTest.java 2011-09-28 18:53:47 UTC (rev 35130)
@@ -21,7 +21,6 @@
import org.jboss.ide.eclipse.as.openshift.core.ApplicationLogReader;
import org.jboss.ide.eclipse.as.openshift.core.IApplication;
import org.jboss.ide.eclipse.as.openshift.core.ICartridge;
-import org.jboss.ide.eclipse.as.openshift.core.internal.Application;
import org.jboss.ide.eclipse.as.openshift.core.internal.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.internal.OpenshiftService;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.fakes.TestUser;
@@ -56,7 +55,7 @@
public void getStatusReturnsTheWholeLogIfNoNewLogEntryOnServer() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- Application application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ IApplication application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
String applicationStatus = service.getStatus(application.getName(), application.getCartridge(), user);
String applicationStatus2 = service.getStatus(application.getName(), application.getCartridge(), user);
assertEquals(applicationStatus, applicationStatus2);
@@ -74,7 +73,7 @@
public void getStatusReturnsNewEntriesIfNewLogEntriesOnServer() throws Exception {
String applicationName = ApplicationUtils.createRandomApplicationName();
try {
- Application application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
+ IApplication application = service.createApplication(applicationName, ICartridge.JBOSSAS_7, user);
String applicationStatus = service.getStatus(application.getName(), application.getCartridge(), user);
application.restart();
String applicationStatus2 = service.getStatus(application.getName(), application.getCartridge(), user);
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java 2011-09-28 18:46:59 UTC (rev 35129)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/utils/ApplicationUtils.java 2011-09-28 18:53:47 UTC (rev 35130)
@@ -11,10 +11,10 @@
package org.jboss.ide.eclipse.as.openshift.test.internal.core.utils;
import org.jboss.ide.eclipse.as.openshift.core.Cartridge;
+import org.jboss.ide.eclipse.as.openshift.core.IApplication;
import org.jboss.ide.eclipse.as.openshift.core.ICartridge;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.User;
-import org.jboss.ide.eclipse.as.openshift.core.internal.Application;
import org.jboss.ide.eclipse.as.openshift.core.internal.IOpenshiftService;
/**
@@ -26,7 +26,7 @@
return String.valueOf(System.currentTimeMillis());
}
- public static Application createApplication(User user, IOpenshiftService service) throws OpenshiftException {
+ public static IApplication createApplication(User user, IOpenshiftService service) throws OpenshiftException {
return service.createApplication(createRandomApplicationName(), Cartridge.JBOSSAS_7, user);
}
14 years, 2 months
JBoss Tools SVN: r35129 - trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-09-28 14:46:59 -0400 (Wed, 28 Sep 2011)
New Revision: 35129
Modified:
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java
Log:
method that triggers deferred event processing added
Modified: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java 2011-09-28 18:33:13 UTC (rev 35128)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/JobUtils.java 2011-09-28 18:46:59 UTC (rev 35129)
@@ -69,4 +69,8 @@
}
}
}
+
+ public static void runDeferredEvents() {
+ while( Display.getCurrent().readAndDispatch());
+ }
}
14 years, 2 months