JBoss Tools SVN: r36142 - trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-02 17:57:35 -0400 (Wed, 02 Nov 2011)
New Revision: 36142
Modified:
trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
Log:
https://issues.jboss.org/browse/JBIDE-9351 provide mylyn connections for issues.jboss.org and bugzila.redhat.com via new plugin in "Common" component
Modified: trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF 2011-11-02 21:57:24 UTC (rev 36141)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF 2011-11-02 21:57:35 UTC (rev 36142)
@@ -10,6 +10,13 @@
org.eclipse.mylyn.commons.ui;bundle-version="3.6.1",
org.eclipse.mylyn.tasks.core;bundle-version="3.6.0",
org.eclipse.mylyn.tasks.ui;bundle-version="3.6.2",
- org.eclipse.core.runtime;bundle-version="3.7.0"
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.mylyn.bugzilla.core;bundle-version="3.6.2",
+ org.eclipse.mylyn.bugzilla.ide;bundle-version="3.6.0",
+ org.eclipse.mylyn.bugzilla.ui;bundle-version="3.6.0",
+ com.atlassian.connector.eclipse.commons.core;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.commons.ui;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.jira.core;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.jira.ui;bundle-version="3.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %providerName
14 years, 10 months
JBoss Tools SVN: r36141 - trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-02 17:57:24 -0400 (Wed, 02 Nov 2011)
New Revision: 36141
Modified:
trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
Log:
https://issues.jboss.org/browse/JBIDE-9351 provide mylyn connections for issues.jboss.org and bugzila.redhat.com via new plugin in "Common" component
Modified: trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF 2011-11-02 21:43:01 UTC (rev 36140)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF 2011-11-02 21:57:24 UTC (rev 36141)
@@ -11,4 +11,8 @@
org.eclipse.mylyn.commons.ui;bundle-version="3.6.1",
org.eclipse.mylyn.tasks.core;bundle-version="3.6.0",
org.eclipse.mylyn.tasks.ui;bundle-version="3.6.2",
- org.eclipse.core.runtime;bundle-version="3.7.0"
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ com.atlassian.connector.eclipse.commons.core;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.commons.ui;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.jira.core;bundle-version="3.0.0",
+ com.atlassian.connector.eclipse.jira.ui;bundle-version="3.0.0"
14 years, 10 months
JBoss Tools SVN: r36140 - trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-02 17:43:01 -0400 (Wed, 02 Nov 2011)
New Revision: 36140
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/AssignableBeansDialogTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java
Log:
JBIDE-10086
https://issues.jboss.org/browse/JBIDE-10086
Test is added for DefaultBean filter for Assignable Beans dialog.
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/AssignableBeansDialogTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/AssignableBeansDialogTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/AssignableBeansDialogTest.java 2011-11-02 21:43:01 UTC (rev 36140)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.seam.text.ext.test;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
+import org.jboss.tools.cdi.seam.solder.core.test.SeamSolderTest;
+import org.jboss.tools.cdi.seam.text.ext.hyperlink.SolderDefaultBeanFilterContributor;
+import org.jboss.tools.cdi.text.ext.hyperlink.AssignableBeanFilters;
+import org.jboss.tools.cdi.text.ext.hyperlink.AssignableBeansDialog;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class AssignableBeansDialogTest extends SeamSolderTest {
+
+ public AssignableBeansDialogTest() {}
+
+ public void testAssignableBeansDialog() {
+ String path = "src/org/jboss/defaultbean/Town.java";
+ IFile file = getTestProject().getFile(path);
+ assertTrue(file.exists());
+ IInjectionPointField injectionPoint = getInjectionPointField(getCDIProject(), path, "huge");
+
+ Display display = Display.getCurrent();
+ if(display == null) {
+ display = Display.getDefault();
+ }
+ AssignableBeansDialog dialog = new AssignableBeansDialog(display.getActiveShell());
+ dialog.setBlockOnOpen(false);
+ dialog.setInjectionPoint(injectionPoint);
+ dialog.open();
+
+ for (int i = 0; i < dialog.getOptions().size(); i++) {
+ dialog.setFilterEnabled(i, true);
+ }
+
+ boolean b = dialog.isFilterEnabled(SolderDefaultBeanFilterContributor.OPTION_DEFAULT_BEAN);
+ assertTrue(b);
+
+ List<IBean> bs = dialog.getDisplayedBeans();
+ assertEquals(2, bs.size());
+
+ dialog.setFilterEnabled(SolderDefaultBeanFilterContributor.OPTION_DEFAULT_BEAN, !b);
+ bs = dialog.getDisplayedBeans();
+ assertEquals(1, bs.size());
+
+ dialog.setFilterEnabled(SolderDefaultBeanFilterContributor.OPTION_DEFAULT_BEAN, b);
+ bs = dialog.getDisplayedBeans();
+ assertEquals(2, bs.size());
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/AssignableBeansDialogTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java 2011-11-02 21:42:30 UTC (rev 36139)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CdiSeamTextExtAllTests.java 2011-11-02 21:43:01 UTC (rev 36140)
@@ -47,6 +47,7 @@
TestSuite suiteSolder = new TestSuite("CDI Seam Solder Tests");
suiteSolder.addTestSuite(InjectedPointHyperlinkTest.class);
suiteSolder.addTestSuite(SeamGenericInjectedPointHyperlinkTest.class);
+ suiteSolder.addTestSuite(AssignableBeansDialogTest.class);
suiteAll.addTest(new SeamSolderTestSetup(suiteSolder));
14 years, 10 months
JBoss Tools SVN: r36139 - trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-02 17:42:30 -0400 (Wed, 02 Nov 2011)
New Revision: 36139
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SolderDefaultBeanFilterContributor.java
Log:
JBIDE-10086
https://issues.jboss.org/browse/JBIDE-10086
DefaultBean filter for Assignable Beans dialog is implemented.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SolderDefaultBeanFilterContributor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SolderDefaultBeanFilterContributor.java 2011-11-02 21:29:33 UTC (rev 36138)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/SolderDefaultBeanFilterContributor.java 2011-11-02 21:42:30 UTC (rev 36139)
@@ -30,7 +30,7 @@
*
*/
public class SolderDefaultBeanFilterContributor implements FilterContributor {
- static final int OPTION_DEFAULT_BEAN = 21;
+ public static final int OPTION_DEFAULT_BEAN = 21;
@Override
public void contribute(AssignableBeanFilters filters, IInjectionPoint injectionPoint) {
14 years, 10 months
JBoss Tools SVN: r36138 - trunk/ws/docs.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-02 17:29:33 -0400 (Wed, 02 Nov 2011)
New Revision: 36138
Removed:
trunk/ws/docs/reference/
Log:
removing the web services reference guide, as it has now been split into two guides. One for restful web services and one for soap
14 years, 10 months
JBoss Tools SVN: r36137 - in trunk/cdi/plugins: org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-02 15:37:45 -0400 (Wed, 02 Nov 2011)
New Revision: 36137
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddQualifiersToBeanProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java
Log:
Quickfix and Wizard for fixing ambigious injection warning is confusing https://issues.jboss.org/browse/JBIDE-9940
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-11-02 19:14:44 UTC (rev 36136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDICoreMessages.java 2011-11-02 19:37:45 UTC (rev 36137)
@@ -26,8 +26,11 @@
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW;
public static String CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR;
- public static String CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT;
+ public static String CDI_RENAME_PROCESSOR_ERROR_OUT_OF_SYNC_PROJECT;
+ public static String CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE;
public static String CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
+ public static String CDI_RENAME_PROCESSOR_ERROR_BEAN_NOT_FOUND;
+ public static String CDI_RENAME_PROCESSOR_ERROR_INJECTION_POINT_NOT_FOUND;
public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE;
public static String CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-11-02 19:14:44 UTC (rev 36136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/messages.properties 2011-11-02 19:37:45 UTC (rev 36137)
@@ -1,8 +1,11 @@
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERROR=Error
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_ERRORS_OCCURED=Error occured during installing CDI facet
CDI_FACET_INSTALL_ABSTRACT_DELEGATE_CHECK_ERROR_LOG_VIEW=Check Errors View for details
-CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
+CDI_RENAME_PROCESSOR_ERROR_OUT_OF_SYNC_PROJECT=Cannot change file(s). Project ''{0}'' is not in sync.
+CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file: ''{0}''.
CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file: ''{0}''.
+CDI_RENAME_PROCESSOR_ERROR_BEAN_NOT_FOUND=CDI Bean Class not found
+CDI_RENAME_PROCESSOR_ERROR_INJECTION_POINT_NOT_FOUND=CDI Injection Point not found
CDI_RENAME_PROCESSOR_QUESTION_DIALOG_TITLE=Read-only File Encountered
CDI_RENAME_PROCESSOR_QUESTION_DIALOG_MESSAGE=File ''{0}'' is read-only. Do you wish to make it writable?
RENAME_NAMED_BEAN_PROCESSOR_TITLE=Rename @Named Bean
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-11-02 19:14:44 UTC (rev 36136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2011-11-02 19:37:45 UTC (rev 36137)
@@ -170,7 +170,7 @@
@Override
protected void outOfSynch(IProject project) {
- status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_OUT_OF_SYNC_PROJECT, project.getFullPath().toString()));
}
@Override
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddQualifiersToBeanProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddQualifiersToBeanProcessor.java 2011-11-02 19:14:44 UTC (rev 36136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/AddQualifiersToBeanProcessor.java 2011-11-02 19:37:45 UTC (rev 36137)
@@ -13,12 +13,14 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.jboss.tools.cdi.core.CDICoreMessages;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.ui.refactoring.CDIRefactoringProcessor;
@@ -41,7 +43,16 @@
public RefactoringStatus checkInitialConditions(IProgressMonitor pm)
throws CoreException, OperationCanceledException {
status = new RefactoringStatus();
+
+ if(injectionPoint == null){
+ status.addFatalError(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_INJECTION_POINT_NOT_FOUND);
+ return status;
+ }
+ IFile injectionPointFile = (IFile)injectionPoint.getClassBean().getResource();
+
+ isFileCorrect(injectionPointFile);
+
return status;
}
@@ -50,6 +61,17 @@
CheckConditionsContext context) throws CoreException,
OperationCanceledException {
+ if(selectedBean == null){
+ status.addFatalError(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_BEAN_NOT_FOUND);
+ return status;
+ }
+
+ IFile beanFile = (IFile)selectedBean.getBeanClass().getResource();
+
+ if(!isFileCorrect(beanFile)){
+ return status;
+ }
+
createRootChange();
MarkerResolutionUtils.addQualifiersToBean(qualifiers, selectedBean, rootChange);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java 2011-11-02 19:14:44 UTC (rev 36136)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/refactoring/CDIRefactoringProcessor.java 2011-11-02 19:37:45 UTC (rev 36137)
@@ -105,11 +105,12 @@
return null;
}
- private boolean isFileCorrect(IFile file){
+ protected boolean isFileCorrect(IFile file){
if(!file.isSynchronized(IResource.DEPTH_ZERO)){
- status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_OUT_OF_SYNC_PROJECT, file.getProject().getFullPath().toString()));
return false;
}else if(file.isPhantom()){
+ status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_PHANTOM_FILE, file.getFullPath().toString()));
return false;
}else if(file.isReadOnly()){
status.addFatalError(NLS.bind(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE, file.getFullPath().toString()));
@@ -146,7 +147,7 @@
if(isFileCorrect(file)){
bean = findClassBean();
}else
- status.addFatalError("CDI Bean Class not found");
+ status.addFatalError(CDICoreMessages.CDI_RENAME_PROCESSOR_ERROR_BEAN_NOT_FOUND);
return status;
}
14 years, 10 months
JBoss Tools SVN: r36136 - workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-11-02 15:14:44 -0400 (Wed, 02 Nov 2011)
New Revision: 36136
Added:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java
Modified:
workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- created the ManageDevicesDialog for adding/removing devices
Modified: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/BrowserSim.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/BrowserSim.java 2011-11-02 17:59:07 UTC (rev 36135)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/BrowserSim.java 2011-11-02 19:14:44 UTC (rev 36136)
@@ -14,7 +14,6 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import org.eclipse.swt.SWT;
@@ -288,6 +287,15 @@
}
});
}
+
+ new MenuItem(devicesMenu, SWT.BAR);
+ MenuItem manageDevicesMenuItem = new MenuItem(devicesMenu, SWT.PUSH);
+ manageDevicesMenuItem.setText("Manage Devices...");
+ manageDevicesMenuItem.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ new ManageDevicesDialog(shell, SWT.APPLICATION_MODAL | SWT.SHELL_TRIM).open();
+ }
+ });
}
private Menu createDropDownMenu(Menu menuBar, String name) {
Added: workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java
===================================================================
--- workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java (rev 0)
+++ workspace/yradtsevich/browsersim/swt-webkit-browsersim/org.jboss.tools.browsersim/src/org/jboss/tools/browsersim/ManageDevicesDialog.java 2011-11-02 19:14:44 UTC (rev 36136)
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.browsersim;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Dialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public class ManageDevicesDialog extends Dialog {
+
+ protected Object result;
+ protected Shell shell;
+
+
+ private Table table;
+
+ /**
+ * Create the dialog.
+ * @param parent
+ * @param style
+ */
+ public ManageDevicesDialog(Shell parent, int style) {
+ super(parent, style);
+ setText("Devices");
+ }
+
+ /**
+ * Open the dialog.
+ * @return the result
+ */
+ public Object open() {
+ createContents();
+ shell.open();
+ shell.layout();
+ Display display = getParent().getDisplay();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Create contents of the dialog.
+ */
+ private void createContents() {
+ shell = new Shell(getParent(), getStyle());
+ shell.setSize(450, 300);
+ shell.setText(getText());
+ shell.setLayout(new GridLayout(2, false));
+
+ table = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);
+ table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn tableColumnName = new TableColumn(table, SWT.NONE);
+ tableColumnName.setWidth(100);
+ tableColumnName.setText("Name");
+
+ TableColumn tableColumnWidth = new TableColumn(table, SWT.NONE);
+ tableColumnWidth.setWidth(100);
+ tableColumnWidth.setText("Width");
+
+ TableColumn tableColumnHeight = new TableColumn(table, SWT.NONE);
+ tableColumnHeight.setWidth(100);
+ tableColumnHeight.setText("Height");
+
+ TableColumn tableColumnUseragent = new TableColumn(table, SWT.NONE);
+ tableColumnUseragent.setWidth(100);
+ tableColumnUseragent.setText("User-Agent");
+
+ Composite compositeControls = new Composite(shell, SWT.NONE);
+ compositeControls.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
+ compositeControls.setLayout(new FillLayout(SWT.VERTICAL));
+
+ Button buttonAdd = new Button(compositeControls, SWT.NONE);
+ buttonAdd.setText("Add");
+
+ Button buttonEdit = new Button(compositeControls, SWT.NONE);
+ buttonEdit.setText("Edit");
+
+ Button buttonRemove = new Button(compositeControls, SWT.NONE);
+ buttonRemove.setText("Remove");
+
+ Button buttonReset = new Button(compositeControls, SWT.NONE);
+ buttonReset.setText("Reset");
+
+ Composite compositeOkCancel = new Composite(shell, SWT.NONE);
+ compositeOkCancel.setLayout(new FillLayout(SWT.HORIZONTAL));
+ compositeOkCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));
+
+ Button buttonOk = new Button(compositeOkCancel, SWT.NONE);
+ buttonOk.setText("OK");
+
+ Button buttonCancel = new Button(compositeOkCancel, SWT.NONE);
+ buttonCancel.setText("Cancel");
+ }
+
+}
14 years, 10 months
JBoss Tools SVN: r36135 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-02 13:59:07 -0400 (Wed, 02 Nov 2011)
New Revision: 36135
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
Log:
Quickfix and Wizard for fixing ambigious injection warning is confusing https://issues.jboss.org/browse/JBIDE-9940
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-11-02 15:54:41 UTC (rev 36134)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-11-02 17:59:07 UTC (rev 36135)
@@ -40,8 +40,6 @@
import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
-import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.DeleteEdit;
@@ -49,9 +47,6 @@
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchWindow;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanField;
@@ -524,16 +519,10 @@
public static void addQualifiersToInjectionPoint(List<ValuedQualifier> deployed, IInjectionPoint injectionPoint, CompositeChange change){
IFile file = (IFile)injectionPoint.getClassBean().getResource();
try{
- ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
- ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ ICompilationUnit compilationUnit = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
- TextFileChange fileChange = new CompilationUnitChange(file.getName(), original);
+ TextFileChange fileChange = new TextFileChange(file.getName(), file);
-// if(isEditorOpened(file))
-// fileChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
-// else
-// fileChange.setSaveMode(TextFileChange.FORCE_SAVE);
-
MultiTextEdit edit = new MultiTextEdit();
if(injectionPoint instanceof IInjectionPointParameter){
@@ -544,7 +533,6 @@
return;
// delete unneeded qualifiers
-
List<IQualifier> toDelete = findQualifiersToDelete(injectionPoint, deployed);
for(IQualifier qualifier : toDelete){
@@ -560,7 +548,6 @@
}
}
}
- compilationUnit.discardWorkingCopy();
fileChange.setEdit(edit);
if(edit.getChildrenSize() > 0)
@@ -574,13 +561,6 @@
public static void addQualifiersToBean(List<ValuedQualifier> deployed, IBean bean, CompositeChange change){
IFile file = (IFile)bean.getBeanClass().getResource();
-
-// if(isEditorOpened(file))
-// fileChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
-// else
-// fileChange.setSaveMode(TextFileChange.FORCE_SAVE);
-
-
IJavaElement beanElement = null;
if(bean instanceof IBeanField){
beanElement = ((IBeanField) bean).getField();
@@ -591,10 +571,9 @@
}
try{
- ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
- ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ ICompilationUnit compilationUnit = EclipseUtil.getCompilationUnit(file);
- TextFileChange fileChange = new CompilationUnitChange(file.getName(), original);
+ TextFileChange fileChange = new TextFileChange(file.getName(), file);
MultiTextEdit edit = new MultiTextEdit();
@@ -619,7 +598,6 @@
}
}
- compilationUnit.discardWorkingCopy();
fileChange.setEdit(edit);
if(edit.getChildrenSize() > 0)
@@ -766,15 +744,22 @@
IImportContainer importContainer = compilationUnit.getImportContainer();
if(importDeclaration.exists() && importContainer.exists()){
int importSize = importContainer.getSourceRange().getOffset()+importContainer.getSourceRange().getLength();
- String text = buffer.getText(importSize, buffer.getLength()-importSize);
- if(checkImport(text, qualifiedName)){
+
if(rootEdit != null){
- TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength()+numberOfSpaces);
- rootEdit.addChild(edit);
+ int annotationStart = annotation.getSourceRange().getOffset();
+ int annotationEnd = annotationStart+annotation.getSourceRange().getLength();
+ String textBefore = buffer.getText(importSize, annotationStart-importSize);
+ String textAfter = buffer.getText(annotationEnd, buffer.getLength()-annotationEnd);
+ if(checkImport(textBefore, qualifiedName) && checkImport(textAfter, qualifiedName)){
+ TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength());
+ rootEdit.addChild(edit);
+ }
}else{
- importDeclaration.delete(false, new NullProgressMonitor());
+ String text = buffer.getText(importSize, buffer.getLength()-importSize);
+ if(checkImport(text, qualifiedName)){
+ importDeclaration.delete(false, new NullProgressMonitor());
+ }
}
- }
}
if(rootEdit == null){
@@ -825,7 +810,6 @@
Set<IQualifier> qualifiers = bean.getQualifiers();
for(IQualifier q : qualifiers){
- //String value = findQualifierValue(bean, q);
if(q.getSourceType().getFullyQualifiedName().equals(valuedQualifier.getQualifier().getSourceType().getFullyQualifiedName()))
return true;
}
@@ -858,17 +842,4 @@
}
return null;
}
-
- public static boolean isEditorOpened(IFile file){
- IEditorInput ii = EditorUtility.getEditorInput(file);
-
- IWorkbenchWindow[] windows = CDIUIPlugin.getDefault().getWorkbench().getWorkbenchWindows();
- for(IWorkbenchWindow window : windows){
- IEditorPart editor = window.getActivePage().findEditor(ii);
- if(editor != null)
- return true;
- }
- return false;
- }
-
}
14 years, 10 months