JBoss Tools SVN: r36123 - trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-01 20:38:19 -0400 (Tue, 01 Nov 2011)
New Revision: 36123
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/AssignableBeansDialogTest.java
Log:
JBIDE-10086
https://issues.jboss.org/browse/JBIDE-10086
DefaultBean filter for Assignable Beans dialog is implemented.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/AssignableBeansDialogTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/AssignableBeansDialogTest.java 2011-11-02 00:38:09 UTC (rev 36122)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/AssignableBeansDialogTest.java 2011-11-02 00:38:19 UTC (rev 36123)
@@ -46,10 +46,10 @@
List<IBean> bs = dialog.getDisplayedBeans();
int allBeans = bs.size();
- for (int i = 0; i < AssignableBeanFilters.ALL_OPTIONS.length; i++) {
+ for (int i = 0; i < dialog.getOptions().size(); i++) {
dialog.setFilterEnabled(i, true);
}
- for (int i = 0; i < AssignableBeanFilters.ALL_OPTIONS.length; i++) {
+ for (int i = 0; i < dialog.getOptions().size(); i++) {
boolean b = dialog.isFilterEnabled(i);
dialog.setFilterEnabled(i, !b);
bs = dialog.getDisplayedBeans();
13 years, 4 months
JBoss Tools SVN: r36122 - in trunk/cdi/plugins/org.jboss.tools.cdi.text.ext: schema and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-01 20:38:09 -0400 (Tue, 01 Nov 2011)
New Revision: 36122
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/assignableBeanFilterContributors.exsd
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeanFilters.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeansDialog.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.text.ext/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml 2011-11-02 00:14:46 UTC (rev 36121)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/plugin.xml 2011-11-02 00:38:09 UTC (rev 36122)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
+ <extension-point id="assignableBeanFilterContributors" name="Assignable Bean Filter Contributors" schema="schema/assignableBeanFilterContributors.exsd"/>
<extension
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
@@ -62,4 +63,4 @@
</hyperlinkPartitioner>
</extension>
-</plugin>
\ No newline at end of file
+</plugin>
Added: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/assignableBeanFilterContributors.exsd
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/assignableBeanFilterContributors.exsd (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/assignableBeanFilterContributors.exsd 2011-11-02 00:38:09 UTC (rev 36122)
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.cdi.text.ext" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.jboss.tools.cdi.text.ext" id="assignableBeanFilterContributors" name="Assignable Bean Filter Contributors"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="contributor" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="contributor">
+ <complexType>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/schema/assignableBeanFilterContributors.exsd
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeanFilters.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeanFilters.java 2011-11-02 00:14:46 UTC (rev 36121)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeanFilters.java 2011-11-02 00:38:09 UTC (rev 36122)
@@ -11,16 +11,22 @@
package org.jboss.tools.cdi.text.ext.hyperlink;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMember;
-import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IProducer;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
/**
*
@@ -33,6 +39,12 @@
public void filter(Set<IBean> beans);
}
+ public static interface FilterContributor {
+ public void contribute(AssignableBeanFilters filters, IInjectionPoint injectionPoint);
+ }
+
+ static FilterContributor[] contributors = null;
+
public static int OPTION_UNAVAILABLE_BEANS = 1;
public static int OPTION_DECORATOR = 2;
public static int OPTION_INTERCEPTOR = 3;
@@ -50,7 +62,6 @@
this.id = id;
this.label = label;
this.filter = filter;
- ALL_OPTIONS[id] = this;
}
Checkbox parent = null;
List<Checkbox> children = new ArrayList<Checkbox>();
@@ -71,7 +82,6 @@
}
public void filter(Set<IBean> beans) {
- if(id == OPTION_ELIMINATED_AMBIGUOUS) filter = new EliminatedAmbiguousFilter();
if(!isEnabled() && filter != null) {
filter.filter(beans);
}
@@ -81,20 +91,70 @@
}
}
- public static Checkbox[] ALL_OPTIONS = new Checkbox[8];
+ private Map<Integer, Checkbox> allOptions = new HashMap<Integer, Checkbox>();
+ private Checkbox root = new Checkbox(0, "", null);
- public static Checkbox ROOT = new Checkbox(0, "", null);
+ public AssignableBeanFilters() {
+ initContributors();
+ }
+
+ void initContributors() {
+ if(contributors == null) {
+ IConfigurationElement[] cs = Platform.getExtensionRegistry().getExtensionPoint("org.jboss.tools.cdi.text.ext.assignableBeanFilterContributors").getConfigurationElements();
+ ArrayList<FilterContributor> s = new ArrayList<FilterContributor>();
+ for (IConfigurationElement c: cs) {
+ try {
+ FilterContributor f = (FilterContributor)c.createExecutableExtension("class");
+ s.add(f);
+ } catch (CoreException e) {
+ CDIExtensionsPlugin.getDefault().log(e);
+ }
+ }
+ contributors = s.toArray(new FilterContributor[s.size()]);
+ }
+ }
- static {
- Checkbox unavailable = ROOT.add(OPTION_UNAVAILABLE_BEANS, "Unavailable Beans", null);
- unavailable.add(OPTION_DECORATOR, "@Decorator", new DecoratorFilter());
- unavailable.add(OPTION_INTERCEPTOR, "@Interceptor", new InterceptorFilter());
- unavailable.add(OPTION_UNSELECTED_ALTERNATIVE, "Unselected @Alternative", new UnselectedAlternativeFilter());
- unavailable.add(OPTION_PRODUCER_IN_UNAVAILABLE_BEAN, "@Produces in unavailable bean", new ProducerFilter());
- unavailable.add(OPTION_SPECIALIZED_BEAN, "Specialized beans", new SpecializedBeanFilter());
- ROOT.add(OPTION_ELIMINATED_AMBIGUOUS, "Eliminated ambiguous", new EliminatedAmbiguousFilter());
+ public void init(IInjectionPoint point) {
+ allOptions.clear();
+ allOptions.put(root.id, root);
+ add(0, OPTION_UNAVAILABLE_BEANS, "Unavailable Beans", null);
+ add(OPTION_UNAVAILABLE_BEANS, OPTION_DECORATOR, "@Decorator", new DecoratorFilter());
+ add(OPTION_UNAVAILABLE_BEANS, OPTION_INTERCEPTOR, "@Interceptor", new InterceptorFilter());
+ add(OPTION_UNAVAILABLE_BEANS, OPTION_UNSELECTED_ALTERNATIVE, "Unselected @Alternative", new UnselectedAlternativeFilter());
+ add(OPTION_UNAVAILABLE_BEANS, OPTION_PRODUCER_IN_UNAVAILABLE_BEAN, "@Produces in unavailable bean", new ProducerFilter());
+ add(OPTION_UNAVAILABLE_BEANS, OPTION_SPECIALIZED_BEAN, "Specialized beans", new SpecializedBeanFilter());
+ add(0, OPTION_ELIMINATED_AMBIGUOUS, "Eliminated ambiguous", new EliminatedAmbiguousFilter());
+ for (FilterContributor c: contributors) {
+ c.contribute(this, point);
+ }
}
-
+
+ public void add(int parentId, int id, String label, Filter f) {
+ Checkbox parent = getOption(parentId);
+ if(parent == null) {
+ parent = root;
+ }
+ Checkbox c = parent.add(id, label, f);
+ allOptions.put(id, c);
+ }
+
+ public Checkbox getRoot() {
+ return root;
+ }
+
+ public Map<Integer, Checkbox> getAllOptions() {
+ return allOptions;
+ }
+
+ public Checkbox getOption(int id) {
+ return allOptions.get(id);
+ }
+
+ public Filter getFilter(int id) {
+ Checkbox c = getOption(id);
+ return c == null ? null : c.filter;
+ }
+
public static class DecoratorFilter implements Filter {
public void filter(Set<IBean> beans) {
Iterator<IBean> it = beans.iterator();
@@ -158,11 +218,12 @@
}
}
- public static class EliminatedAmbiguousFilter implements Filter {
+ public class EliminatedAmbiguousFilter implements Filter {
+
public void filter(Set<IBean> beans) {
Set<IBean> eligible = new HashSet<IBean>(beans);
for (int i = OPTION_UNAVAILABLE_BEANS + 1; i < OPTION_ELIMINATED_AMBIGUOUS; i++) {
- Filter f = ALL_OPTIONS[i].filter;
+ Filter f = getFilter(i);
if(f != null) {
f.filter(eligible);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeansDialog.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeansDialog.java 2011-11-02 00:14:46 UTC (rev 36121)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AssignableBeansDialog.java 2011-11-02 00:38:09 UTC (rev 36122)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.text.ext.hyperlink;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -18,7 +19,6 @@
import java.util.Set;
import java.util.TreeMap;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
@@ -68,24 +68,18 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.dialogs.SearchPattern;
-import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDIImages;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIElement;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointParameter;
-import org.jboss.tools.cdi.core.IProducer;
-import org.jboss.tools.cdi.core.IProducerField;
-import org.jboss.tools.cdi.core.IProducerMethod;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
import org.jboss.tools.cdi.core.util.BeanPresentationUtil;
-import org.jboss.tools.cdi.internal.core.impl.AbstractBeanElement;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
import org.jboss.tools.cdi.text.ext.hyperlink.AssignableBeanFilters.Checkbox;
import org.jboss.tools.cdi.text.ext.hyperlink.AssignableBeanFilters.Filter;
import org.jboss.tools.common.java.IParametedType;
-import org.jboss.tools.common.text.ITextSourceReference;
/**
*
@@ -94,6 +88,7 @@
*/
public class AssignableBeansDialog extends PopupDialog {// TitleAreaDialog {
IInjectionPoint injectionPoint;
+ AssignableBeanFilters filters = null;
Set<IBean> beans = new HashSet<IBean>();
Set<IBean> eligibleBeans = new HashSet<IBean>();
Set<IBean> resolvedBeans = new HashSet<IBean>();
@@ -113,24 +108,27 @@
//PopupDialog
super(parentShell, 0, true, true, true, true, true, "title", null);
setShellStyle(getShellStyle() | SWT.RESIZE);
- initSettings();
+ filters = new AssignableBeanFilters();
}
protected void initSettings() {
IDialogSettings settings = getDialogSettings();
showHideOptions = settings.getBoolean(SHOW_HIDE_PANEL);
- for (Checkbox c: AssignableBeanFilters.ALL_OPTIONS) {
- c.state = settings.getBoolean(FILTER_OPTION + c.id);
+ for (Checkbox c: filters.getAllOptions().values()) {
+ String name = FILTER_OPTION + c.id;
+ c.state = !"false".equals(settings.get(name));
}
- AssignableBeanFilters.ROOT.state = true;
+ filters.getRoot().state = true;
}
public void setInjectionPoint(IInjectionPoint injectionPoint) {
this.injectionPoint = injectionPoint;
+ filters.init(injectionPoint);
+ initSettings();
beans = injectionPoint.getCDIProject().getBeans(false, injectionPoint);
eligibleBeans = new HashSet<IBean>(beans);
for (int i = AssignableBeanFilters.OPTION_UNAVAILABLE_BEANS + 1; i < AssignableBeanFilters.OPTION_ELIMINATED_AMBIGUOUS; i++) {
- Filter f = AssignableBeanFilters.ALL_OPTIONS[i].filter;
+ Filter f = filters.getFilter(i);
if(f != null) {
f.filter(eligibleBeans);
}
@@ -270,9 +268,9 @@
filterView = new CheckboxTreeViewer(g, 0);
filterView.setAutoExpandLevel(3);
filterView.setContentProvider(checkboxContentProvider);
- filterView.setInput(AssignableBeanFilters.ROOT);
- for (int i = 1; i < AssignableBeanFilters.ALL_OPTIONS.length; i++) {
- filterView.setChecked(AssignableBeanFilters.ALL_OPTIONS[i], true);
+ filterView.setInput(filters.getRoot());
+ for (Checkbox c: filters.getAllOptions().values()) {
+ filterView.setChecked(c, true);
}
filterView.getControl().setBackground(g.getBackground());
g.setData(new GridData(GridData.FILL_BOTH));
@@ -373,11 +371,11 @@
}
protected IDialogSettings getDialogSettings() {
IDialogSettings settings = CDIExtensionsPlugin.getDefault().getDialogSettings().getSection(getId());
- if(settings == null) {
+ if(settings == null && filters != null && injectionPoint != null) {
settings = CDIExtensionsPlugin.getDefault().getDialogSettings().addNewSection(getId());
settings.put(SHOW_HIDE_PANEL, true);
- for (Checkbox c: AssignableBeanFilters.ALL_OPTIONS) {
- settings.put(FILTER_OPTION + c.id, c.state);
+ for (Checkbox c: filters.getAllOptions().values()) {
+ settings.put(FILTER_OPTION + c.id, "" + c.state);
}
}
return settings;
@@ -394,8 +392,8 @@
private void saveFilterOptions() {
IDialogSettings settings = getDialogSettings();
settings.put(SHOW_HIDE_PANEL, showHideOptions);
- for (Checkbox c: AssignableBeanFilters.ALL_OPTIONS) {
- settings.put(FILTER_OPTION + c.id, c.state);
+ for (Checkbox c: filters.getAllOptions().values()) {
+ settings.put(FILTER_OPTION + c.id, "" + c.state);
}
}
@@ -415,16 +413,23 @@
}
public boolean isFilterEnabled(int index) {
- return AssignableBeanFilters.ALL_OPTIONS[index].state;
+ Checkbox c = filters.getOption(index);
+ return c != null && c.state;
}
public void setFilterEnabled(int index, boolean value) {
- AssignableBeanFilters.ALL_OPTIONS[index].state = value;
+ Checkbox c = filters.getOption(index);
+ if(c == null) return;
+ c.state = value;
filterView.refresh();
// filterView.setChecked(AssignableBeanFilters.ALL_OPTIONS[index], value);
list.refresh();
}
+ public Collection<Checkbox> getOptions() {
+ return filters.getAllOptions().values();
+ }
+
class ShowHideAction extends Action {
public ShowHideAction() {
super("Show/Hide panel", Action.AS_CHECK_BOX);
@@ -520,7 +525,7 @@
Set<IBean> bs = new HashSet<IBean>(beans);
Set<String> keys = new HashSet<String>();
LP p = new LP();
- AssignableBeanFilters.ROOT.filter(bs);
+ filters.getRoot().filter(bs);
textFilter.filter(bs);
Map<String, IBean> map = new TreeMap<String, IBean>();
for (IBean b: bs) {
13 years, 4 months
JBoss Tools SVN: r36121 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: src/org/jboss/tools/cdi/ui/marker and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-01 20:14:46 -0400 (Tue, 01 Nov 2011)
New Revision: 36121
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
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/wizard/AbstractModifyInjectionPointWizard.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/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-01 23:15:50 UTC (rev 36120)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-11-02 00:14:46 UTC (rev 36121)
@@ -34,7 +34,8 @@
org.eclipse.debug.ui;bundle-version="3.7.0",
org.eclipse.ui.navigator;bundle-version="3.5.0",
org.eclipse.ui.navigator.resources;bundle-version="3.4.300",
- org.eclipse.draw2d;bundle-version="3.7.0"
+ org.eclipse.draw2d;bundle-version="3.7.0",
+ org.eclipse.jdt.core.manipulation;bundle-version="1.4.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
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-01 23:15:50 UTC (rev 36120)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MarkerResolutionUtils.java 2011-11-02 00:14:46 UTC (rev 36121)
@@ -40,9 +40,12 @@
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;
+import org.eclipse.text.edits.InsertEdit;
import org.eclipse.text.edits.MultiTextEdit;
import org.eclipse.text.edits.ReplaceEdit;
import org.eclipse.text.edits.TextEdit;
@@ -180,7 +183,7 @@
compilationUnit.createImport(qualifiedName, null, new NullProgressMonitor());
}
}else{
- TextEdit edit = new ReplaceEdit(compilationUnit.getImportContainer().getSourceRange().getOffset()+compilationUnit.getImportContainer().getSourceRange().getLength(), 0, compilationUnit.findRecommendedLineSeparator()+IMPORT+SPACE+qualifiedName+SEMICOLON);
+ TextEdit edit = new InsertEdit(compilationUnit.getImportContainer().getSourceRange().getOffset()+compilationUnit.getImportContainer().getSourceRange().getLength(), compilationUnit.findRecommendedLineSeparator()+IMPORT+SPACE+qualifiedName+SEMICOLON);
rootEdit.addChild(edit);
}
}
@@ -267,7 +270,7 @@
}
if(rootEdit != null){
- TextEdit edit = new ReplaceEdit(workingCopyMember.getSourceRange().getOffset(), 0, str);
+ TextEdit edit = new InsertEdit(workingCopyMember.getSourceRange().getOffset(), str);
rootEdit.addChild(edit);
}else{
buffer.replace(workingCopyMember.getSourceRange().getOffset(), 0, str);
@@ -305,10 +308,10 @@
if(rootEdit != null){
if(annotation != null && annotation.exists()){
- TextEdit edit = new ReplaceEdit(annotation.getSourceRange().getOffset()+annotation.getSourceRange().getLength(), 0, lineDelim+AT+shortName+value);
+ TextEdit edit = new InsertEdit(annotation.getSourceRange().getOffset()+annotation.getSourceRange().getLength(), lineDelim+AT+shortName+value);
rootEdit.addChild(edit);
}else{
- TextEdit edit = new ReplaceEdit(((ISourceReference)element).getSourceRange().getOffset(), 0, AT+shortName+value+lineDelim);
+ TextEdit edit = new InsertEdit(((ISourceReference)element).getSourceRange().getOffset(), AT+shortName+value+lineDelim);
rootEdit.addChild(edit);
}
}else{
@@ -520,17 +523,19 @@
public static void addQualifiersToInjectionPoint(List<ValuedQualifier> deployed, IInjectionPoint injectionPoint, CompositeChange change){
IFile file = (IFile)injectionPoint.getClassBean().getResource();
- 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();
try{
ICompilationUnit original = injectionPoint.getClassBean().getBeanClass().getCompilationUnit();
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+
+ TextFileChange fileChange = new CompilationUnitChange(file.getName(), original);
+
+// if(isEditorOpened(file))
+// fileChange.setSaveMode(TextFileChange.LEAVE_DIRTY);
+// else
+// fileChange.setSaveMode(TextFileChange.FORCE_SAVE);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
if(injectionPoint instanceof IInjectionPointParameter){
addQualifiersToParameter(compilationUnit, injectionPoint, deployed, edit);
}else{
@@ -556,25 +561,26 @@
}
}
compilationUnit.discardWorkingCopy();
- original.discardWorkingCopy();
+
+ fileChange.setEdit(edit);
+ if(edit.getChildrenSize() > 0)
+ change.add(fileChange);
}catch(CoreException ex){
CDIUIPlugin.getDefault().logError(ex);
}
- fileChange.setEdit(edit);
- if(edit.getChildrenSize() > 0)
- change.add(fileChange);
+
}
public static void addQualifiersToBean(List<ValuedQualifier> deployed, IBean bean, CompositeChange change){
IFile file = (IFile)bean.getBeanClass().getResource();
- 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();
+
IJavaElement beanElement = null;
if(bean instanceof IBeanField){
beanElement = ((IBeanField) bean).getField();
@@ -588,6 +594,10 @@
ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ TextFileChange fileChange = new CompilationUnitChange(file.getName(), original);
+
+ MultiTextEdit edit = new MultiTextEdit();
+
for(IQualifierDeclaration declaration : bean.getQualifierDeclarations()){
IQualifier qualifier = declaration.getQualifier();
String qualifierName = qualifier.getSourceType().getFullyQualifiedName();
@@ -610,13 +620,14 @@
}
compilationUnit.discardWorkingCopy();
- original.discardWorkingCopy();
+
+ fileChange.setEdit(edit);
+ if(edit.getChildrenSize() > 0)
+ change.add(fileChange);
}catch(CoreException ex){
CDIUIPlugin.getDefault().logError(ex);
}
- fileChange.setEdit(edit);
- if(edit.getChildrenSize() > 0)
- change.add(fileChange);
+
}
private static boolean isQualifierNeeded(List<ValuedQualifier> vQualifiers, IQualifier qualifier){
@@ -744,7 +755,7 @@
// delete annotation
if(rootEdit != null){
- TextEdit edit = new ReplaceEdit(annotation.getSourceRange().getOffset(), annotation.getSourceRange().getLength()+numberOfSpaces, "");
+ TextEdit edit = new DeleteEdit(annotation.getSourceRange().getOffset(), annotation.getSourceRange().getLength()+numberOfSpaces);
rootEdit.addChild(edit);
}else{
buffer.replace(annotation.getSourceRange().getOffset(), annotation.getSourceRange().getLength()+numberOfSpaces, "");
@@ -758,7 +769,7 @@
String text = buffer.getText(importSize, buffer.getLength()-importSize);
if(checkImport(text, qualifiedName)){
if(rootEdit != null){
- TextEdit edit = new ReplaceEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength()+numberOfSpaces, "");
+ TextEdit edit = new DeleteEdit(importDeclaration.getSourceRange().getOffset(), importDeclaration.getSourceRange().getLength()+numberOfSpaces);
rootEdit.addChild(edit);
}else{
importDeclaration.delete(false, new NullProgressMonitor());
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java 2011-11-01 23:15:50 UTC (rev 36120)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AbstractModifyInjectionPointWizard.java 2011-11-02 00:14:46 UTC (rev 36121)
@@ -12,11 +12,9 @@
import java.util.List;
-import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
-import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring;
import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.IBean;
@@ -30,11 +28,13 @@
public boolean showWizard() {
final IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- final Shell shell = win.getShell();
- final RefactoringStarter refactoringStarter = new RefactoringStarter();
- boolean res = refactoringStarter.activate(this, shell, getWindowTitle(), RefactoringSaveHelper.SAVE_ALL);
- //RefactoringStatus rs = refactoringStarter.getInitialConditionCheckingStatus();
- return res;
+ RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(this);
+ try {
+ op.run(win.getShell(), getWindowTitle());
+ } catch (final InterruptedException irex) {
+ return false;
+ }
+ return true;
}
13 years, 4 months
JBoss Tools SVN: r36120 - branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-01 19:15:50 -0400 (Tue, 01 Nov 2011)
New Revision: 36120
Modified:
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
Log:
updated for TOOLSDOC-264
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-11-01 23:15:34 UTC (rev 36119)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-11-01 23:15:50 UTC (rev 36120)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.1</edition>
-<pubsnumber>21</pubsnumber>
+<pubsnumber>22</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-11-01 23:15:34 UTC (rev 36119)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-11-01 23:15:50 UTC (rev 36120)
@@ -111,7 +111,7 @@
</figure>
- <para>Some project examples have dependencies which could not be automatically configured.
+ <!-- <para>Some project examples have dependencies which could not be automatically configured.
In these cases you will receive a message prompt listing the detected requirements (see the figure below).</para>
<figure>
@@ -133,7 +133,7 @@
</imageobject>
</mediaobject>
</figure>
-
+ -->
<para>If you have previously specified user sites (see the <link linkend="UserSites">User Sites</link> chapter) they also will be displayed in the list of project examples in the category that was defined in the XML file with user sites settings. </para>
<figure>
<title>User Site</title>
13 years, 4 months
JBoss Tools SVN: r36119 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-11-01 19:15:34 -0400 (Tue, 01 Nov 2011)
New Revision: 36119
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
Log:
updated for TOOLSDOC-264
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-11-01 23:01:47 UTC (rev 36118)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/project_examples.xml 2011-11-01 23:15:34 UTC (rev 36119)
@@ -111,7 +111,7 @@
</figure>
- <para>Some project examples have dependencies which could not be automatically configured.
+ <!-- <para>Some project examples have dependencies which could not be automatically configured.
In these cases you will receive a message prompt listing the detected requirements (see the figure below).</para>
<figure>
@@ -133,7 +133,7 @@
</imageobject>
</mediaobject>
</figure>
-
+ -->
<para>If you have previously specified user sites (see the <link linkend="UserSites">User Sites</link> chapter) they also will be displayed in the list of project examples in the category that was defined in the XML file with user sites settings. </para>
<figure>
<title>User Site</title>
13 years, 4 months
JBoss Tools SVN: r36118 - in trunk/common/tests/org.jboss.tools.common.mylyn.test: META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-01 19:01:47 -0400 (Tue, 01 Nov 2011)
New Revision: 36118
Added:
trunk/common/tests/org.jboss.tools.common.mylyn.test/.classpath
trunk/common/tests/org.jboss.tools.common.mylyn.test/.project
trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/
trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.mylyn.test/build.properties
trunk/common/tests/org.jboss.tools.common.mylyn.test/plugin.properties
trunk/common/tests/org.jboss.tools.common.mylyn.test/pom.xml
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/CommonMylynAllTests.java
trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/RepositoryTest.java
Log:
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/.classpath 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/.project 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.mylyn.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.common.mylyn.test;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Require-Bundle: org.jboss.tools.common.mylyn,
+ org.junit,
+ org.eclipse.mylyn;bundle-version="3.6.0",
+ org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
+ 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"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %providerName
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/build.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/build.properties (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/build.properties 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = src/,\
+ plugin.properties,\
+ META-INF/
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/plugin.properties
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/plugin.properties (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/plugin.properties 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,2 @@
+providerName=JBoss by Red Hat
+pluginName=JBoss Tools Mylyn Connections Test
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/plugin.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/pom.xml
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/pom.xml (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/pom.xml 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.common</groupId>
+ <artifactId>tests</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.common.tests</groupId>
+ <artifactId>org.jboss.tools.common.mylyn.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.instrument.bundles>org.jboss.tools.common,org.jboss.tools.common.model</emma.instrument.bundles>
+ </properties>
+</project>
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/CommonMylynAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/CommonMylynAllTests.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/CommonMylynAllTests.java 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.common.mylyn.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CommonMylynAllTests {
+
+ public static Test suite() {
+ TestSuite suiteAll = new TestSuite("Common Mylyn Tests");
+ suiteAll.addTestSuite(RepositoryTest.class);
+ return suiteAll;
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/CommonMylynAllTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/RepositoryTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/RepositoryTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/RepositoryTest.java 2011-11-01 23:01:47 UTC (rev 36118)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.common.mylyn.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
+import org.eclipse.mylyn.tasks.core.TaskRepository;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class RepositoryTest extends TestCase {
+
+ public void testBugzilla() {
+ TaskRepository repo = TasksUiPlugin.getRepositoryManager().getRepository("bugzilla", "https://bugzilla.redhat.com");
+ assertNotNull(repo);
+ }
+
+ public void testJIRA() {
+ TaskRepository repo = TasksUiPlugin.getRepositoryManager().getRepository("jira", "https://issues.jboss.org");
+ assertNotNull(repo);
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/tests/org.jboss.tools.common.mylyn.test/src/org/jboss/tools/common/mylyn/test/RepositoryTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r36116 - in trunk/common/plugins/org.jboss.tools.common.mylyn: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-11-01 19:00:21 -0400 (Tue, 01 Nov 2011)
New Revision: 36116
Added:
trunk/common/plugins/org.jboss.tools.common.mylyn/.classpath
trunk/common/plugins/org.jboss.tools.common.mylyn/.project
trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/
trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.mylyn/about.html
trunk/common/plugins/org.jboss.tools.common.mylyn/build.properties
trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.properties
trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml
trunk/common/plugins/org.jboss.tools.common.mylyn/pom.xml
trunk/common/plugins/org.jboss.tools.common.mylyn/src/
Log:
Share project "org.jboss.tools.common.mylyn" into "https://svn.jboss.org/repos/jbosstools"
https://issues.jboss.org/browse/JBIDE-9351
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/.classpath (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/.classpath 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/.project
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/.project (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/.project 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.mylyn</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.common.mylyn;singleton:=true
+Bundle-Version: 3.3.0.qualifier
+Bundle-Vendor: %providerName
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.jboss.tools.common.mylyn,
+ org.eclipse.mylyn;bundle-version="3.6.0",
+ org.eclipse.mylyn.commons.core;bundle-version="3.6.0",
+ 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"
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/about.html
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/about.html (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/about.html 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/about.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/build.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/build.properties 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,14 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = src/,\
+ META-INF/,\
+ about.html,\
+ plugin.properties,\
+ build.properties,\
+ plugin.xml,\
+ pom.xml
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.properties 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,2 @@
+providerName=JBoss by Red Hat
+pluginName=JBoss Tools Mylyn Connections
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension point="org.eclipse.mylyn.tasks.core.templates">
+ <repository
+ addAutomatically="true"
+ label="Red Hat Bugzilla"
+ repositoryKind="bugzilla"
+ urlRepository="https://bugzilla.redhat.com"/>
+ <repository
+ anonymous="false"
+ addAutomatically="true"
+ label="JBoss JIRA"
+ repositoryKind="jira"
+ urlRepository="https://issues.jboss.org"
+ characterEncoding="UTF-8"/>
+ </extension>
+</plugin>
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.mylyn/pom.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/pom.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/pom.xml 2011-11-01 23:00:21 UTC (rev 36116)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.common</groupId>
+ <artifactId>plugins</artifactId>
+ <version>3.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.common.plugins</groupId>
+ <artifactId>org.jboss.tools.common.mylyn</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
Property changes on: trunk/common/plugins/org.jboss.tools.common.mylyn/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r36114 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-01 12:31:36 -0400 (Tue, 01 Nov 2011)
New Revision: 36114
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
Log:
JBIDE-9910
https://issues.jboss.org/browse/JBIDE-9910
Property objects are bound to proposals for 'messages' component.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2011-11-01 16:05:53 UTC (rev 36113)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2011-11-01 16:31:36 UTC (rev 36114)
@@ -225,7 +225,7 @@
String propertyName = segment.getToken().getText();
Map<String, List<XModelObject>> properties = messagesInfo.getPropertiesMap();
- List<XModelObject> os = properties.get(propertyName);
+ List<XModelObject> os = properties.get(trimQuotes(propertyName));
if(os != null) {
for(XModelObject o: os) {
segment.addObject(o);
13 years, 4 months