JBoss Tools SVN: r28926 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-02-02 10:04:59 -0500 (Wed, 02 Feb 2011)
New Revision: 28926
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/TextFormattingToolBar.java
Log:
https://issues.jboss.org/browse/JBIDE-8220 , changing button's style to PUSH (for colors and dialog)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/TextFormattingToolBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/TextFormattingToolBar.java 2011-02-02 14:41:27 UTC (rev 28925)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/TextFormattingToolBar.java 2011-02-02 15:04:59 UTC (rev 28926)
@@ -160,13 +160,13 @@
// itemDescriptors.add(new ToolItemDescriptor(sep, false, null, true));
- item = createToolItem(toolBar, SWT.CHECK,
+ item = createToolItem(toolBar, SWT.PUSH,
createImage("icons/background.gif"), VpeUIMessages.BACKGROUND_COLOR); //$NON-NLS-1$
listener = new BackgroundColorFormatController(formatControllerManager, item);
item.addListener(SWT.Selection, listener);
// itemDescriptors.add(new ToolItemDescriptor(item, true, listener, true));
- item = createToolItem(toolBar, SWT.CHECK,
+ item = createToolItem(toolBar, SWT.PUSH,
createImage("icons/foreground.gif"), VpeUIMessages.FOREGROUND_COLOR); //$NON-NLS-1$
listener = new ForegroundColorFormatController(formatControllerManager, item);
item.addListener(SWT.Selection, listener);
@@ -176,7 +176,7 @@
* Fixes https://issues.jboss.org/browse/JBIDE-8220
* CSSStyleDialog should be on the Formatting toolbar.
*/
- item = createToolItem(toolBar, SWT.CHECK,
+ item = createToolItem(toolBar, SWT.PUSH,
CSSPlugin.getImageDescriptor(Util.IMAGE_COLORLARGE_FILE_LOCATION).createImage(),
VpeUIMessages.EDIT_STYLE_ATTRIBUTE);
listener = new StyleFormatController(formatControllerManager, item);
13 years, 11 months
JBoss Tools SVN: r28925 - trunk/esb/docs/esb_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-02-02 09:41:27 -0500 (Wed, 02 Feb 2011)
New Revision: 28925
Modified:
trunk/esb/docs/esb_ref_guide/en-US/master.xml
Log:
added 2011 copyright
Modified: trunk/esb/docs/esb_ref_guide/en-US/master.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en-US/master.xml 2011-02-02 14:34:09 UTC (rev 28924)
+++ trunk/esb/docs/esb_ref_guide/en-US/master.xml 2011-02-02 14:41:27 UTC (rev 28925)
@@ -43,6 +43,7 @@
<year>2008</year>
<year>2009</year>
<year>2010</year>
+ <year>2011</year>
<holder>JBoss by Red Hat</holder>
</copyright>
<releaseinfo>
13 years, 11 months
JBoss Tools SVN: r28924 - trunk/esb/docs/esb_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-02-02 09:34:09 -0500 (Wed, 02 Feb 2011)
New Revision: 28924
Modified:
trunk/esb/docs/esb_ref_guide/en-US/summary.xml
Log:
fixed JBoss Wiki link
Modified: trunk/esb/docs/esb_ref_guide/en-US/summary.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en-US/summary.xml 2011-02-02 14:27:38 UTC (rev 28923)
+++ trunk/esb/docs/esb_ref_guide/en-US/summary.xml 2011-02-02 14:34:09 UTC (rev 28924)
@@ -21,7 +21,7 @@
</listitem>
<listitem>
<para>
- <ulink url="http://wiki.jboss.org/wiki/JBossESB">JBoss Wiki</ulink>
+ <ulink url="http://community.jboss.org/en/wiki">JBoss Wiki</ulink>
</para>
</listitem>
<listitem>
@@ -37,4 +37,4 @@
> JBoss Tools nightly documentation page</ulink>.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
13 years, 11 months
JBoss Tools SVN: r28923 - trunk/esb/docs/esb_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-02-02 09:27:38 -0500 (Wed, 02 Feb 2011)
New Revision: 28923
Modified:
trunk/esb/docs/esb_ref_guide/en-US/reference.xml
Log:
typo
Modified: trunk/esb/docs/esb_ref_guide/en-US/reference.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en-US/reference.xml 2011-02-02 14:15:42 UTC (rev 28922)
+++ trunk/esb/docs/esb_ref_guide/en-US/reference.xml 2011-02-02 14:27:38 UTC (rev 28923)
@@ -96,7 +96,7 @@
</figure>
<para>Adding, editing or deleting of some artifacts operations are available right in the
- <property>Tree view</property> . Right-click any node and select one of the
+ <property>Tree view</property>. Right-click any node and select one of the
available actions in the context menu. For example, you can easily add a new Provider:</para>
<para/>
<figure>
@@ -176,7 +176,7 @@
<note>
<title>Note:</title>
- <para>Some new components are available to support ESB 4.7,such as:
+ <para>Some new components are available to support ESB 4.7, such as:
new actions (XsltAction, PersistAction, BpmProcessor, ScriptingAction),
new processors (EJBProcessor), new routers (HttpRouter, JMSRouter, EmailRouter).
</para>
13 years, 11 months
JBoss Tools SVN: r28922 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2011-02-02 09:15:42 -0500 (Wed, 02 Feb 2011)
New Revision: 28922
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELSeverityPreferences.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
Log:
https://issues.jboss.org/browse/JBIDE-7003 bundle map has been refactored, work under validator still in progress
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-02-02 14:15:42 UTC (rev 28922)
@@ -584,6 +584,29 @@
</validator>
</extension>
<extension
+ point="org.eclipse.wst.sse.ui.sourcevalidation">
+ <!--Added by Maksim Areshkau -->
+ <validator
+ class="org.jboss.tools.jsf.web.validation.i18n.I18nValidator"
+ id="org.jboss.tools.jsf.externalize.source.validator"
+ scope="total">
+ <contentTypeIdentifier
+ id="jsf.facelet">
+ <partitionType id="org.eclipse.wst.html.HTML_DEFAULT"/>
+ </contentTypeIdentifier>
+ <contentTypeIdentifier
+ id="org.eclipse.wst.html.core.htmlsource">
+ <partitionType
+ id="org.eclipse.wst.html.HTML_DEFAULT"/>
+ </contentTypeIdentifier>
+ <contentTypeIdentifier
+ id="org.eclipse.jst.jsp.core.jspsource">
+ <partitionType
+ id="org.eclipse.wst.html.HTML_DEFAULT"/>
+ </contentTypeIdentifier>
+ </validator>
+ </extension>
+ <extension
point="org.eclipse.wst.sse.ui.quickFixProcessor">
<quickFixProcessor
class="org.jboss.tools.jsf.web.validation.jsf2.action.JSF2QuickFixProcessor"
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/i18n/I18nValidator.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.web.validation.i18n;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.jboss.tools.jsf.jsf2.model.JSF2ComponentModelManager;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+/**
+ * Validator which looks for non externalized strings
+ *
+ * @author mareshkau
+ *
+ */
+@SuppressWarnings("restriction")
+public class I18nValidator implements ISourceValidator, IValidator{
+ private IDOMDocument document;
+ public void connect(IDocument document) {
+ this.document=JSF2ComponentModelManager
+ .getReadableDOMDocument(document);
+ }
+
+ public void disconnect(IDocument document) {
+ this.document=null;
+ }
+
+ public void validate(IRegion dirtyRegion, IValidationContext helper,
+ IReporter reporter) {
+ // TODO Auto-generated method stub
+ }
+
+ public void cleanup(IReporter reporter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void validate(IValidationContext helper, IReporter reporter)
+ throws ValidationException {
+ List<Node> stringNodes = new ArrayList<Node>();
+ lookForStrings(document, stringNodes);
+ }
+
+
+ private void lookForStrings(Node node, List<Node> nonExtStings){
+ NodeList childNodes = node.getChildNodes();
+ for(int i=0;i<childNodes.getLength();i++) {
+ Node childNode = childNodes.item(i);
+ if(childNode instanceof Text){
+ nonExtStings.add(childNode);
+ } else {
+ lookForStrings(childNode, nonExtStings);
+ }
+ }
+ }
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2ComponentsValidator.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -35,6 +35,7 @@
import org.jboss.tools.jst.web.kb.KbProjectFactory;
/**
+ * Validates full file, when we click validate in Context menu
*
* @author yzhishko
* @author mareshkau
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/JSF2SourceValidator.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -38,6 +38,7 @@
import org.jboss.tools.jsf.web.validation.jsf2.components.JSF2URITempComponent;
/**
+ * Validates when we change smth in file
*
* @author yzhishko
* @author mareshkau
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -40,6 +40,15 @@
*/
public Locale getLocale(ITextEditor editor) {
IEditorInput editorInput = editor.getEditorInput();
+ return getLocale(editorInput);
+ }
+
+ public String getLocaleString() {
+ return localeString;
+ }
+
+ @Override
+ public Locale getLocale(IEditorInput editorInput) {
if (editorInput instanceof IFileEditorInput) {
IProject project = ((IFileEditorInput)editorInput)
.getFile().getProject();
@@ -54,9 +63,5 @@
return null;
}
}
-
- public String getLocaleString() {
- return localeString;
- }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -34,8 +34,6 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.el.core.model.ELArgumentInvocation;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInstance;
@@ -65,8 +63,6 @@
};
private BundleMapListener[] bundleMapListeners = new BundleMapListener[0];
- private ITextEditor editor;
-
private String[] javaSources;
/*
* Stores the current VPE locale.
@@ -79,26 +75,26 @@
IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
XModelTreeListener modelListener = new ML();
+ private IEditorInput editorInput =null;
- public void init(ITextEditor editor){
- this.editor = editor;
- IEditorInput input = editor.getEditorInput();
+ public void init(IEditorInput input){
+ this.editorInput = input;
- if (input instanceof IFileEditorInput) {
- javaSources = getJavaProjectSrcLocations(((IFileEditorInput)input).getFile().getProject());
+ if (getEditorInput() instanceof IFileEditorInput) {
+ javaSources = getJavaProjectSrcLocations(((IFileEditorInput)getEditorInput()).getFile().getProject());
}
/*
* Initialize the locale with default value.
*/
- locale = MainLocaleProvider.getInstance().getLocale(editor);
+ locale = MainLocaleProvider.getInstance().getLocale(getEditorInput());
refreshRegisteredBundles();
PreferenceModelUtilities.getPreferenceModel().addModelTreeListener(modelListener);
}
public void refreshRegisteredBundles() {
if (hasJsfProjectNatureType()
- && (editor.getEditorInput() instanceof IFileEditorInput)) {
- IProject project = ((IFileEditorInput) editor.getEditorInput())
+ && (getEditorInput() instanceof IFileEditorInput)) {
+ IProject project = ((IFileEditorInput)getEditorInput())
.getFile().getProject();
IModelNature modelNature = EclipseResourceUtil
.getModelNature(project);
@@ -155,7 +151,7 @@
private boolean hasJsfProjectNatureType() {
boolean hasJsfProjectNatureType = false;
try {
- IEditorInput ei = editor.getEditorInput();
+ IEditorInput ei = getEditorInput();
if(ei instanceof IFileEditorInput) {
IProject project = ((IFileEditorInput)ei).getFile().getProject();
if (project.exists() && project.isOpen()) {
@@ -196,8 +192,8 @@
if(entry == null){
if (hasJsfProjectNatureType()) {
- if (editor.getEditorInput() instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
+ if (getEditorInput() instanceof IFileEditorInput) {
+ IProject project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
String prefix2 = prefix;
if(propertyName != null && prefix != null) {
@@ -214,10 +210,10 @@
p.put(WebPromptingProvider.BUNDLE, entry.uri);
p.put(WebPromptingProvider.KEY, propertyName);
if (locale != null) p.put(WebPromptingProvider.LOCALE, locale);
- p.put(WebPromptingProvider.FILE, ((IFileEditorInput)editor.getEditorInput()).getFile().getProject());
+ p.put(WebPromptingProvider.FILE, ((IFileEditorInput)getEditorInput()).getFile().getProject());
String error = null;
- if (editor.getEditorInput() instanceof IFileEditorInput) {
- IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
+ if (getEditorInput() instanceof IFileEditorInput) {
+ IProject project = ((IFileEditorInput)getEditorInput()).getFile().getProject();
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_OPEN_KEY, entry.uri, p);
error = p.getProperty(WebPromptingProvider.ERROR);
@@ -235,7 +231,7 @@
* @return the bundle file
*/
public IFile getBundleFile(String uri){
- IEditorInput input = editor.getEditorInput();
+ IEditorInput input = getEditorInput();
IProject project = ((FileEditorInput)input).getFile().getProject();
if(project == null || !project.isOpen()) {
return null;
@@ -393,8 +389,7 @@
public void refresh(){
refreshRegisteredBundles();
- IEditorInput input = editor.getEditorInput();
-
+ IEditorInput input = getEditorInput();
if (input instanceof IFileEditorInput) {
javaSources = getJavaProjectSrcLocations(((IFileEditorInput)input).getFile().getProject());
UsedKey key;
@@ -672,5 +667,9 @@
public BundleEntry[] getBundles() {
return bundles;
}
+
+ private IEditorInput getEditorInput() {
+ return editorInput;
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -920,7 +920,7 @@
int hash;
Map<?, ?> map = null;
BundleMap bm = new BundleMap();
- bm.init(editor);
+ bm.init(editor.getEditorInput());
/*
* Check JSF Nature
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ILocaleProvider.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -12,6 +12,7 @@
import java.util.Locale;
+import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.texteditor.ITextEditor;
/**
@@ -26,6 +27,8 @@
* may return {@code null} if they can not determine the locale.
*/
Locale getLocale(ITextEditor editor);
+
+ Locale getLocale(IEditorInput editorInput);
/**
* Shows the string representation of the locale
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/MainLocaleProvider.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -75,7 +75,14 @@
* system locale if nothing found (never returns {@code null}).
*/
public Locale getLocale(ITextEditor editor) {
- IEditorInput editorInput = editor.getEditorInput();
+ return this.getLocale(editor.getEditorInput());
+ }
+ /**
+ * Tries to determine the locale of the {@code editor} using
+ * {@code localeProvider} extensions. Returns the default
+ * system locale if nothing found (never returns {@code null}).
+ */
+ public Locale getLocale(IEditorInput editorInput) {
if (editorInput instanceof IFileEditorInput) {
IProject project = ((IFileEditorInput)editorInput)
.getFile().getProject();
@@ -85,7 +92,7 @@
String[] natures = project.getDescription().getNatureIds();
for (String natureId : natures) {
for (ILocaleProvider provider : getProviders(natureId)) {
- Locale locale = provider.getLocale(editor);
+ Locale locale = provider.getLocale(editorInput);
if (locale != null) {
localeString = provider.getLocaleString();
return locale;
@@ -101,7 +108,7 @@
}
return Locale.getDefault();
- }
+ }
private void initNatureExtensionsMap() {
Map<String, ArrayList<IExtension>> natureExtensionsMap
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -537,7 +537,7 @@
* VpeController.
*/
if (visualEditor == null) {
- bundleMap.init(sourceEditor);
+ bundleMap.init(sourceEditor.getEditorInput());
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELSeverityPreferences.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELSeverityPreferences.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/preferences/ELSeverityPreferences.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -40,6 +40,8 @@
public static final String UNPAIRED_GETTER_OR_SETTER = INSTANCE.createSeverityOption("unpairedGetterOrSetter"); //$NON-NLS-1$
public static final String EL_SYNTAX_ERROR = INSTANCE.createSeverityOption("elSyntaxError"); //$NON-NLS-1$
+
+ public static final String NON_EXTERNALIZED_STRINGS = INSTANCE.createSeverityOption("nonExternalizedString"); //$NON-NLS-1$
/**
* @return the only instance of JSFSeverityPreferences
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -248,7 +248,7 @@
}
this.visualEditor = visualEditor;
visualEditor.setController(this);
- bundleMap.init(sourceEditor);
+ bundleMap.init(sourceEditor.getEditorInput());
pageContext = new VpePageContext(bundleMap, editPart);
domMapping = new VpeDomMapping(pageContext);
sourceBuilder = new VpeSourceDomBuilder(domMapping, this,
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2011-02-02 14:04:00 UTC (rev 28921)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaPreview.java 2011-02-02 14:15:42 UTC (rev 28922)
@@ -119,7 +119,7 @@
//TODO Max Areshkau logic error (we should first call buildDom and only then we can call rebuildDom)
public void buildDom() {
BundleMap bundle = new BundleMap();
- bundle.init(getSourceEditor());
+ bundle.init(getSourceEditor().getEditorInput());
//Fix for https://jira.jboss.org/jira/browse/JBIDE-5639 - mareshkau
// in preview should be closer to view in browser. So all
// bundles should be showed as messages, no as el.
13 years, 11 months
JBoss Tools SVN: r28921 - trunk/vpe/plugins/org.jboss.tools.vpe.html/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-02-02 09:04:00 -0500 (Wed, 02 Feb 2011)
New Revision: 28921
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
Log:
https://issues.jboss.org/browse/JBIDE-8220 , Style Formatting was added to vpe html templates.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2011-02-02 13:56:11 UTC (rev 28920)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2011-02-02 14:04:00 UTC (rev 28921)
@@ -59,6 +59,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -119,6 +122,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -205,6 +211,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -267,6 +276,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -412,6 +424,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style"/>
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -452,6 +467,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -508,6 +526,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -588,6 +609,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -658,6 +682,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -706,6 +733,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -770,6 +800,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -856,6 +889,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -920,6 +956,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -984,6 +1023,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1079,6 +1121,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1262,6 +1307,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1375,6 +1423,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1536,6 +1587,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1592,6 +1646,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1663,6 +1720,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1785,6 +1845,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1896,6 +1959,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:if>
@@ -1987,6 +2053,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -2087,6 +2156,9 @@
<vpe:format type="ForegroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
+ <vpe:format type="StyleFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
13 years, 11 months
JBoss Tools SVN: r28920 - trunk/esb/docs/esb_ref_guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-02-02 08:56:11 -0500 (Wed, 02 Feb 2011)
New Revision: 28920
Modified:
trunk/esb/docs/esb_ref_guide/en-US/tasks.xml
Log:
typo
Modified: trunk/esb/docs/esb_ref_guide/en-US/tasks.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en-US/tasks.xml 2011-02-02 13:52:52 UTC (rev 28919)
+++ trunk/esb/docs/esb_ref_guide/en-US/tasks.xml 2011-02-02 13:56:11 UTC (rev 28920)
@@ -94,7 +94,7 @@
</para>
<para> 2. Select a ESB runtime from the JBoss ESB runtime list predefined in the preferences. If you choose the first option, make sure that the project has the Target JBoss Runtime set and this runtime has a ESB runtime installed.
</para>
- <para>3. Choose ESB Config Vertion. From the version 3.1.0 JBoss ESB Tools supports three different jboss-esb.xsd versions: jbossesb-1.0.1.xsd, jbossesb-1.1.0.xsd and jbossesb-1.2.0.xsd.</para>
+ <para>3. Choose ESB Config Version. From the version 3.1.0 JBoss ESB Tools supports three different jboss-esb.xsd versions: jbossesb-1.0.1.xsd, jbossesb-1.1.0.xsd and jbossesb-1.2.0.xsd.</para>
<note>
<title>Note:</title>
<para>If you use ESB 4.7 you should select jbossesb-1.2.0.xsd.</para>
@@ -676,4 +676,4 @@
- </chapter>
\ No newline at end of file
+ </chapter>
13 years, 11 months
JBoss Tools SVN: r28919 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-02 08:52:52 -0500 (Wed, 02 Feb 2011)
New Revision: 28919
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java
Log:
JBIDE-8255
https://issues.jboss.org/browse/JBIDE-8255
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java 2011-02-02 13:45:34 UTC (rev 28918)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java 2011-02-02 13:52:52 UTC (rev 28919)
@@ -3,7 +3,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.cdi.ui.wizard.NewBeanCreationWizard;
import org.jboss.tools.cdi.ui.wizard.NewDecoratorCreationWizard;
+import org.jboss.tools.cdi.ui.wizard.NewInterceptorCreationWizard;
+import org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard;
import org.jboss.tools.cdi.xml.ui.editor.form.CDINewClassWizardFactory;
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.model.XModelObject;
@@ -26,11 +29,28 @@
XModelObject decorators = o.getChildByPath("Decorators");
XModelObject decorator = decorators.getChildByPath("com.acme.NonExistantDecoratorClass");
assertNotNull(decorator);
- XAttribute a = decorator.getModelEntity().getAttribute("class");
- assertNotNull(a);
- INewClassWizard wizard = factory.createWizard(decorators, a);
+ XAttribute clsAttr = decorator.getModelEntity().getAttribute("class");
+ assertNotNull(clsAttr);
+ INewClassWizard wizard = factory.createWizard(decorators, clsAttr);
assertTrue(wizard instanceof NewDecoratorCreationWizard);
+
+ XModelObject alternatives = o.getChildByPath("Alternatives");
+ XModelObject stereotype = alternatives.getChildByPath("org.jboss.jsr299.tck.tests.policy.broken.not.policy.stereotype.Mock");
+ assertNotNull(stereotype);
+ XAttribute stereotypeAttr = stereotype.getModelEntity().getAttribute("stereotype");
+ assertNotNull(stereotypeAttr);
+ wizard = factory.createWizard(alternatives, stereotypeAttr);
+ assertTrue(wizard instanceof NewStereotypeCreationWizard);
+ wizard = factory.createWizard(alternatives, clsAttr);
+ assertTrue(wizard instanceof NewBeanCreationWizard);
+ XModelObject interceptors = o.getChildByPath("Interceptors");
+ XModelObject interceptor = interceptors.getChildByPath("com.acme.Foo");
+ assertNotNull(interceptor);
+ wizard = factory.createWizard(interceptors, clsAttr);
+ assertTrue(wizard instanceof NewInterceptorCreationWizard);
+ wizard = factory.createWizard(interceptor, clsAttr);
+ assertTrue(wizard instanceof NewInterceptorCreationWizard);
}
}
13 years, 11 months
JBoss Tools SVN: r28918 - branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-02-02 08:45:34 -0500 (Wed, 02 Feb 2011)
New Revision: 28918
Modified:
branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
Log:
https://issues.jboss.org/browse/JBIDE-8235
The launch didn't appear in the menu like previously executed.
Modified: branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2011-02-02 13:03:34 UTC (rev 28917)
+++ branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2011-02-02 13:45:34 UTC (rev 28918)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * Copyright 2005-2011, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -198,15 +198,13 @@
lcwc.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, "org.eclipse.ant.ui.remoteAntProcessFactory"); //$NON-NLS-1$
// refresh whole workspace
//lcwc.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, RefreshUtil.MEMENTO_WORKSPACE);
- return lcwc;
+
+ // https://issues.jboss.org/browse/JBIDE-8235
+ throw new IllegalStateException("'Run in External Process' is not fully implemented. Please do not use it"); //$NON-NLS-1$
+ //1. return lcwc(); - this doesn't print output to console
+ //2. return lcwc.doSave();- This works, but we don't want these temp attributes to be saved
}
- public ILaunch getLaunch(ILaunchConfiguration configuration, String mode)
- throws CoreException {
- configuration = updateLaunchConfig(configuration);
- return super.getLaunch(configuration, mode);
- }
-
public void launch(ILaunchConfiguration configuration, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
Assert.isNotNull(configuration);
13 years, 11 months
JBoss Tools SVN: r28917 - in trunk/cdi/tests/org.jboss.tools.cdi.ui.test: src/org/jboss/tools/cdi/ui/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-02 08:03:34 -0500 (Wed, 02 Feb 2011)
New Revision: 28917
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
JBIDE-8255
https://issues.jboss.org/browse/JBIDE-8255
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-02-02 12:43:24 UTC (rev 28916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2011-02-02 13:03:34 UTC (rev 28917)
@@ -10,6 +10,9 @@
org.jboss.tools.cdi.core.test,
org.jboss.tools.cdi.core,
org.jboss.tools.cdi.ui,
+ org.jboss.tools.cdi.xml.ui,
+ org.jboss.tools.common.model,
+ org.jboss.tools.common.model.ui,
org.eclipse.core.resources,
org.jboss.tools.common,
org.eclipse.core.runtime,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-02-02 12:43:24 UTC (rev 28916)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2011-02-02 13:03:34 UTC (rev 28917)
@@ -13,6 +13,7 @@
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.jboss.tools.cdi.ui.test.marker.CDIMarkerResolutionTest;
import org.jboss.tools.cdi.ui.test.preferences.CDIPreferencePageTest;
+import org.jboss.tools.cdi.ui.test.wizard.NewCDIClassWizardFactoryTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
import junit.framework.Test;
@@ -32,6 +33,7 @@
suite.addTestSuite(CATest.class);
suite.addTestSuite(NewCDIWizardTest.class);
suite.addTestSuite(CDIPreferencePageTest.class);
+ suite.addTestSuite(NewCDIClassWizardFactoryTest.class);
return suite;
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java 2011-02-02 13:03:34 UTC (rev 28917)
@@ -0,0 +1,36 @@
+package org.jboss.tools.cdi.ui.test.wizard;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.cdi.ui.wizard.NewDecoratorCreationWizard;
+import org.jboss.tools.cdi.xml.ui.editor.form.CDINewClassWizardFactory;
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.wizards.INewClassWizard;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+
+import junit.framework.TestCase;
+
+public class NewCDIClassWizardFactoryTest extends TestCase {
+ IProject tck;
+
+ public void testClassWizardFactory() throws Exception {
+ tck = ResourcesPlugin.getWorkspace().getRoot().getProject("tck");
+ IFile file = tck.getFile("WebContent/WEB-INF/beans.xml");
+ assertNotNull(file);
+ CDINewClassWizardFactory factory = new CDINewClassWizardFactory();
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ assertNotNull(o);
+
+ XModelObject decorators = o.getChildByPath("Decorators");
+ XModelObject decorator = decorators.getChildByPath("com.acme.NonExistantDecoratorClass");
+ assertNotNull(decorator);
+ XAttribute a = decorator.getModelEntity().getAttribute("class");
+ assertNotNull(a);
+ INewClassWizard wizard = factory.createWizard(decorators, a);
+ assertTrue(wizard instanceof NewDecoratorCreationWizard);
+
+
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/wizard/NewCDIClassWizardFactoryTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 11 months