JBoss Tools SVN: r22634 - branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-06-08 09:54:06 -0400 (Tue, 08 Jun 2010)
New Revision: 22634
Modified:
branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePersistenceXmlUiFactory.java
Log:
https://jira.jboss.org/browse/JBIDE-6420
Modified: branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePersistenceXmlUiFactory.java
===================================================================
--- branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePersistenceXmlUiFactory.java 2010-06-08 13:51:58 UTC (rev 22633)
+++ branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePersistenceXmlUiFactory.java 2010-06-08 13:54:06 UTC (rev 22634)
@@ -34,7 +34,6 @@
public class HibernatePersistenceXmlUiFactory implements
PersistenceXmlUiFactory {
- @Override
public ListIterator<JpaPageComposite> createPersistenceUnitComposites(
PropertyValueModel<PersistenceUnit> subjectHolder,
Composite parent, WidgetFactory widgetFactory) {
14 years, 7 months
JBoss Tools SVN: r22633 - branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-06-08 09:51:58 -0400 (Tue, 08 Jun 2010)
New Revision: 22633
Modified:
branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
Log:
https://jira.jboss.org/browse/JBIDE-6420
Modified: branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java
===================================================================
--- branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2010-06-08 13:51:12 UTC (rev 22632)
+++ branches/3.2.helios/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/persistence/details/HibernatePropertiesComposite.java 2010-06-08 13:51:58 UTC (rev 22633)
@@ -387,7 +387,6 @@
return Messages.HibernatePropertiesComposite_hibernate;
}
- @Override
public ImageDescriptor getPageImageDescriptor() {
// TODO hibernate tab in persistence.xml image
return null;
14 years, 7 months
JBoss Tools SVN: r22632 - trunk/xulrunner/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-08 09:51:12 -0400 (Tue, 08 Jun 2010)
New Revision: 22632
Added:
trunk/xulrunner/site/site.xml
Log:
add site.xml
Added: trunk/xulrunner/site/site.xml
===================================================================
--- trunk/xulrunner/site/site.xml (rev 0)
+++ trunk/xulrunner/site/site.xml 2010-06-08 13:51:12 UTC (rev 22632)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools xulrunner Nightly Build Update Site -->
+ <category-def label="JBoss Tools xulrunner Nightly Build Update Site" name="JBoss Tools xulrunner Nightly Build Update Site">
+ <description>JBoss Tools xulrunner Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.mozilla.xpcom.feature_0.0.0.jar" id="org.mozilla.xpcom.feature" version="0.0.0">
+ <category name="JBoss Tools xulrunner Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
+ <category name="JBoss Tools xulrunner Nightly Build Update Site"/>
+ </feature>
+
+</site>
14 years, 7 months
JBoss Tools SVN: r22631 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: src/org/jboss/tools/cdi/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-08 09:43:24 -0400 (Tue, 08 Jun 2010)
New Revision: 22631
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationCreationWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationWizardPage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeCreationWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierCreationWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierWizardPage.java
Log:
https://jira.jboss.org/browse/JBIDE-6414
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-06-08 13:42:24 UTC (rev 22630)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2010-06-08 13:43:24 UTC (rev 22631)
@@ -131,6 +131,18 @@
Create a Qualifier Java File
</description>
</wizard>
+
+ <wizard
+ category="org.jboss.tools.cdi.ui"
+ class="org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard"
+ icon="icons/cdi16.png"
+ id="org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard"
+ name="Stereotype Annotation Type"
+ project="false">
+ <description>
+ Create a Stereotype Java File
+ </description>
+ </wizard>
</extension>
</plugin>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-06-08 13:42:24 UTC (rev 22630)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -27,4 +27,10 @@
public static String CDI_REFACTOR_CONTRIBUTOR_ERROR;
public static String CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME;
public static String RENAME_NAMED_BEAN_WIZARD_FIELD_NAME;
+
+ public static String NEW_QUALIFIER_WIZARD_TITLE;
+ public static String NEW_QUALIFIER_WIZARD_PAGE_NAME;
+ public static String NEW_STEREOTYPE_WIZARD_TITLE;
+ public static String NEW_STEREOTYPE_WIZARD_PAGE_NAME;
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-06-08 13:42:24 UTC (rev 22630)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2010-06-08 13:43:24 UTC (rev 22631)
@@ -15,4 +15,9 @@
CDI_REFACTOR_CONTRIBUTOR_MENU_NAME=CDI Refactor
CDI_REFACTOR_CONTRIBUTOR_ERROR=Error
CDI_REFACTOR_CONTRIBUTOR_RENAME_NAMED_BEAN_ACTION_NAME=Rename ''{0}'' Named Bean
-RENAME_NAMED_BEAN_WIZARD_FIELD_NAME=@Named Bean Name
\ No newline at end of file
+RENAME_NAMED_BEAN_WIZARD_FIELD_NAME=@Named Bean Name
+
+NEW_QUALIFIER_WIZARD_TITLE=New Qualifier
+NEW_QUALIFIER_WIZARD_PAGE_NAME=Qualifier Annotation Type
+NEW_STEREOTYPE_WIZARD_TITLE=New Stereotype
+NEW_STEREOTYPE_WIZARD_PAGE_NAME=Stereotype Annotation Type
\ No newline at end of file
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationCreationWizard.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationCreationWizard.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.wizard;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
+import org.eclipse.jdt.ui.wizards.NewAnnotationWizardPage;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public abstract class NewCDIAnnotationCreationWizard extends NewElementWizard {
+ protected NewAnnotationWizardPage fPage;
+ protected boolean fOpenEditorOnFinish = true;
+
+ public NewCDIAnnotationCreationWizard() {}
+
+ public void addPages() {
+ super.addPages();
+ if (fPage == null) {
+ fPage = createAnnotationWizardPage();
+ fPage.init(getSelection());
+ }
+ addPage(fPage);
+
+ }
+
+ protected abstract NewAnnotationWizardPage createAnnotationWizardPage();
+
+ protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
+ fPage.createType(monitor); // use the full progress monitor
+ }
+
+ public IJavaElement getCreatedElement() {
+ return fPage.getCreatedType();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.IWizard#performFinish()
+ */
+ public boolean performFinish() {
+ warnAboutTypeCommentDeprecation();
+ boolean res= super.performFinish();
+ if (res) {
+ IResource resource= fPage.getModifiedResource();
+ if (resource != null) {
+ selectAndReveal(resource);
+ if (fOpenEditorOnFinish) {
+ openResource((IFile) resource);
+ }
+ }
+ }
+ return res;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationCreationWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationWizardPage.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationWizardPage.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.wizard;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.ui.wizards.NewAnnotationWizardPage;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.ui.widget.editor.CheckBoxFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.IFieldEditorFactory;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
+import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public abstract class NewCDIAnnotationWizardPage extends NewAnnotationWizardPage {
+ protected CheckBoxEditorWrapper inherited = null;
+
+ protected IFieldEditor target = null;
+
+ protected void createTypeMembers(IType newType, final ImportsManager imports, IProgressMonitor monitor) throws CoreException {
+ ISourceRange range = newType.getSourceRange();
+ IBuffer buf = newType.getCompilationUnit().getBuffer();
+ String lineDelimiter = StubUtility.getLineDelimiterUsed(newType.getJavaProject());
+ StringBuffer sb = new StringBuffer();
+ addAnnotations(imports, sb, lineDelimiter);
+ buf.replace(range.getOffset(), 0, sb.toString());
+ }
+
+ protected abstract void addAnnotations(ImportsManager imports, StringBuffer sb, String lineDelimiter);
+
+ protected void addTargetAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter, String[] targets) {
+ imports.addImport("java.lang.annotation.Target");
+ StringBuffer list = new StringBuffer();
+ for (int i = 0; i < targets.length; i++) {
+ imports.addImport("static java.lang.annotation.ElementType." + targets[i]);
+ if(i > 0) list.append(", ");
+ list.append(targets[i]);
+ }
+ sb.append("@Target( {" + list.toString() + "} )").append(lineDelimiter);
+ }
+
+ protected void addInheritedAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ if(inherited != null && inherited.composite.getValue() == Boolean.TRUE) {
+ imports.addImport("java.lang.annotation.Inherited");
+ sb.append("@Inherited").append(lineDelimiter);
+ }
+ }
+
+ protected void addRetentionAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ imports.addImport("java.lang.annotation.Retention");
+ imports.addImport("static java.lang.annotation.RetentionPolicy.RUNTIME");
+ sb.append("@Retention(RUNTIME)").append(lineDelimiter);
+ }
+
+ protected void addDocumentedAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ imports.addImport("java.lang.annotation.Documented");
+ sb.append("@Documented").append(lineDelimiter);
+ }
+
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+
+ Composite composite= new Composite(parent, SWT.NONE);
+
+ int nColumns= 4;
+
+ GridLayout layout= new GridLayout();
+ layout.numColumns= nColumns;
+ composite.setLayout(layout);
+
+ createContainerControls(composite, nColumns);
+ createPackageControls(composite, nColumns);
+// createEnclosingTypeControls(composite, nColumns);
+
+ createSeparator(composite, nColumns);
+
+ createTypeNameControls(composite, nColumns);
+// createModifierControls(composite, nColumns);
+
+ createCommentControls(composite, nColumns);
+ enableCommentControl(true);
+
+ createCustomFields(composite);
+
+ setControl(composite);
+
+ Dialog.applyDialogFont(composite);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_ANNOTATION_WIZARD_PAGE);
+ }
+
+ protected abstract void createCustomFields(Composite composite);
+
+ protected static class CheckBoxEditorWrapper {
+ protected IFieldEditor composite = null;
+ protected CheckBoxFieldEditor checkBox = null;
+ }
+
+ protected CheckBoxEditorWrapper createCheckBoxField(Composite composite, String name, String label, boolean defaultValue) {
+ CheckBoxEditorWrapper wrapper = new CheckBoxEditorWrapper();
+ wrapper.checkBox = new CheckBoxFieldEditor(name,label,Boolean.valueOf(defaultValue));
+ wrapper.composite = new CompositeEditor(name,label, defaultValue);
+ CompositeEditor editor = new CompositeEditor(name,label, defaultValue);
+ editor.addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,""), wrapper.checkBox});
+ wrapper.composite = editor;
+ wrapper.composite.doFillIntoGrid(composite);
+ ((Button)wrapper.checkBox.getCheckBoxControl()).setText(label);
+ return wrapper;
+ }
+
+ protected void createInheritedField(Composite composite, boolean defaultValue) {
+ String label = "Add @Inherited";
+ inherited = createCheckBoxField(composite, "isInherited", label, defaultValue);
+ }
+
+ protected void createTargetField(Composite composite, List<String> values) {
+ target = createComboField("Target", "Target", composite, values);
+ }
+
+ protected ITaggedFieldEditor createComboField(String name, String label, Composite composite, List<String> values) {
+ ITaggedFieldEditor result = IFieldEditorFactory.INSTANCE.createComboEditor(name, label, values, values.get(0));
+ ((CompositeEditor)result).addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name, "")});
+ result.doFillIntoGrid(composite);
+ Combo combo = (Combo)result.getEditorControls()[1];
+ Object layoutData = combo.getLayoutData();
+ if(layoutData instanceof GridData) {
+ ((GridData)layoutData).horizontalAlignment = GridData.FILL;
+ }
+ return result;
+ }
+
+ protected String[] getTargets() {
+ if(target == null) {
+ return new String[]{"TYPE", "METHOD", "PARAMETER", "FIELD"};
+ }
+ String value = (String)target.getValue();
+ String[] vs = value.split(",");
+ for (int i = 0; i < vs.length; i++) vs[i] = vs[i].trim();
+ return vs;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewCDIAnnotationWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierCreationWizard.java 2010-06-08 13:42:24 UTC (rev 22630)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierCreationWizard.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -1,54 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.cdi.ui.wizard;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.internal.ui.wizards.NewElementWizard;
import org.eclipse.jdt.ui.wizards.NewAnnotationWizardPage;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
-public class NewQualifierCreationWizard extends NewElementWizard {
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class NewQualifierCreationWizard extends NewCDIAnnotationCreationWizard {
- private NewAnnotationWizardPage fPage;
- private boolean fOpenEditorOnFinish = true;
+ public NewQualifierCreationWizard() {
+ setWindowTitle(CDIUIMessages.NEW_QUALIFIER_WIZARD_TITLE);
+ }
- public NewQualifierCreationWizard() {}
-
- public void addPages() {
- super.addPages();
- if (fPage == null) {
- fPage= new NewQualifierWizardPage();
- fPage.init(getSelection());
- }
- addPage(fPage);
-
+ protected NewAnnotationWizardPage createAnnotationWizardPage() {
+ return new NewQualifierWizardPage();
}
- protected void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException {
- fPage.createType(monitor); // use the full progress monitor
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- warnAboutTypeCommentDeprecation();
- boolean res= super.performFinish();
- if (res) {
- IResource resource= fPage.getModifiedResource();
- if (resource != null) {
- selectAndReveal(resource);
- if (fOpenEditorOnFinish) {
- openResource((IFile) resource);
- }
- }
- }
- return res;
- }
-
- public IJavaElement getCreatedElement() {
- return fPage.getCreatedType();
- }
-
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierWizardPage.java 2010-06-08 13:42:24 UTC (rev 22630)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewQualifierWizardPage.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -1,108 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.cdi.ui.wizard;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IBuffer;
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.jdt.ui.wizards.NewAnnotationWizardPage;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
+import org.eclipse.jdt.ui.wizards.NewTypeWizardPage.ImportsManager;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.common.ui.widget.editor.CheckBoxFieldEditor;
-import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
-import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
-//import org.jboss.tools.common.ui.widget.editor.IFieldEditorFactory;
-import org.jboss.tools.common.ui.widget.editor.LabelFieldEditor;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
-public class NewQualifierWizardPage extends NewAnnotationWizardPage {
- IFieldEditor inherited = null;
- CheckBoxFieldEditor cbInherited = null;
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class NewQualifierWizardPage extends NewCDIAnnotationWizardPage {
- protected void createTypeMembers(IType newType, final ImportsManager imports, IProgressMonitor monitor) throws CoreException {
- ISourceRange range = newType.getSourceRange();
- IBuffer buf = newType.getCompilationUnit().getBuffer();
+ public NewQualifierWizardPage() {
+ setTitle(CDIUIMessages.NEW_QUALIFIER_WIZARD_PAGE_NAME);
+ }
- StringBuffer sb = new StringBuffer();
+ protected void addAnnotations(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ addInheritedAnnotation(imports, sb, lineDelimiter);
+ addTargetAnnotation(imports, sb, lineDelimiter, getTargets());
+ addRetentionAnnotation(imports, sb, lineDelimiter);
+ addDocumentedAnnotation(imports, sb, lineDelimiter);
+ addQualifierAnnotation(imports, sb, lineDelimiter);
+ }
- if(inherited != null && inherited.getValue() == Boolean.TRUE) {
- imports.addImport("java.lang.annotation.Inherited");
- sb.append("@Inherited").append("\n");
- }
-
- imports.addImport("java.lang.annotation.Target");
- imports.addImport("static java.lang.annotation.ElementType.TYPE");
- imports.addImport("static java.lang.annotation.ElementType.METHOD");
- imports.addImport("static java.lang.annotation.ElementType.PARAMETER");
- imports.addImport("static java.lang.annotation.ElementType.FIELD");
- sb.append("@Target( {TYPE, METHOD, PARAMETER, FIELD} )").append("\n");
-
- imports.addImport("java.lang.annotation.Retention");
- imports.addImport("static java.lang.annotation.RetentionPolicy.RUNTIME");
- sb.append("@Retention(RUNTIME)").append("\n");
-
- imports.addImport("java.lang.annotation.Documented");
- sb.append("@Documented").append("\n");
-
+ protected void addQualifierAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
imports.addImport("javax.inject.Qualifier");
- sb.append("@Qualifier").append("\n");
-
- buf.replace(range.getOffset(), 0, sb.toString());
+ sb.append("@Qualifier").append(lineDelimiter);
}
- public void createControl(Composite parent) {
- super_createControl(parent);
+ @Override
+ protected void createCustomFields(Composite parent) {
+ createInheritedField(parent, false);
- Composite composite = (Composite)getControl();
-
- String label = "Add @Inherited";
-
- inherited = /*IFieldEditorFactory.INSTANCE.*/createCheckboxEditor("isInherited", label, false);
- inherited.doFillIntoGrid(composite);
-
- ((Button)cbInherited.getCheckBoxControl()).setText(label);
-
}
- void super_createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite composite= new Composite(parent, SWT.NONE);
-
- int nColumns= 4;
-
- GridLayout layout= new GridLayout();
- layout.numColumns= nColumns;
- composite.setLayout(layout);
-
- createContainerControls(composite, nColumns);
- createPackageControls(composite, nColumns);
-// createEnclosingTypeControls(composite, nColumns);
-
- createSeparator(composite, nColumns);
-
- createTypeNameControls(composite, nColumns);
-// createModifierControls(composite, nColumns);
-
- createCommentControls(composite, nColumns);
- enableCommentControl(true);
-
- setControl(composite);
-
- Dialog.applyDialogFont(composite);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_ANNOTATION_WIZARD_PAGE);
- }
-
- public IFieldEditor createCheckboxEditor(String name, String label,
- boolean defaultValue) {
- cbInherited = new CheckBoxFieldEditor(name,label,Boolean.valueOf(defaultValue));
- CompositeEditor editor = new CompositeEditor(name,label, defaultValue);
- editor.addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,""), cbInherited,});
- return editor;
- }
-
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeCreationWizard.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeCreationWizard.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.wizard;
+
+import org.eclipse.jdt.ui.wizards.NewAnnotationWizardPage;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class NewStereotypeCreationWizard extends NewCDIAnnotationCreationWizard {
+
+ public NewStereotypeCreationWizard() {
+ setWindowTitle(CDIUIMessages.NEW_STEREOTYPE_WIZARD_TITLE);
+ }
+
+ protected NewAnnotationWizardPage createAnnotationWizardPage() {
+ return new NewStereotypeWizardPage();
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeCreationWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java 2010-06-08 13:43:24 UTC (rev 22631)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.common.ui.widget.editor.ITaggedFieldEditor;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class NewStereotypeWizardPage extends NewCDIAnnotationWizardPage {
+ protected CheckBoxEditorWrapper alternative = null;
+ protected CheckBoxEditorWrapper named = null;
+ protected ITaggedFieldEditor scope = null;
+ protected Map<String, String> scopes = new TreeMap<String, String>();
+
+ public NewStereotypeWizardPage() {
+ setTitle(CDIUIMessages.NEW_STEREOTYPE_WIZARD_PAGE_NAME);
+ }
+
+ protected void addAnnotations(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ addInheritedAnnotation(imports, sb, lineDelimiter);
+ addAlternativeAnnotation(imports, sb, lineDelimiter);
+ addScopeAnnotation(imports, sb, lineDelimiter);
+ addNamedAnnotation(imports, sb, lineDelimiter);
+ addStereotypeAnnotation(imports, sb, lineDelimiter);
+ addTargetAnnotation(imports, sb, lineDelimiter, getTargets());
+ addRetentionAnnotation(imports, sb, lineDelimiter);
+ addDocumentedAnnotation(imports, sb, lineDelimiter);
+ }
+
+ protected void addStereotypeAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ imports.addImport("javax.enterprise.inject.Stereotype");
+ sb.append("@Stereotype").append(lineDelimiter);
+ }
+
+ protected void addAlternativeAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ if(alternative != null && alternative.composite.getValue() == Boolean.TRUE) {
+ imports.addImport(CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME);
+ sb.append("@Alternative").append(lineDelimiter);
+ }
+ }
+
+ protected void addNamedAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ if(named != null && named.composite.getValue() == Boolean.TRUE) {
+ imports.addImport(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
+ sb.append("@Named").append(lineDelimiter);
+ }
+ }
+
+ protected void addScopeAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter) {
+ if(scope != null && scope.getValue() != null && scope.getValue().toString().length() > 0) {
+ String scopeName = scope.getValue().toString();
+ String qScopeName = scopes.get(scopeName);
+ imports.addImport(qScopeName);
+ sb.append(scopeName).append(lineDelimiter);
+ }
+ }
+
+ @Override
+ protected void createCustomFields(Composite composite) {
+ createInheritedField(composite, false);
+ createAlternativeField(composite);
+ createScopeField(composite);
+ createTargetField(composite);
+ }
+
+ protected void createAlternativeField(Composite composite) {
+ String label = "Add @Alternative";
+ alternative = createCheckBoxField(composite, "isAlternative", label, false);
+ }
+
+ protected void createNamedField(Composite composite) {
+ String label = "Add @Named";
+ named = createCheckBoxField(composite, "isNamed", label, false);
+ }
+
+ protected void createScopeField(Composite composite) {
+ List<String> vs = new ArrayList<String>();
+ vs.add("");
+ scope = createComboField("Scope", "Scope", composite, vs);
+ setScopes(getPackageFragmentRoot());
+ }
+
+ protected void createTargetField(Composite composite) {
+ List<String> targetOptions = new ArrayList<String>();
+ targetOptions.add("TYPE,METHOD,FIELD");
+ targetOptions.add("METHOD,FIELD");
+ targetOptions.add("TYPE");
+ targetOptions.add("METHOD");
+ targetOptions.add("FIELD");
+ createTargetField(composite, targetOptions);
+ }
+
+ public void setPackageFragmentRoot(IPackageFragmentRoot root, boolean canBeModified) {
+ super.setPackageFragmentRoot(root, canBeModified);
+ setScopes(root);
+ }
+
+ void setScopes(IPackageFragmentRoot root) {
+ if(root != null) {
+ IJavaProject jp = root.getJavaProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(jp.getProject(), true);
+ if(cdi != null) {
+ Set<String> scopes = cdi.getScopeNames();
+ String[] tags = scopes.toArray(new String[0]);
+ setScopes(tags);
+ } else {
+ setScopes(new String[]{""});
+ }
+ } else {
+ setScopes(new String[]{""});
+ }
+ }
+
+ void setScopes(String[] tags) {
+ scopes.clear();
+ scopes.put("", "");
+ for (String tag: tags) {
+ if(tag.length() == 0) continue;
+ int i = tag.lastIndexOf('.');
+ String name = "@" + tag.substring(i + 1);
+ scopes.put(name, tag);
+ }
+ if(scope != null) {
+ scope.setTags(scopes.keySet().toArray(new String[0]));
+ scope.setValue("");
+ }
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewStereotypeWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r22630 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-06-08 09:42:24 -0400 (Tue, 08 Jun 2010)
New Revision: 22630
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
https://jira.jboss.org/browse/JBIDE-6414
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-06-08 13:02:06 UTC (rev 22629)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-06-08 13:42:24 UTC (rev 22630)
@@ -219,6 +219,13 @@
IQualifier getQualifier(IPath path);
/**
+ * Returns names of all available scope annotations
+ *
+ * @return names of all available scope annotations
+ */
+ Set<String> getScopeNames();
+
+ /**
* Returns scope model element for fully qualified name of scope annotation
* type
*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-06-08 13:02:06 UTC (rev 22629)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-06-08 13:42:24 UTC (rev 22630)
@@ -707,6 +707,12 @@
return qualifiersByPath.get(path);
}
+ public Set<String> getScopeNames() {
+ Set<String> result = new HashSet<String>();
+ result.addAll(scopes.keySet());
+ return result;
+ }
+
public ScopeElement getScope(String qualifiedName) {
return scopes.get(qualifiedName);
}
14 years, 7 months
JBoss Tools SVN: r22629 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-06-08 09:02:06 -0400 (Tue, 08 Jun 2010)
New Revision: 22629
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
Log:
https://jira.jboss.org/browse/JBIDE-5805
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2010-06-08 12:41:30 UTC (rev 22628)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2010-06-08 13:02:06 UTC (rev 22629)
@@ -28,10 +28,14 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
import org.eclipse.jface.text.ITextListener;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
+import org.eclipse.jface.text.source.ICharacterPairMatcher;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.projection.ProjectionSupport;
@@ -51,6 +55,7 @@
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.hibernate.Session;
@@ -59,8 +64,8 @@
import org.hibernate.console.QueryPage;
import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.eclipse.console.AbstractQueryEditor;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.views.IQueryParametersPage;
import org.hibernate.eclipse.console.views.QueryPageTabView;
import org.hibernate.eclipse.console.views.QueryParametersPage;
@@ -213,7 +218,8 @@
protected ISourceViewer createSourceViewer( Composite parent, IVerticalRuler ruler, int styles ) {
HQLSourceViewer viewer = new HQLSourceViewer( parent, ruler, getOverviewRuler(), isOverviewRulerVisible(),
styles );
-
+ // ensure decoration support has been created and configured.
+ getSourceViewerDecorationSupport(viewer);
return viewer;
}
@@ -377,13 +383,33 @@
*
* @see org.eclipse.ui.editors.text.TextEditor#initializeEditor()
*/
- protected void initializeEditor() {
- super.initializeEditor();
- setSourceViewerConfiguration( createSourceViewerConfiguration() );
- setRangeIndicator( new DefaultRangeIndicator() );
- }
+ protected void initializeEditor() {
+ super.initializeEditor();
+ setSourceViewerConfiguration( createSourceViewerConfiguration() );
+ setRangeIndicator( new DefaultRangeIndicator() );
+ }
+ public final static String HQL_EDITOR_MATCHING_BRACKETS = "matchingBrackets"; //$NON-NLS-1$
+ public final static String HQL_EDITOR_MATCHING_BRACKETS_COLOR = "matchingBracketsColor"; //$NON-NLS-1$
+ @Override
+ protected void configureSourceViewerDecorationSupport(
+ SourceViewerDecorationSupport support) {
+ super.configureSourceViewerDecorationSupport(support);
+
+ char[] matchChars = {'(', ')', '[', ']', '{', '}'}; //which brackets to match
+ ICharacterPairMatcher matcher = new DefaultCharacterPairMatcher(matchChars ,
+ IDocumentExtension3.DEFAULT_PARTITIONING);
+ support.setCharacterPairMatcher(matcher);
+ support.setMatchingCharacterPainterPreferenceKeys(HQL_EDITOR_MATCHING_BRACKETS,HQL_EDITOR_MATCHING_BRACKETS_COLOR);
+
+ //Enable bracket highlighting in the preference store
+ IPreferenceStore store = getPreferenceStore();
+ store.setDefault(HQL_EDITOR_MATCHING_BRACKETS, true);
+ store.setDefault(HQL_EDITOR_MATCHING_BRACKETS_COLOR, "128,128,128"); //$NON-NLS-1$
+ }
+
+
/**
* Sets the document setup participant object associated with this editor to
* the given object. The setup participant sets the partitioning type for
14 years, 7 months
JBoss Tools SVN: r22628 - workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xulrunner.win32.win32.x86/META-INF.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-08 08:41:30 -0400 (Tue, 08 Jun 2010)
New Revision: 22628
Modified:
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xulrunner.win32.win32.x86/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/browse/JBIDE-6429, version for windows
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xulrunner.win32.win32.x86/META-INF/MANIFEST.MF
===================================================================
--- workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xulrunner.win32.win32.x86/META-INF/MANIFEST.MF 2010-06-08 12:39:38 UTC (rev 22627)
+++ workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xulrunner.win32.win32.x86/META-INF/MANIFEST.MF 2010-06-08 12:41:30 UTC (rev 22628)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Mozilla Xulrunner
Bundle-SymbolicName: org.mozilla.xulrunner.win32.win32.x86;singleton:=true
-Bundle-Version: 1.9.1.2
+Bundle-Version: 1.9.2
Bundle-Vendor: mozilla.org
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
14 years, 7 months
JBoss Tools SVN: r22626 - branches/3.2.helios/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-08 08:17:00 -0400 (Tue, 08 Jun 2010)
New Revision: 22626
Modified:
branches/3.2.helios/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-6429
Modified: branches/3.2.helios/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeUtils.java
===================================================================
--- branches/3.2.helios/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeUtils.java 2010-06-08 11:47:56 UTC (rev 22625)
+++ branches/3.2.helios/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeUtils.java 2010-06-08 12:17:00 UTC (rev 22626)
@@ -13,10 +13,7 @@
import org.eclipse.swt.graphics.Rectangle;
import org.jboss.tools.vpe.xulrunner.BrowserPlugin;
-import org.mozilla.interfaces.nsIBoxObject;
-import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNSDocument;
import org.mozilla.interfaces.nsIDOMNSElement;
import org.mozilla.interfaces.nsIDOMNSHTMLElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -72,15 +69,14 @@
.queryInterface(nsIDOMNSElement.NS_IDOMNSELEMENT_IID);
nsIDOMNSHTMLElement domNSHTMLElement = (nsIDOMNSHTMLElement) domNode
.queryInterface(nsIDOMNSHTMLElement.NS_IDOMNSHTMLELEMENT_IID);
- nsIDOMDocument document = domElement.getOwnerDocument();
-
- nsIDOMNSDocument nsDocument = (nsIDOMNSDocument) document
- .queryInterface(nsIDOMNSDocument.NS_IDOMNSDOCUMENT_IID);
- nsIBoxObject boxObject = nsDocument.getBoxObjectFor(domElement);
+// nsIDOMDocument document = domElement.getOwnerDocument();
+// nsIDOMNSDocument nsDocument = (nsIDOMNSDocument) document
+// .queryInterface(nsIDOMNSDocument.NS_IDOMNSDOCUMENT_IID);
+// nsIBoxObject boxObject = nsDocument.getBoxObjectFor(domElement);
Rectangle rectangle = new Rectangle(findPosX(domNSHTMLElement),
findPosY(domNSHTMLElement),
- boxObject.getWidth(),
- boxObject.getHeight());
+ htmlElement.getClientWidth(),
+ htmlElement.getClientHeight());
if (BrowserPlugin.PRINT_ELEMENT_BOUNDS) {
System.out.println("getElementBounds(IDOMNode) returns "
@@ -97,10 +93,6 @@
htmlElement.getClientTop(), htmlElement
.getClientWidth(), htmlElement
.getClientHeight()));
- System.out.println("nsIBoxObject getX,getY,getWidth,getHeight"
- + new Rectangle(boxObject.getX(), boxObject.getY(),
- boxObject.getWidth(), boxObject.getHeight()));
-
}
return rectangle;
14 years, 7 months
JBoss Tools SVN: r22625 - in trunk: seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-08 07:47:56 -0400 (Tue, 08 Jun 2010)
New Revision: 22625
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
Log:
JBIDE-6345 - two small changes to facets, use constants in test cases
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2010-06-08 11:29:46 UTC (rev 22624)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2010-06-08 11:47:56 UTC (rev 22625)
@@ -25,6 +25,7 @@
org.eclipse.jst.j2ee,
org.eclipse.text,
org.eclipse.jdt.core.manipulation,
- org.jboss.tools.common.el.core
+ org.jboss.tools.common.el.core,
+ org.eclipse.jst.common.project.facet.core;bundle-version="1.4.1"
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-06-08 11:29:46 UTC (rev 22624)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-06-08 11:47:56 UTC (rev 22625)
@@ -4,9 +4,7 @@
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import junit.framework.TestCase;
@@ -19,6 +17,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -66,7 +65,7 @@
seamFacet = ProjectFacetsManager.getProjectFacet("jst.seam");
seamFacetVersion = seamFacet.getVersion("1.2");
- javaVersion = ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0");
+ javaVersion = JavaFacet.JAVA_50;
dynamicWebVersion = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
javaFacesVersion = ProjectFacetsManager.getProjectFacet("jst.jsf").getVersion("1.2");
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2010-06-08 11:29:46 UTC (rev 22624)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2010-06-08 11:47:56 UTC (rev 22625)
@@ -29,7 +29,8 @@
org.eclipse.jdt.core,
org.eclipse.ui.console,
org.eclipse.jface.text,
- org.jboss.ide.eclipse.as.classpath.core
+ org.jboss.ide.eclipse.as.classpath.core,
+ org.eclipse.jst.common.project.facet.core;bundle-version="1.4.1"
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: ws-core-test.jar
Export-Package: org.jboss.tools.ws.core.test,
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java 2010-06-08 11:29:46 UTC (rev 22624)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/project/facet/JBossWSProjectFacetTest.java 2010-06-08 11:47:56 UTC (rev 22625)
@@ -6,6 +6,7 @@
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -29,7 +30,7 @@
}
public void testWSFacet() throws CoreException{
- wsProj.installProjectFacet(ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0"), null, null);
+ wsProj.installProjectFacet(JavaFacet.JAVA_50, null, null);
wsProj.installProjectFacet(ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5"), null, null);
wsProj.installProjectFacet(wsVersion, null, null);
assertTrue(wsProj.hasProjectFacet(wsFacet));
14 years, 7 months
JBoss Tools SVN: r22623 - in branches/3.2.helios/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-08 06:48:22 -0400 (Tue, 08 Jun 2010)
New Revision: 22623
Modified:
branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java
Log:
JBIDE-6345 - initial fix
Modified: branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-06-08 04:38:22 UTC (rev 22622)
+++ branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-06-08 10:48:22 UTC (rev 22623)
@@ -28,6 +28,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jst.common.project.facet.core.IClasspathProvider;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
@@ -58,7 +59,7 @@
public List getClasspathEntries(final IProjectFacetVersion fv) {
IPath path = null;
- if( fv.getProjectFacet().getId().equals(ClasspathConstants.FACET_JST_JAVA) ) {
+ if( fv.getProjectFacet().equals(JavaFacet.FACET)) {
path = new Path(CONTAINER_ID);
path = path.append(rc.getProperty("id")); //$NON-NLS-1$
path = path.append(fv.getProjectFacet().getId());
Modified: branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
--- branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-06-08 04:38:22 UTC (rev 22622)
+++ branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-06-08 10:48:22 UTC (rev 22623)
@@ -25,6 +25,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jst.common.project.facet.core.JavaFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
@@ -48,7 +49,6 @@
public class WebtoolsProjectJBossClasspathContainerInitializer extends
ClasspathContainerInitializer implements ClasspathConstants {
- public static final IProjectFacet JST_JAVA_FACET = ProjectFacetsManager.getProjectFacet(FACET_JST_JAVA);
public static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet(FACET_WEB);
public static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(FACET_EJB);
public static final IProjectFacet EAR_FACET = ProjectFacetsManager.getProjectFacet(FACET_EAR);
@@ -141,7 +141,7 @@
protected IClasspathEntry[] loadClasspathEntries2(String runtimeId, String facetId,
String facetVersion, String serverHome, String configName, String jbVersion,
IJBossServerRuntime jbsRuntime) {
- if( facetId.equals(JST_JAVA_FACET.getId())) {
+ if( ProjectFacetsManager.getProjectFacet(facetId).equals(JavaFacet.FACET)) {
return loadJREClasspathEntries(jbsRuntime);
} else if(V5_0.equals(jbVersion)) {
return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
Modified: branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java
===================================================================
--- branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java 2010-06-08 04:38:22 UTC (rev 22622)
+++ branches/3.2.helios/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IWTPConstants.java 2010-06-08 10:48:22 UTC (rev 22623)
@@ -12,6 +12,7 @@
public interface IWTPConstants {
/* Facet / Module Names */
+ @Deprecated // DO NOT USE THIS
public static final String FACET_JST_JAVA = "jst.java"; //$NON-NLS-1$
public static final String FACET_WEB = "jst.web";//$NON-NLS-1$
public static final String FACET_EJB = "jst.ejb";//$NON-NLS-1$
14 years, 7 months