JBoss Tools SVN: r27077 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 13:55:00 -0500 (Wed, 01 Dec 2010)
New Revision: 27077
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
[JBIDE-7777] removed shadowing instance variable, fixed NPE
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 18:37:49 UTC (rev 27076)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 18:55:00 UTC (rev 27077)
@@ -31,7 +31,7 @@
private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
public static final String LAST_USED_URL = "org.jboss.tools.internal.deltacloud.ui.wizards.LAST_CREATED_URL";
- private CloudConnectionPage mainPage;
+ protected CloudConnectionPage mainPage;
protected DeltaCloud initialCloud;
private String pageTitle;
14 years
JBoss Tools SVN: r27076 - branches/jbosstools-3.2.0.Beta2/tests/features/org.jboss.tools.test.sdk.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-01 13:37:49 -0500 (Wed, 01 Dec 2010)
New Revision: 27076
Modified:
branches/jbosstools-3.2.0.Beta2/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
Log:
add org.jboss.tools.vpe.base.test to sdk feature (uberbuilder tests)
Modified: branches/jbosstools-3.2.0.Beta2/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta2/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-12-01 18:36:14 UTC (rev 27075)
+++ branches/jbosstools-3.2.0.Beta2/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-12-01 18:37:49 UTC (rev 27076)
@@ -84,6 +84,12 @@
version="0.0.0"/>
<plugin
+ id="org.jboss.tools.vpe.base.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
id="org.jboss.tools.jst.web.ui.test"
download-size="0"
install-size="0"
14 years
JBoss Tools SVN: r27075 - trunk/tests/features/org.jboss.tools.test.sdk.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-01 13:36:14 -0500 (Wed, 01 Dec 2010)
New Revision: 27075
Modified:
trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
Log:
add org.jboss.tools.vpe.base.test to sdk feature (uberbuilder tests)
Modified: trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-12-01 17:33:25 UTC (rev 27074)
+++ trunk/tests/features/org.jboss.tools.test.sdk.feature/feature.xml 2010-12-01 18:36:14 UTC (rev 27075)
@@ -84,6 +84,12 @@
version="0.0.0"/>
<plugin
+ id="org.jboss.tools.vpe.base.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
id="org.jboss.tools.jst.web.ui.test"
download-size="0"
install-size="0"
14 years
JBoss Tools SVN: r27074 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 12:33:25 -0500 (Wed, 01 Dec 2010)
New Revision: 27074
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7777] removed shadowing instance variable, fixed NPE
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-01 17:32:25 UTC (rev 27073)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-01 17:33:25 UTC (rev 27074)
@@ -1,3 +1,8 @@
+2010-12-01 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java (performFinish):
+ [JBIDE-7777] removed shadowing instance variable, fixed NPE
+
2010-11-30 André Dietisheim <adietish(a)redhat.com>
* plugin.xml:
14 years
JBoss Tools SVN: r27073 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 12:32:25 -0500 (Wed, 01 Dec 2010)
New Revision: 27073
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
Log:
[JBIDE-7777] removed shadowing instance variable, fixed NPE
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-12-01 17:11:53 UTC (rev 27072)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-12-01 17:32:25 UTC (rev 27073)
@@ -16,7 +16,6 @@
public class EditCloudConnectionWizard extends NewCloudConnectionWizard {
private static final String MAINPAGE_NAME = "EditCloudConnection.name"; //$NON-NLS-1$
- private CloudConnectionPage mainPage;
public EditCloudConnectionWizard(DeltaCloud cloud) {
super(WizardMessages.getString(MAINPAGE_NAME), cloud);
14 years
JBoss Tools SVN: r27072 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: src/org/jboss/tools/cdi/core/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-01 12:11:53 -0500 (Wed, 01 Dec 2010)
New Revision: 27072
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByNameTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Cod.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Plaice.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Salmon.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Sole.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7776 - Fixed
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Cod.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Cod.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Cod.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -19,7 +19,7 @@
import javax.enterprise.inject.Alternative;
import javax.inject.Named;
-@Named("whitefish")
+@Named("whitefishJBT") // Original tck name was "whitefish". modified for JBT tests to "whitefishJBT"
@Alternative
class Cod implements Animal
{
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Plaice.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Plaice.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Plaice.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -18,7 +18,7 @@
import javax.inject.Named;
-@Named("whitefish")
+@Named("whitefishJBT") // Original tck name was "whitefish". modified for JBT tests to "whitefishJBT"
@Whitefish
class Plaice implements Animal
{
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Salmon.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Salmon.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Salmon.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -18,7 +18,7 @@
import javax.inject.Named;
-@Named("fish")
+@Named("fishJBT") // Original tck name was "fish". modified for JBT tests to "fishJBT"
class Salmon implements Animal
{
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Sole.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Sole.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/lookup/byname/Sole.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -19,7 +19,7 @@
import javax.enterprise.inject.Alternative;
import javax.inject.Named;
-@Named("fish")
+@Named("fishJBT") // Original tck name was "fish". modified for JBT tests to "fishJBT"
@Alternative
class Sole implements Animal
{
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -32,6 +32,7 @@
import org.jboss.tools.cdi.core.test.tck.ProducerMethodDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.QualifierDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.QualifierWithMembersTest;
+import org.jboss.tools.cdi.core.test.tck.ResolutionByNameTest;
import org.jboss.tools.cdi.core.test.tck.ResolutionByTypeTest;
import org.jboss.tools.cdi.core.test.tck.ScopeDefinitionTest;
import org.jboss.tools.cdi.core.test.tck.SelectedAlternativeTest;
@@ -56,6 +57,7 @@
TestSuite suiteAll = new TestSuite("CDI Core Tests");
TestSuite suite = new TestSuite("TCK Tests");
+ suite.addTestSuite(ResolutionByNameTest.class);
suite.addTestSuite(BeanDefinitionTest.class);
suite.addTestSuite(NameDefinitionTest.class);
suite.addTestSuite(QualifierDefinitionTest.class);
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByNameTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByNameTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByNameTest.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.core.test.tck;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.internal.core.impl.CDIProject;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class ResolutionByNameTest extends TCKTest {
+
+ /**
+ * section 5.3.1 ca),
+ * section 11.3.5 aa),
+ * section 11.3.5 b)
+ *
+ * @throws CoreException
+ */
+ public void testAmbiguousELNamesResolved() throws CoreException {
+ // Cod, Plaice and AlaskaPlaice are named "whitefishJBT" - Cod is a not-enabled policy, AlaskaPlaice specializes Plaice
+ Set<IBean> beans = cdiProject.getBeans("whitefishJBT", true);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.byname.AlaskaPlaice");
+
+ IFile f = tckProject.getFile("/JavaSource/org/jboss/jsr299/tck/tests/lookup/byname/beans.xml");
+ assertTrue("File /JavaSource/org/jboss/jsr299/tck/tests/lookup/byname/beans.xml not found", f != null && f.exists());
+
+ IPath old = ((CDIProject)cdiProject).replaceBeanXML(f.getFullPath());
+
+ assertTrue("Old beans.xml is not found", old != null);
+
+ try {
+ beans = cdiProject.getBeans("whitefishJBT", true);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.byname.AlaskaPlaice");
+
+ // Both Salmon and Sole are named "fishJBT" - Sole is an enabled policy
+ beans = cdiProject.getBeans("fishJBT", false);
+ assertEquals("Wrong number of the beans", 2, beans.size());
+ assertContainsBeanClasses(beans, "org.jboss.jsr299.tck.tests.lookup.byname.Salmon", "org.jboss.jsr299.tck.tests.lookup.byname.Sole");
+
+ beans = cdiProject.getBeans("fishJBT", true);
+ assertEquals("Wrong number of the beans", 1, beans.size());
+ assertContainsBeanClass(beans, "org.jboss.jsr299.tck.tests.lookup.byname.Sole");
+ } finally {
+ old = ((CDIProject)cdiProject).replaceBeanXML(old);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByNameTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2010-12-01 17:11:12 UTC (rev 27071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/TCKTest.java 2010-12-01 17:11:53 UTC (rev 27072)
@@ -209,7 +209,7 @@
static class JavaFileFilter implements FileFilter {
public boolean accept(File pathname) {
String name = pathname.getName();
- return (pathname.isDirectory() && !name.endsWith(".svn")) || (name.endsWith(".java") && !name.endsWith("Test.java"));
+ return (pathname.isDirectory() && !name.endsWith(".svn")) || ((name.endsWith(".java") || name.equals("beans.xml")) && !name.endsWith("Test.java"));
}
}
14 years
JBoss Tools SVN: r27071 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-01 12:11:12 -0500 (Wed, 01 Dec 2010)
New Revision: 27071
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
https://jira.jboss.org/browse/JBIDE-7776 - Fixed
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-01 17:00:31 UTC (rev 27070)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-01 17:11:12 UTC (rev 27071)
@@ -200,6 +200,7 @@
boolean containsAlternatives = false;
Iterator<IBean> it = result.iterator();
+ Set<IBean> disabled = null;
while(it.hasNext()) {
IBean b = it.next();
if(b.isAlternative()) {
@@ -209,8 +210,19 @@
it.remove();
}
}
+ IBean bean = b.getSpecializedBean();
+ if(bean!=null && b.isEnabled()) {
+ if(disabled==null) {
+ disabled = new HashSet<IBean>();
+ }
+ disabled.add(bean);
+ }
}
-
+
+ if(disabled!=null) {
+ result.removeAll(disabled);
+ }
+
if(!containsAlternatives) return result;
it = result.iterator();
14 years
JBoss Tools SVN: r27070 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 12:00:31 -0500 (Wed, 01 Dec 2010)
New Revision: 27070
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
Log:
cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-12-01 16:55:37 UTC (rev 27069)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-12-01 17:00:31 UTC (rev 27070)
@@ -14,9 +14,6 @@
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -61,14 +58,9 @@
private Composite container;
private Combo cloudSelector;
private Label filterLabel;
- @SuppressWarnings("unused")
- private DeltaCloudImage selectedElement;
-
private DeltaCloud[] clouds;
private DeltaCloud currCloud;
- private ImageViewLabelAndContentProvider contentProvider;
-
private ModifyListener cloudModifyListener = new ModifyListener() {
@Override
@@ -81,8 +73,6 @@
currCloud = clouds[index];
storeSelectedCloud();
-// viewer.setInput(new DeltaCloudImage[0]);
-// viewer.refresh();
Display.getCurrent().asyncExec(new Runnable() {
@Override
@@ -167,18 +157,8 @@
filterLabel.setText(CVMessages.getString(FILTERED_LABEL));
filterLabel.setToolTipText(CVMessages.getString(FILTERED_TOOLTIP));
- Composite tableArea = new Composite(container, SWT.NULL);
- TableColumnLayout tableLayout = new TableColumnLayout();
- tableArea.setLayout(tableLayout);
+ Composite tableArea = createTableViewer();
- viewer = new TableViewer(tableArea, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- Table table = viewer.getTable();
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- createColumns(tableLayout, table);
- contentProvider = new ImageViewLabelAndContentProvider();
- viewer.setContentProvider(contentProvider);
- viewer.setLabelProvider(contentProvider);
ImageComparator comparator = new ImageComparator(0);
viewer.setComparator(comparator);
getSite().setSelectionProvider(viewer);
@@ -220,11 +200,26 @@
// Create the help context id for the viewer's control
PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), "org.jboss.tools.deltacloud.ui.viewer");
hookContextMenu();
- hookSelection();
DeltaCloudManager.getDefault().addCloudManagerListener(this);
}
+ private Composite createTableViewer() {
+ Composite tableArea = new Composite(container, SWT.NULL);
+ TableColumnLayout tableLayout = new TableColumnLayout();
+ tableArea.setLayout(tableLayout);
+
+ viewer = new TableViewer(tableArea, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ Table table = viewer.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ createColumns(tableLayout, table);
+ ImageViewLabelAndContentProvider provider = new ImageViewLabelAndContentProvider();
+ viewer.setContentProvider(provider);
+ viewer.setLabelProvider(provider);
+ return tableArea;
+ }
+
private void createColumns(TableColumnLayout tableLayout, Table table) {
for (int i = 0; i < ImageViewLabelAndContentProvider.Column.getSize(); ++i) {
ImageViewLabelAndContentProvider.Column c =
@@ -239,25 +234,11 @@
table.setSortDirection(SWT.NONE);
}
- private void hookSelection() {
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelection();
- }
- });
- }
-
private void hookContextMenu() {
IMenuManager contextMenu = UIUtils.createContextMenu(viewer.getTable());
UIUtils.registerContributionManager(UIUtils.getContextMenuId(ID), contextMenu, viewer.getTable());
}
- private void handleSelection() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- selectedElement = (DeltaCloudImage) selection.getFirstElement();
- }
-
@Override
public void setFocus() {
viewer.getTable().setFocus();
14 years
JBoss Tools SVN: r27069 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 11:55:37 -0500 (Wed, 01 Dec 2010)
New Revision: 27069
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java
Log:
added logging
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java 2010-12-01 16:48:13 UTC (rev 27068)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/ErrorUtils.java 2010-12-01 16:55:37 UTC (rev 27069)
@@ -15,7 +15,6 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloudMultiException;
@@ -27,19 +26,29 @@
public static IStatus handleError(final String title, final String message, Throwable e, final Shell shell) {
IStatus status = createStatus(e);
openErrorDialog(title, status, shell);
+ log(status);
return status;
}
+
+ private static void log(IStatus status) {
+ if (Activator.getDefault().isDebugging()) {
+ Activator.log(status);
+ }
+ }
+
/**
* Launch the error dialog asynchronously on the display thread
+ *
* @param title
* @param message
* @param e
* @param shell
* @return
*/
- public static IStatus handleErrorAsync(final String title, final String message, final Throwable e, final Shell shell) {
+ public static IStatus handleErrorAsync(final String title, final String message, final Throwable e,
+ final Shell shell) {
IStatus status = createStatus(e);
- Display.getDefault().asyncExec(new Runnable(){
+ shell.getDisplay().asyncExec(new Runnable() {
public void run() {
handleError(title, message, e, shell);
}
@@ -56,20 +65,22 @@
}
private static void openErrorDialog(final String title, final IStatus status, final Shell shell) {
-// Display.getDefault().syncExec(new Runnable() {
-// public void run() {
-// ErrorDialog.openError(shell, title, status.getMessage(), status);
-// }
-// });
+ // Display.getDefault().syncExec(new Runnable() {
+ // public void run() {
+ // ErrorDialog.openError(shell, title, status.getMessage(), status);
+ // }
+ // });
ErrorDialog.openError(shell, title, status.getMessage(), status);
}
-
+
public static IStatus createMultiStatus(DeltaCloudMultiException throwable) {
List<IStatus> states = new ArrayList<IStatus>(throwable.getThrowables().size());
- for(Throwable childThrowable : throwable.getThrowables()) {
- IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, childThrowable.getMessage(), childThrowable);
+ for (Throwable childThrowable : throwable.getThrowables()) {
+ IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, childThrowable.getMessage(),
+ childThrowable);
states.add(status);
}
- return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, throwable.getMessage(), throwable, states.toArray(new IStatus[states.size()]));
+ return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, throwable.getMessage(), throwable,
+ states.toArray(new IStatus[states.size()]));
}
}
14 years
JBoss Tools SVN: r27068 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-01 11:48:13 -0500 (Wed, 01 Dec 2010)
New Revision: 27068
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
Log:
cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-12-01 16:46:27 UTC (rev 27067)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-12-01 16:48:13 UTC (rev 27068)
@@ -87,7 +87,7 @@
if (newInput != null) {
if (newInput instanceof DeltaCloudImage[]) {
images = filter((DeltaCloudImage[]) newInput);
- } else {
+ } else if (newInput instanceof DeltaCloud){
cloud = (DeltaCloud) newInput;
try {
images = filter(cloud.getImages());
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-12-01 16:46:27 UTC (rev 27067)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-12-01 16:48:13 UTC (rev 27068)
@@ -83,7 +83,7 @@
if (newInput != null) {
if (newInput instanceof DeltaCloudInstance[]) {
instances = filter((DeltaCloudInstance[]) newInput);
- } else {
+ } else if (newInput instanceof DeltaCloud) {
cloud = (DeltaCloud) newInput;
try {
instances = filter(cloud.getInstances());
14 years