JBoss Tools SVN: r22406 - in trunk: vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-05-28 06:34:46 -0400 (Fri, 28 May 2010)
New Revision: 22406
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/properties.gif
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsDialog.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6287 , the draft version of the Externalize Strings Wizard was added.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2010-05-28 10:12:00 UTC (rev 22405)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/Constants.java 2010-05-28 10:34:46 UTC (rev 22406)
@@ -74,8 +74,10 @@
public static String COLON = ":"; //$NON-NLS-1$
public static String SEMICOLON = ";"; //$NON-NLS-1$
public static String COMMA = ","; //$NON-NLS-1$
+ public static String DOT = "."; //$NON-NLS-1$
public static String DASH = "-"; //$NON-NLS-1$
public static String SLASH = "/"; //$NON-NLS-1$
+ public static String EQUAL = "="; //$NON-NLS-1$
public static final String START_BRACKET = "("; //$NON-NLS-1$
public static final String END_BRACKET = ")"; //$NON-NLS-1$
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/properties.gif
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/resources/org/jboss/tools/vpe/editor/mozilla/icons/properties.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2010-05-28 10:12:00 UTC (rev 22405)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2010-05-28 10:34:46 UTC (rev 22406)
@@ -69,7 +69,7 @@
*/
private Locale locale;
private BundleEntry[] bundles = new BundleEntry[0];
- private Map<String,UsedKey> usedKeys = new HashMap<String,UsedKey>();
+ private Map<String,UsedKey> usedKeys = new HashMap<String,UsedKey>();
boolean showBundleUsageAsEL = JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL);
@@ -554,7 +554,11 @@
public String propertyName;
}
- static class BundleEntry {
+ /*
+ * https://jira.jboss.org/browse/JBIDE-6287
+ * It was required to get access to BundleEntry class.
+ */
+ public static class BundleEntry {
public ResourceBundle bundle;
public String uri;
public String prefix;
@@ -567,6 +571,13 @@
this.prefix = prefix;
this.hashCode = hashCode;
}
+
+ @Override
+ public String toString() {
+ return "BundleEntry [prefix=" + prefix + ", uri=" + uri + ", hashCode=" + hashCode //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + ", bundle="+ bundle +"]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
}
static class UsedKey {
@@ -604,5 +615,9 @@
public void setShowBundleUsageAsEL(boolean showBundleUsageAsEL) {
this.showBundleUsageAsEL = showBundleUsageAsEL;
}
+
+ public BundleEntry[] getBundles() {
+ return bundles;
+ }
}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsDialog.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/dialog/ExternalizeStringsDialog.java 2010-05-28 10:34:46 UTC (rev 22406)
@@ -0,0 +1,295 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.dialog;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.bundle.BundleMap;
+import org.jboss.tools.vpe.editor.bundle.BundleMap.BundleEntry;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.w3c.dom.Attr;
+
+public class ExternalizeStringsDialog extends TitleAreaDialog {
+
+ private final int DIALOG_WIDTH = 450;
+ private final int DIALOG_HEIGHT = 300;
+ private VpeController vpeController;
+ private Text textStringValue;
+ private Text propsKey;
+ private Text propsValue;
+ private Text propsFile;
+ private Combo rbCombo;
+ private BundleMap bm;
+
+ public ExternalizeStringsDialog(Shell parentShell,
+ VpeController vpeController) {
+ super(parentShell);
+ this.vpeController = vpeController;
+ this.bm = vpeController.getPageContext().getBundle();
+ setHelpAvailable(false);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ /*
+ * Setting dialog Title, Message, Image.
+ */
+ getShell().setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE);
+ setTitle(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TITLE);
+ setTitleImage(ModelUIImages.getImageDescriptor(
+ ModelUIImages.WIZARD_DEFAULT).createImage(null));
+ setMessage(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION);
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(1, false));
+
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.widthHint = DIALOG_WIDTH;
+ gd.heightHint = DIALOG_HEIGHT;
+ composite.setLayoutData(gd);
+
+ /*
+ * Create dialog area separator
+ */
+ Label dialogAreaSeparator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ dialogAreaSeparator.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+
+ /*
+ * Create properties string group
+ */
+ Group propsStringGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ propsStringGroup.setLayout(new GridLayout(3, false));
+ propsStringGroup.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
+ propsStringGroup.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP);
+
+ /*
+ * Create Text String label
+ */
+ Label textStringLabel = new Label(propsStringGroup, SWT.NONE);
+ textStringLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
+ textStringLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING);
+ /*
+ * Create Text String value
+ */
+ textStringValue = new Text(propsStringGroup, SWT.BORDER);
+ textStringValue.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
+ textStringValue.setText("Not initialized"); //$NON-NLS-1$
+ textStringValue.setEditable(false);
+
+ /*
+ * Create Properties Key label
+ */
+ Label propsKeyLabel = new Label(propsStringGroup, SWT.NONE);
+ propsKeyLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
+ propsKeyLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY);
+ /*
+ * Create Properties Key value
+ */
+ propsKey = new Text(propsStringGroup, SWT.BORDER);
+ propsKey.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
+ propsKey.setText("key"); //$NON-NLS-1$
+ /*
+ * Create Properties Value label
+ */
+ Label propsValueLabel = new Label(propsStringGroup, SWT.NONE);
+ propsValueLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
+ propsValueLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE);
+ /*
+ * Create Properties Value value
+ */
+ propsValue = new Text(propsStringGroup, SWT.BORDER);
+ propsValue.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
+ propsValue.setText("value"); //$NON-NLS-1$
+
+ /*
+ * Create properties string group
+ */
+ Group propsFilesGroup = new Group(composite, SWT.SHADOW_ETCHED_IN);
+ propsFilesGroup.setLayout(new GridLayout(3, false));
+ propsFilesGroup.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 1, 1));
+ propsFilesGroup.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP);
+
+ /*
+ * Create Resource Bundles List label
+ */
+ Label rbListLabel = new Label(propsFilesGroup, SWT.NONE);
+ rbListLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false, false, 1, 1));
+ rbListLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST);
+ /*
+ * Create Resource Bundles combobox
+ */
+ rbCombo = new Combo(propsFilesGroup, SWT.NONE);
+ rbCombo.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));
+// rbCombo.add(Constants.EMPTY);
+ rbCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IFile bundleFile = bm.getBundleFile(rbCombo.getText());
+ String bundlePath = Constants.EMPTY;
+ if (bundleFile != null) {
+ bundlePath = bundleFile.getFullPath().toString();
+ }
+ propsFile.setText(bundlePath);
+ }
+ });
+
+ /*
+ * Create Properties File label
+ */
+ Label propsFileLabel = new Label(propsFilesGroup, SWT.NONE);
+ propsFileLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.NONE, false,false, 1, 1));
+ propsFileLabel.setText(VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE);
+ /*
+ * Create Properties File path field
+ */
+ propsFile = new Text(propsFilesGroup, SWT.BORDER);
+ propsFile.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true,false, 2, 1));
+ propsFile.setText(Constants.EMPTY);
+ propsFile.setEditable(false);
+
+ /*
+ * Initialize all fields with real values.
+ */
+ initializeTextFields();
+
+ return composite;
+ }
+
+ private void initializeTextFields() {
+ ISelection sel = vpeController.getSourceEditor().getSelectionProvider()
+ .getSelection();
+ if ((textStringValue != null) && (propsKey != null)
+ && isSelectionCorrect(sel)) {
+ String stringToUpdate = Constants.EMPTY;
+ TextSelection textSelection = null;
+ String text = null;
+ IStructuredSelection structuredSelection = (IStructuredSelection) sel;
+ textSelection = (TextSelection) sel;
+ text = textSelection.getText();
+ Object selectedElement = structuredSelection.getFirstElement();
+ /*
+ * Parse selected element and find a string to replace
+ */
+ if (selectedElement instanceof org.w3c.dom.Text) {
+ org.w3c.dom.Text textNode = (org.w3c.dom.Text) selectedElement;
+ if ((textNode.getNodeValue().trim().length() > 0)
+ && (text.trim().length() > 0)) {
+ stringToUpdate = textNode.getNodeValue();
+ }
+ } else if (selectedElement instanceof Attr) {
+ Attr attrNode = (Attr) selectedElement;
+ if ((attrNode.getNodeValue().trim().length() > 0)
+ && (text.trim().length() > 0)) {
+ stringToUpdate = attrNode.getNodeValue();
+ }
+ } else {
+ VpePlugin.getDefault().logWarning(
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
+ }
+ /*
+ * Update text string field
+ */
+ textStringValue.setText(text);
+
+ /*
+ * Initialize bundle messages field
+ */
+ BundleEntry[] bundles = bm.getBundles();
+ Set<String> uriSet = new HashSet<String>();
+ for (BundleEntry bundleEntry : bundles) {
+ if (!uriSet.contains(bundleEntry.uri)) {
+ uriSet.add(bundleEntry.uri);
+ rbCombo.add(bundleEntry.uri);
+ }
+ }
+ } else {
+ VpePlugin.getDefault().logWarning(
+ VpeUIMessages.EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR);
+ }
+ }
+
+ @Override
+ protected void okPressed() {
+ StructuredTextEditor editor = vpeController.getSourceEditor();
+ IDocumentProvider prov = editor.getDocumentProvider();
+ IDocument doc = prov.getDocument(editor.getEditorInput());
+ ISelection sel = editor.getSelectionProvider().getSelection();
+ if (isSelectionCorrect(sel)) {
+ try {
+ /*
+ * Get source text and new text
+ */
+ final TextSelection textSel = (TextSelection) sel;
+ String newText = "\n" + propsKey.getText() + Constants.EQUAL + propsValue.getText() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Add "key=value" to the bundle
+ */
+ IFile bundleFile = bm.getBundleFile(rbCombo.getText());
+ if ((bundleFile != null) && (bundleFile.exists())) {
+ InputStream is = new ByteArrayInputStream(newText.getBytes());
+ bundleFile.appendContents(is, false, true, null);
+ }
+ /*
+ * Replace text in the editor with "key.value"
+ */
+ String bundlePrefix = Constants.EMPTY;
+ for (BundleEntry be : bm.getBundles()) {
+ if (be.uri.equalsIgnoreCase(rbCombo.getText())) {
+ bundlePrefix = be.prefix;
+ }
+ }
+ newText = "#{" + bundlePrefix + Constants.DOT + propsKey.getText() + "}"; //$NON-NLS-1$ //$NON-NLS-2$
+ doc.replace(textSel.getOffset(), textSel.getLength(), newText);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ super.okPressed();
+ }
+
+ private boolean isSelectionCorrect(ISelection sel) {
+ if ((sel instanceof TextSelection)
+ && (sel instanceof IStructuredSelection)
+ && (((IStructuredSelection) sel).size() == 1)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-05-28 10:12:00 UTC (rev 22405)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2010-05-28 10:34:46 UTC (rev 22406)
@@ -61,6 +61,7 @@
import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.dialog.ExternalizeStringsDialog;
import org.jboss.tools.vpe.editor.mozilla.listener.EditorLoadWindowListener;
import org.jboss.tools.vpe.editor.mozilla.listener.MozillaResizeListener;
import org.jboss.tools.vpe.editor.mozilla.listener.MozillaTooltipListener;
@@ -114,6 +115,7 @@
public static final String ICON_SELECTION_BAR = "icons/selbar.gif"; //$NON-NLS-1$
public static final String ICON_TEXT_FORMATTING = "icons/text-formatting.gif"; //$NON-NLS-1$
public static final String ICON_BUNDLE_AS_EL= "icons/bundle-as-el.gif"; //$NON-NLS-1$
+ public static final String ICON_EXTERNALIZE_STRINGS= "icons/properties.gif"; //$NON-NLS-1$
static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
private XulRunnerEditor xulRunnerEditor;
@@ -143,6 +145,7 @@
private Action showSelectionBarAction;
private Action showTextFormattingAction;
private Action showBundleAsELAction;
+ private Action externalizeStringsAction;
static {
/*
@@ -287,7 +290,7 @@
.getActiveShell(), fileLocation);
dialogNew.open();
} else {
- VpePlugin.getDefault().logError("Could not open Vpe Resources Dialog."); //$NON-NLS-1$
+ VpePlugin.getDefault().logError(VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
}
}
};
@@ -455,6 +458,28 @@
ICON_BUNDLE_AS_EL));
showBundleAsELAction.setToolTipText(VpeUIMessages.SHOW_BUNDLES_AS_EL);
toolBarManager.add(showBundleAsELAction);
+
+ /*
+ * Create EXTERNALIZE STRINGS tool bar item
+ */
+ externalizeStringsAction = new Action(VpeUIMessages.EXTENALIZE_STRINGS,
+ IAction.AS_PUSH_BUTTON) {
+ @Override
+ public void run() {
+ /*
+ * Externalize strings action
+ * Show a dialog to add properties key and value
+ */
+ ExternalizeStringsDialog dlg = new ExternalizeStringsDialog(
+ PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+ controller);
+ dlg.open();
+ }
+ };
+ externalizeStringsAction.setImageDescriptor(ImageDescriptor.createFromFile(MozillaEditor.class,
+ ICON_EXTERNALIZE_STRINGS));
+ externalizeStringsAction.setToolTipText(VpeUIMessages.EXTENALIZE_STRINGS);
+ toolBarManager.add(externalizeStringsAction);
updateToolbarItemsAccordingToPreferences();
toolBarManager.update(true);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-05-28 10:12:00 UTC (rev 22405)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-05-28 10:34:46 UTC (rev 22406)
@@ -127,6 +127,7 @@
public static String SHOW_RESOURCE_BUNDLES_USAGE_AS_EL;
public static String SHOW_BUNDLES_AS_EL;
public static String SHOW_BUNDLES_AS_MESSAGES;
+ public static String EXTENALIZE_STRINGS;
public static String ASK_TAG_ATTRIBUTES_ON_TAG_INSERT;
public static String ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR;
public static String INFORM_WHEN_PROJECT_MIGHT_NOT_BE_CONFIGURED_PROPERLY_FOR_VPE;
@@ -157,5 +158,18 @@
public static String COULD_NOT_SET_TABLE_SELECTION;
public static String CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT;
public static String LIST_IS_EMPTY;
+ public static String EXTRNALIZE_STRINGS_DIALOG_TITLE;
+ public static String EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION;
+ public static String EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE;
+ public static String EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP;
+ public static String EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP;
+ public static String EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR;
+ public static String COULD_NOT_OPEN_VPE_RESOURCES_DIALOG;
+
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-05-28 10:12:00 UTC (rev 22405)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-05-28 10:34:46 UTC (rev 22406)
@@ -109,6 +109,7 @@
HIDE_TEXT_FORMATTING = Hide text formatting bar
SHOW_RESOURCE_BUNDLES_USAGE_AS_EL=Show resource bundles usage as EL expressions
SHOW_BUNDLES_AS_EL=Show bundle's messages as EL expressions
+EXTENALIZE_STRINGS=Externalize strings
SHOW_BUNDLES_AS_MESSAGES=Show bundle's messages explicitly
ASK_TAG_ATTRIBUTES_ON_TAG_INSERT=Ask for tag attributes during tag insert
ASK_CONFIRMATION_ON_CLOSING_SELECTION_BAR=Ask for confirmation when closing Selection Bar
@@ -144,5 +145,18 @@
COULD_NOT_SET_TABLE_SELECTION=Could not set table selection.
LIST_IS_EMPTY=List is empty
+# Externalize Strings Dialog
+EXTRNALIZE_STRINGS_DIALOG_TITLE=Externalize Strings Dialog
+EXTRNALIZE_STRINGS_DIALOG_DESCRIPTION=Externalize your strings via properties file
+EXTRNALIZE_STRINGS_DIALOG_TEXT_STRING=Text sting:
+EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_KEY=Properties key:
+EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_VALUE=Properties value:
+EXTRNALIZE_STRINGS_DIALOG_PROPERTIES_FILE=Properties file:
+EXTRNALIZE_STRINGS_DIALOG_RESOURCE_BUNDLE_LIST=Select resource bundle:
+EXTRNALIZE_STRINGS_DIALOG_PROPS_STRINGS_GROUP=Externalize strings
+EXTRNALIZE_STRINGS_DIALOG_PROPS_FILES_GROUP=Handle properties file
+EXTRNALIZE_STRINGS_DIALOG_INITIALIZATION_ERROR=Could not initialize externalization dialog!
+
# Other messages
-CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT=Cannot load taglibs from PageContext!
\ No newline at end of file
+CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT=Cannot load taglibs from PageContext!
+COULD_NOT_OPEN_VPE_RESOURCES_DIALOG=Could not open Vpe Resources Dialog!
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r22405 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-28 06:12:00 -0400 (Fri, 28 May 2010)
New Revision: 22405
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: Injection point type is a type variable
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-28 09:53:29 UTC (rev 22404)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-28 10:12:00 UTC (rev 22405)
@@ -943,7 +943,10 @@
addError(CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, CDIPreferences.GENERIC_METHOD_ANNOTATED_INJECT, declaration, injection.getResource());
}
}
-
+ /*
+ * 5.2.2. Legal injection point types
+ * - injection point type is a type variable
+ */
if(!(injection instanceof IInjectionPointMethod) && CDIUtil.isTypeVariable(injection, false)) {
IAnnotationDeclaration declaration = injection.getInjectAnnotation();
addError(CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, CDIPreferences.INJECTION_TYPE_IS_VARIABLE, declaration, injection.getResource());
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28 09:53:29 UTC (rev 22404)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28 10:12:00 UTC (rev 22405)
@@ -122,9 +122,6 @@
- X specializes Y and Y has a name and X declares a name explicitly, using @Named
- interceptor or decorator is annotated @Specializes (Non-Portable behavior)
-
-
-
5.2.2. Legal injection point types
- injection point type is a type variable
@@ -135,6 +132,10 @@
5.2.5. Qualifier annotations with members
- array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)
+
+
+
+
5.5.7. Injection point metadata
- bean that declares any scope other than @Dependent has an injection point of type
InjectionPoint and qualifier @Default
14 years, 7 months
JBoss Tools SVN: r22404 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-05-28 05:53:29 -0400 (Fri, 28 May 2010)
New Revision: 22404
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Animal.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/FarmBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Sheep.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/InjectionPointTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new CDI validation rule: Injection point type is a type variable
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -26,7 +26,9 @@
import org.eclipse.jdt.core.ILocalVariable;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
import org.eclipse.wst.validation.internal.plugin.ValidationPlugin;
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
@@ -538,6 +540,67 @@
return false;
}
+ /**
+ * Checks if the bean member has a type variable as a type.
+ * If the bean member is a field then checks its type.
+ * If the bean member is a parameter of a method then checks its type.
+ * If the bean member is a method then checks its return type.
+ *
+ * @param member
+ * @param checkGenericMethod if true then checks if this member use a type variable which is declared in the generic method (in case of the member is a method).
+ * @return
+ */
+ public static boolean isTypeVariable(IBeanMember member, boolean checkGenericMethod) {
+ try {
+ String[] typeVariableSegnatures = member.getClassBean().getBeanClass().getTypeParameterSignatures();
+ List<String> variables = new ArrayList<String>();
+ for (String variableSig : typeVariableSegnatures) {
+ variables.add(Signature.getTypeVariable(variableSig));
+ }
+ if(checkGenericMethod) {
+ ITypeParameter[] typeParams = null;
+ if(member instanceof IParameter) {
+ typeParams = ((IParameter)member).getBeanMethod().getMethod().getTypeParameters();
+ } if(member instanceof IBeanMethod) {
+ typeParams = ((IBeanMethod)member).getMethod().getTypeParameters();
+ }
+ if(typeParams!=null) {
+ for (ITypeParameter param : typeParams) {
+ variables.add(param.getElementName());
+ }
+ }
+ }
+ String signature = null;
+ if(member instanceof IBeanField) {
+ signature = ((IBeanField)member).getField().getTypeSignature();
+ } else if(member instanceof IParameter) {
+ if(((IParameter)member).getType()==null) {
+ return false;
+ }
+ signature = ((IParameter)member).getType().getSignature();
+ } else if(member instanceof IBeanMethod) {
+ signature = ((IBeanMethod)member).getMethod().getReturnType();
+ }
+ return isTypeVariable(variables, signature);
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ private static boolean isTypeVariable(List<String> typeVariables, String signature) {
+ if(signature==null) {
+ return false;
+ }
+ String typeString = Signature.toString(signature);
+ for (String variableName : typeVariables) {
+ if(typeString.equals(variableName)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private static IType getSuperClass(IType type) throws JavaModelException {
String superclassName = type.getSuperclassName();
if(superclassName!=null) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -368,6 +368,8 @@
if(specializingBean==null) {
return;
}
+ validationContext.addLinkedCoreResource(bean.getSourcePath().toOSString(), specializingBean.getResource().getFullPath(), false);
+
String beanClassName = bean.getBeanClass().getElementName();
String beanName = bean instanceof IBeanMethod?beanClassName + "." + ((IBeanMethod)bean).getSourceMember().getElementName() + "()":beanClassName;
String specializingBeanClassName = specializingBean.getBeanClass().getElementName();
@@ -903,7 +905,6 @@
pinjection.getAnnotationPosition(CDIConstants.NAMED_QUALIFIER_TYPE_NAME),
injection.getResource());
}
-
}
} else if (injection instanceof IInjectionPointMethod) {
IAnnotationDeclaration named = injection.getAnnotation(CDIConstants.NAMED_QUALIFIER_TYPE_NAME);
@@ -942,6 +943,11 @@
addError(CDIValidationMessages.STATIC_METHOD_ANNOTATED_INJECT, CDIPreferences.GENERIC_METHOD_ANNOTATED_INJECT, declaration, injection.getResource());
}
}
+
+ if(!(injection instanceof IInjectionPointMethod) && CDIUtil.isTypeVariable(injection, false)) {
+ IAnnotationDeclaration declaration = injection.getInjectAnnotation();
+ addError(CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, CDIPreferences.INJECTION_TYPE_IS_VARIABLE, declaration, injection.getResource());
+ }
}
/**
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-05-28 09:53:29 UTC (rev 22404)
@@ -128,6 +128,10 @@
5.2.2. Legal injection point types
- injection point type is a type variable
+
+
+
+
5.2.5. Qualifier annotations with members
- array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -48,7 +48,7 @@
{CDIPreferences.PRODUCER_FIELD_TYPE_HAS_WILDCARD, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeHasWildcard_label},
{CDIPreferences.PRODUCER_FIELD_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeIsVariable_label},
// {CDIPreferences.PRODUCER_FIELD_TYPE_DOES_NOT_MATCH_JAVA_EE_OBJECT, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_producerFieldTypeDoesNotMatchJavaEeObject_label},
-// {CDIPreferences.INJECTION_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label},
+ {CDIPreferences.INJECTION_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label},
{CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label},
// {CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label},
// {CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Animal.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Animal.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Animal.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.inject;
+
+interface Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/FarmBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/FarmBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/FarmBroken.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.inject;
+
+import javax.inject.Inject;
+
+class FarmBroken <U> {
+ @Inject
+ public <T extends Animal> void setAnimal(T animal) {
+
+ }
+
+ @Inject
+ public void setAnimal(U animal) {
+ }
+
+ @Inject
+ public U animalU;
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/FarmBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Sheep.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Sheep.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Sheep.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.inject;
+
+class Sheep implements Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/inject/Sheep.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/InjectionPointTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/InjectionPointTest.java 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/InjectionPointTest.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -12,9 +12,12 @@
import java.util.Set;
+import org.eclipse.jdt.core.ITypeParameter;
import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointParameter;
+import org.jboss.tools.cdi.core.IParametedType;
/**
* @author Alexey Kazakov
@@ -22,7 +25,7 @@
public class InjectionPointTest extends TCKTest {
/**
- * Section 3.7.1 - Declaring a bean constructor
+ * Section 3.7.1 - Declaring a bean constructorThe bean was not found.
* - All parameters of a bean constructor are injection points.
*/
public void testQualifierTypeAnnotatedConstructor() {
@@ -40,4 +43,19 @@
Set<IInjectionPointParameter> points = CDIUtil.getInjectionPointParameters(bean);
assertEquals("There should be two injection point parameters in the bean.", 1, points.size());
}
+
+ // https://jira.jboss.org/browse/JBIDE-6387 Type of a method parameter is null in case of generic method.
+ public void testMethodParameter() {
+ IClassBean bean = getClassBean("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/FarmBroken.java");
+ assertNotNull("Can't find the bean.", bean);
+ Set<IInjectionPoint> injections = bean.getInjectionPoints();
+ for (IInjectionPoint injectionPoint : injections) {
+ if(injectionPoint instanceof IInjectionPointParameter) {
+ IInjectionPointParameter param = (IInjectionPointParameter)injectionPoint;
+ IParametedType type = param.getType();
+ assertNotNull("Type of the parameter is null", type);
+ assertNotNull("Signature of parameter type is null", type.getSignature());
+ }
+ }
+ }
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-28 09:06:52 UTC (rev 22403)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-05-28 09:53:29 UTC (rev 22404)
@@ -886,6 +886,17 @@
}
/**
+ * 5.2.2. Legal injection point types
+ * - injection point type is a type variable
+ *
+ * @throws Exception
+ */
+ public void testTypeVariableInjectionPoint() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/inject/FarmBroken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, CDIValidationMessages.INJECTION_TYPE_IS_VARIABLE, 11, 15);
+ }
+
+ /**
* 10.4.2. Declaring an observer method
* - method has more than one parameter annotated @Observes
*
14 years, 7 months
JBoss Tools SVN: r22403 - in branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-05-28 05:06:52 -0400 (Fri, 28 May 2010)
New Revision: 22403
Added:
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.classpath
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.project
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jdt.core.prefs
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jpt.core.prefs
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.component
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.xml
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.hibernate.eclipse.console.prefs
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/ejb3-persistence.jar
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate-annotations.jar
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate3.jar
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/postgresql-8.4-701.jdbc3.jar
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/MANIFEST.MF
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/persistence.xml
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany1.java
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany2.java
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/ns/
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/ns/NamingStrategy.java
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/testHibernateJpaProject.launch
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaAllTests.java
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java
Removed:
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
Modified:
branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF
Log:
Update jpa tests
Modified: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF 2010-05-28 00:34:33 UTC (rev 22402)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/META-INF/MANIFEST.MF 2010-05-28 09:06:52 UTC (rev 22403)
@@ -13,7 +13,9 @@
org.eclipse.jpt.db,
org.eclipse.jdt.core,
org.hibernate.eclipse.console.test,
- org.jboss.tools.hibernate.jpt.core
+ org.jboss.tools.hibernate.jpt.core,
+ org.jboss.tools.tests;bundle-version="2.0.0",
+ org.hibernate.eclipse;bundle-version="3.3.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.hibernate.jpt.core.test
Bundle-Activator: org.jboss.tools.hibernate.jpt.core.test.HibernateJPTuiTestPlugin
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.classpath
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.classpath (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.classpath 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="lib" path="lib/hibernate3.jar"/>
+ <classpathentry kind="lib" path="lib/ejb3-persistence.jar"/>
+ <classpathentry kind="lib" path="lib/hibernate-annotations.jar"/>
+ <classpathentry kind="lib" path="lib/postgresql-8.4-701.jdbc3.jar"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.project
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.project (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.project 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>testHibernateJpaProject</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.hibernate.eclipse.console.hibernateBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.hibernate.eclipse.console.hibernateNature</nature>
+ </natures>
+</projectDescription>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jdt.core.prefs 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,8 @@
+#Mon May 10 13:11:51 EEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jpt.core.prefs
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jpt.core.prefs (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.jpt.core.prefs 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,3 @@
+#Mon May 10 13:11:52 EEST 2010
+eclipse.preferences.version=1
+org.eclipse.jpt.core.platform=hibernate
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.component
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.component (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.component 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="testHibernateJpaProject">
+ <wb-resource deploy-path="/" source-path="/src"/>
+ </wb-module>
+</project-modules>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,7 @@
+<root>
+ <facet id="jpt.jpa">
+ <node name="libprov">
+ <attribute name="provider-id" value="jpa-no-op-library-provider"/>
+ </node>
+ </facet>
+</root>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="java"/>
+ <fixed facet="jst.utility"/>
+ <fixed facet="jpt.jpa"/>
+ <installed facet="java" version="1.5"/>
+ <installed facet="jst.utility" version="1.0"/>
+ <installed facet="jpt.jpa" version="1.0"/>
+</faceted-project>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.hibernate.eclipse.console.prefs
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.hibernate.eclipse.console.prefs (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/.settings/org.hibernate.eclipse.console.prefs 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,4 @@
+#Mon May 10 13:11:52 EEST 2010
+default.configuration=testHibernateJpaProject
+eclipse.preferences.version=1
+hibernate3.enabled=true
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)
Property changes on: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/ejb3-persistence.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate-annotations.jar
===================================================================
(Binary files differ)
Property changes on: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate-annotations.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate3.jar
===================================================================
(Binary files differ)
Property changes on: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/hibernate3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/postgresql-8.4-701.jdbc3.jar
===================================================================
(Binary files differ)
Property changes on: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/lib/postgresql-8.4-701.jdbc3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/MANIFEST.MF
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/MANIFEST.MF (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/MANIFEST.MF 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/persistence.xml
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/persistence.xml (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/META-INF/persistence.xml 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="testHibernateJpaProject">
+ <class>entity.ManyToMany2</class>
+ <class>entity.ManyToMany1</class>
+ </persistence-unit>
+</persistence>
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany1.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany1.java (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany1.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,20 @@
+package entity;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+
+@Entity
+public class ManyToMany1 implements Serializable {
+
+ @Id
+ private int id1;
+
+ private String justData1;
+
+ @ManyToMany(mappedBy = "mtm1")
+ private Set<ManyToMany2> mtm2;
+}
\ No newline at end of file
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany2.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany2.java (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/entity/ManyToMany2.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,29 @@
+package entity;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.Column;
+import javax.persistence.Table;
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.NamedQuery;
+
+@Entity
+@Table(name = "ManyToMany22")
+@NamedQuery(name = "my_query", query = "select all from my_table")
+public class ManyToMany2 implements Serializable {
+
+ @Id
+ @Column(name = "id")
+ @GenericGenerator(name = "my_generator", strategy = "hilo")
+ private int id2;
+
+ @Column(name = "justData")
+ private String justData2;
+
+ @ManyToMany
+ private Set<ManyToMany1> mtm1;
+}
\ No newline at end of file
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/ns/NamingStrategy.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/ns/NamingStrategy.java (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/src/ns/NamingStrategy.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,69 @@
+package ns;
+
+import org.hibernate.cfg.DefaultNamingStrategy;
+
+public class NamingStrategy extends DefaultNamingStrategy{
+
+ private static final long serialVersionUID = 1L;
+
+ private static final String CT_PREFIX = "ctn_";
+
+ private static final String TN_PREFIX = "tn_";
+
+ private static final String PC_PREFIX = "pc_";
+
+ private static final String CN_PREFIX = "cn_";
+
+ private static final String FK_PREFIX = "fk_";
+
+ private static final String COL_PREFIX = "col_";
+
+ private static final String JKCN_PREFIX = "jkcn_";
+
+ @Override
+ public String classToTableName(String className) {
+ return CT_PREFIX + unqualify(className);
+ }
+
+ public String propertyToColumnName(String propertyName) {
+ return PC_PREFIX + unqualify(propertyName);
+ }
+
+ @Override
+ public String tableName(String tableName) {
+ return TN_PREFIX + tableName;
+ }
+
+ @Override
+ public String collectionTableName(String ownerEntity,
+ String ownerEntityTable, String associatedEntity,
+ String associatedEntityTable, String propertyName) {
+ return COL_PREFIX + unqualify(ownerEntity) + "_"+ associatedEntity+ "_" +
+ associatedEntityTable + "_" + unqualify( associatedEntity ) +
+ "_" +propertyName;
+ }
+
+ @Override
+ public String columnName(String columnName) {
+ return CN_PREFIX + columnName;
+ }
+
+ @Override
+ public String joinKeyColumnName(String joinedColumn, String joinedTable) {
+ return JKCN_PREFIX + joinedColumn + '_' + joinedTable;
+ }
+
+ @Override
+ public String foreignKeyColumnName(String propertyName,
+ String propertyEntityName, String propertyTableName,
+ String referencedColumnName) {
+ return FK_PREFIX + propertyName + "_"+ unqualify(propertyEntityName)
+ + "_" + propertyTableName + "_" + referencedColumnName;
+ }
+
+ private String unqualify(String s) {
+ if (s != null) return s;//.replaceAll("\\.", "");
+ return "null";
+ }
+
+}
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/testHibernateJpaProject.launch
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/testHibernateJpaProject.launch (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/res/testHibernateJpaProject/testHibernateJpaProject.launch 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="testHibernateJpaProject"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="testHibernateJpaProject"/>
+<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
+<listAttribute key="org.hibernate.eclipse.launch.FILE_MAPPINGS"/>
+<stringAttribute key="org.hibernate.eclipse.launchDIALECT" value="org.hibernate.dialect.PostgreSQLDialect"/>
+<stringAttribute key="org.hibernate.eclipse.launchNAMING_STRATEGY" value="ns.NamingStrategy"/>
+</launchConfiguration>
Deleted: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2010-05-28 00:34:33 UTC (rev 22402)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJPACoreTests.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.jpt.core.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.jpt.core.JpaAnnotationProvider;
-import org.eclipse.jpt.core.JpaFile;
-import org.eclipse.jpt.core.JpaPlatform;
-import org.eclipse.jpt.core.JpaProject;
-import org.eclipse.jpt.core.JptCorePlugin;
-import org.eclipse.jpt.core.context.persistence.Persistence;
-import org.eclipse.jpt.core.context.persistence.PersistenceUnit;
-import org.eclipse.jpt.core.internal.platform.GenericJpaAnnotationProvider;
-import org.eclipse.jpt.core.internal.utility.jdt.JDTFieldAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourceCompilationUnit;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.resource.persistence.PersistenceFactory;
-import org.eclipse.jpt.core.resource.persistence.PersistencePackage;
-import org.eclipse.jpt.core.resource.persistence.XmlJarFileRef;
-import org.eclipse.jpt.core.resource.persistence.XmlJavaClassRef;
-import org.eclipse.jpt.core.resource.persistence.XmlMappingFileRef;
-import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnit;
-import org.eclipse.jpt.core.resource.persistence.XmlPersistenceUnitTransactionType;
-import org.eclipse.jpt.utility.CommandExecutor;
-import org.eclipse.jpt.utility.CommandExecutor.Default;
-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.events.IProjectFacetActionEvent;
-import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaPlatform;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaPlatformFactory;
-import org.jboss.tools.hibernate.jpt.core.internal.JPAPostInstallFasetListener;
-import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotationImpl;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-
-/**
- * JUnit plugin test class for core Hibernate JPA platform
- * (org.jboss.tools.hibernate.jpt.core)
- *
- * @author Vitali Yemialyanchyk
- */
-public class HibernateJPACoreTests extends TestCase {
-
- /**
- * annotated class name
- */
- public static final String className = "TestPTR"; //$NON-NLS-1$
- /**
- * annotated package name
- */
- public static final String packageName = "org.test"; //$NON-NLS-1$
- /**
- * fully qualified name of annotated class
- */
- public static final String classFullName = packageName + "." + className; //$NON-NLS-1$
- /**
- * annotated java file name
- */
- public static final String javaFileName = className + ".java"; //$NON-NLS-1$
- /**
- * content of annotated java file
- */
- public static final String strJava = "package " + packageName + ";\n" + //$NON-NLS-1$ //$NON-NLS-2$
- "import javax.persistence.*;\n" + //$NON-NLS-1$
- "import org.hibernate.annotations.GenericGenerator;\n" + //$NON-NLS-1$
- "@Entity\n" + //$NON-NLS-1$
- "@NamedQueries( { @NamedQuery(name = \"arName\", query = \"From " + //$NON-NLS-1$
- className + " \") })\n" + //$NON-NLS-1$
- "public class " + className + " {\n" + //$NON-NLS-1$ //$NON-NLS-2$
- "@Id\n" + //$NON-NLS-1$
- "@GeneratedValue(generator=\"wrongGenerator\")\n" + //$NON-NLS-1$
- "private Short id_Article;\n" + //$NON-NLS-1$
- "@GenericGenerator(name=\"rightGenerator\", strategy=\"hilo\")\n" + //$NON-NLS-1$
- "@GeneratedValue(generator=\"rightGenerator\")\n" + //$NON-NLS-1$
- "private Short id_Article2;\n" + //$NON-NLS-1$
- "public Short getId_Article(){return id_Article;}\n" + //$NON-NLS-1$
- "public Short getId_Article2(){return id_Article2;}\n" + //$NON-NLS-1$
- "}\n"; //$NON-NLS-1$
- /**
- * content of .classpath file
- */
- public static final String strClassPath = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + //$NON-NLS-1$
- "<classpath>\n" + //$NON-NLS-1$
- "<classpathentry kind=\"src\" path=\"src\"/>\n" + //$NON-NLS-1$
- "<classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER\"/>\n" + //$NON-NLS-1$
- "<classpathentry kind=\"con\" path=\"org.eclipse.pde.core.requiredPlugins\"/>\n" + //$NON-NLS-1$
- "<classpathentry kind=\"output\" path=\"bin\"/>\n" + //$NON-NLS-1$
- "</classpath>\n"; //$NON-NLS-1$
-
-
- public Mockery context = new Mockery() {
- {
- setImposteriser(ClassImposteriser.INSTANCE);
- }
- };
-
- /**
- * mock input stream to simulate javaFileName file reading
- */
- public static class MockJavaInputStream extends InputStream {
-
- protected int pointer = 0;
-
- @Override
- public int read() throws IOException {
- if (pointer < strJava.getBytes().length) {
- return strJava.getBytes()[pointer++];
- }
- return -1;
- }
- }
-
- /**
- * mock input stream to simulate .classpath file reading
- */
- public static class MockClassPathInputStream extends InputStream {
-
- protected int pointer = 0;
-
- @Override
- public int read() throws IOException {
- if (pointer < strClassPath.getBytes().length) {
- return strClassPath.getBytes()[pointer++];
- }
- return -1;
- }
- }
-
- /**
- * The general goal of this test is cover org.jboss.tools.hibernate.jpt.core
- * plugin functionality, it doesn't test org.eclipse.jdt functionality,
- * so here all org.eclipse.jdt internal objects substituted with mock values.
- *
- * @throws CoreException
- * @throws IOException
- */
- public void testMockJPTCore() throws CoreException, IOException {
-
- // define/prepare mock objects for testing
- final HibernateJpaPlatformFactory hibernateJpaPlatformFactory = new HibernateJpaPlatformFactory();
- final JpaPlatform jpaPlatform = hibernateJpaPlatformFactory.buildJpaPlatform("hibernate"); //$NON-NLS-1$
- final String hibernatePlatformId = jpaPlatform.getId();
- assertTrue(HibernateJpaPlatform.ID.equals(hibernatePlatformId));
- //
- final JpaProject jpaProject = context.mock(JpaProject.class);
- final IProject project = context.mock(IProject.class);
- final IFile file = context.mock(IFile.class);
- final Persistence persistence = context.mock(Persistence.class);
- final XmlPersistenceUnit xmlPersistenceUnit = context
- .mock(XmlPersistenceUnit.class);
- final InternalEObject owner = xmlPersistenceUnit;
- // setup expectations to mock model notifications during
- // EList<XmlJavaClassRef> classes - value insertion
- context.checking(new Expectations() {
- {
- oneOf(owner).eNotificationRequired();
- will(returnValue(false));
-
- oneOf(owner).eInternalResource();
- will(returnValue(null));
- }
- });
- final String testClassName = classFullName;
- final EList<XmlJavaClassRef> classes = new EObjectContainmentEList<XmlJavaClassRef>(
- XmlJavaClassRef.class, owner,
- PersistencePackage.XML_PERSISTENCE_UNIT__CLASSES);
- final XmlJavaClassRef xmlJavaClassRef1 = PersistenceFactory.eINSTANCE
- .createXmlJavaClassRef();
- xmlJavaClassRef1.setJavaClass(testClassName);
- // insert testClass into classes list
- classes.add(xmlJavaClassRef1);
- final EList<XmlMappingFileRef> mappingFiles = new EObjectContainmentEList<XmlMappingFileRef>(
- XmlMappingFileRef.class, xmlPersistenceUnit,
- PersistencePackage.XML_PERSISTENCE_UNIT__MAPPING_FILES);
- //
- final EList<XmlJarFileRef> jarFiles = new EObjectContainmentEList<XmlJarFileRef>(
- XmlJarFileRef.class, xmlPersistenceUnit,
- PersistencePackage.XML_PERSISTENCE_UNIT__JAR_FILES);
- //
- final JavaResourcePersistentType javaResourcePersistentType = context
- .mock(JavaResourcePersistentType.class);
- //
- final List<JavaResourcePersistentAttribute> resourceAttributesList2 = new ArrayList<JavaResourcePersistentAttribute>();
- final JDTFieldAttribute jdtFieldAttribute = new JDTFieldAttribute(null,
- "", 1, null, null); //$NON-NLS-1$
- //final JavaResourcePersistentAttribute jrpa1 = new JavaResourcePersistentAttributeImpl(
- // javaResourcePersistentType, jdtFieldAttribute);
- //resourceAttributesList2.add(jrpa1);
- //
- final GenericGeneratorAnnotationImpl genericGeneratorAnnotation = new GenericGeneratorAnnotationImpl(
- javaResourcePersistentType, null, null, null);
- //
- final InputStream classPathIStream = new MockClassPathInputStream();
- final InputStream javaIStream = new MockJavaInputStream();
- //
- final IPath pathProject = new Path(""); //$NON-NLS-1$
- //
- final IPath pathJavaFile = new Path(javaFileName);
- //
- final CommandExecutor commandExecutor = Default.INSTANCE;
- // define/check jpaPlatform.buildJpaFile expectations
- context.checking(new Expectations() {
- {
-
- allowing(jpaProject).getJpaPlatform();
- will(returnValue(jpaPlatform));
-
- oneOf(file).getProject();
- will(returnValue(project));
-
- allowing(project).getType();
- will(returnValue(IResource.PROJECT));
-
- oneOf(file).getFullPath();
- will(returnValue(pathProject));
-
- allowing(project).hasNature("org.eclipse.jdt.core.javanature"); //$NON-NLS-1$
- will(returnValue(true));
-
- oneOf(project).getFile(with(".classpath")); //$NON-NLS-1$
- will(returnValue(file));
-
- oneOf(file).exists();
- will(returnValue(true));
-
- oneOf(file).getContents(true);
- will(returnValue(classPathIStream));
-
- allowing(project).getFullPath();
- will(returnValue(pathProject));
-
- allowing(project).getName();
- will(returnValue("IProj")); //$NON-NLS-1$
-
- allowing(jpaProject).getModifySharedDocumentCommandExecutor();
- will(returnValue(commandExecutor));
-
- oneOf(file).getParent();
- will(returnValue(project));
-
- allowing(file).getName();
- will(returnValue(javaFileName));
-
- oneOf(project).getWorkingLocation("org.eclipse.jdt.core"); //$NON-NLS-1$
- will(returnValue(null));
-
- oneOf(project).getFile(new Path(javaFileName));
- will(returnValue(file));
-
- oneOf(file).getCharset();
- will(returnValue(null));
-
- oneOf(file).getLocation();
- will(returnValue(pathJavaFile));
-
- oneOf(file).getContents();
- will(returnValue(javaIStream));
-
- oneOf(file).getContents(true);
- will(returnValue(javaIStream));
-
- oneOf(project).getDefaultCharset();
- will(returnValue(null));
- }
- });
- // setup JptCorePlugin preferences:
- // a) setup hibernate as default jpa platform
- JptCorePlugin.setDefaultJpaPlatformId(hibernatePlatformId);
- // b) setup hibernate as jpa platform for project
- JptCorePlugin.setJpaPlatformId(project, hibernatePlatformId);
- // FIRST TEST:
- // try to build jpa file using hibernate jpa platform
- final JpaFile jpaFile = jpaPlatform.buildJpaFile(jpaProject, file);
- //
- // define/prepare mock objects for further testing
- final JavaResourceCompilationUnit javaResourceCompilationUnit = context
- .mock(JavaResourceCompilationUnit.class);
- final JpaAnnotationProvider jpaAnnotationProvider = jpaPlatform.getAnnotationProvider();
- new GenericJpaAnnotationProvider();
- //
- final IProjectFacetActionEvent projectFacetActionEvent = context
- .mock(IProjectFacetActionEvent.class);
- final IFacetedProject facetedProject = context
- .mock(IFacetedProject.class);
- final IProjectFacet projectFacet = context.mock(IProjectFacet.class);
- // define/check jpaPlatform.getJpaFactory().buildPersistenceUnit,
- // pu.update and jpaPostInstallFasetListener.handleEvent expectations
- context.checking(new Expectations() {
- {
- allowing(xmlPersistenceUnit).getName();
- will(returnValue(className));
-
- oneOf(xmlPersistenceUnit).setName(className);
-
- allowing(xmlPersistenceUnit).getClasses();
- will(returnValue(classes));
-
- allowing(persistence).getJpaProject();
- will(returnValue(jpaProject));
-
- allowing(jpaProject).getJavaResourcePersistentType(classFullName);
- will(returnValue(javaResourcePersistentType));
-
- allowing(jpaProject).getJavaResourcePersistentType(null);
- will(returnValue(null));
-
- allowing(javaResourcePersistentType).getSupportingAnnotation(
- Hibernate.GENERIC_GENERATOR);
- will(returnValue(genericGeneratorAnnotation));
-
- allowing(javaResourcePersistentType)
- .getSuperclassQualifiedName();
- will(returnValue(null));
-
- allowing(javaResourcePersistentType).getAccess();
- will(returnValue(org.eclipse.jpt.core.resource.java.AccessType.PROPERTY));
-
- allowing(javaResourcePersistentType).getQualifiedName();
- will(returnValue(classFullName));
-
- allowing(javaResourcePersistentType).getMappingAnnotation();
- will(returnValue(null));
-
- allowing(javaResourcePersistentType).persistableProperties();
- will(returnValue(resourceAttributesList2.iterator()));
-
- allowing(xmlPersistenceUnit).getMappingFiles();
- will(returnValue(mappingFiles));
-
- allowing(jpaProject).getDefaultOrmXmlResource();
- will(returnValue(null));
-
- allowing(xmlPersistenceUnit).getProperties();
- will(returnValue(null));
-
- allowing(xmlPersistenceUnit).getJarFiles();
- will(returnValue(jarFiles));
-
- allowing(xmlPersistenceUnit).getTransactionType();
- will(returnValue(XmlPersistenceUnitTransactionType.JTA));
-
- allowing(xmlPersistenceUnit).getDescription();
- will(returnValue("description")); //$NON-NLS-1$
-
- allowing(xmlPersistenceUnit).getProvider();
- will(returnValue("provider")); //$NON-NLS-1$
-
- allowing(xmlPersistenceUnit).getJtaDataSource();
- will(returnValue("jtaDataSource")); //$NON-NLS-1$
-
- allowing(xmlPersistenceUnit).getNonJtaDataSource();
- will(returnValue("nonJtaDataSource")); //$NON-NLS-1$
-
- allowing(xmlPersistenceUnit).getExcludeUnlistedClasses();
- will(returnValue(true));
-
- oneOf(xmlPersistenceUnit).setTransactionType(
- XmlPersistenceUnitTransactionType.JTA);
-
- oneOf(xmlPersistenceUnit).setDescription("description"); //$NON-NLS-1$
-
- oneOf(xmlPersistenceUnit).setProvider("provider"); //$NON-NLS-1$
-
- oneOf(xmlPersistenceUnit).setJtaDataSource("jtaDataSource"); //$NON-NLS-1$
-
- oneOf(xmlPersistenceUnit).setNonJtaDataSource(
- "nonJtaDataSource"); //$NON-NLS-1$
-
-
- oneOf(javaResourcePersistentType).getFile();
- will(returnValue(file));
-
- oneOf(jpaProject).getJpaFile(file);
- will(returnValue(jpaFile));
-
- oneOf(xmlPersistenceUnit).setExcludeUnlistedClasses(true);
-
- allowing(jpaProject).getDefaultSchema();
- will(returnValue("schemaName")); //$NON-NLS-1$
-
- allowing(jpaProject).getDefaultCatalog();
- will(returnValue("catalogName")); //$NON-NLS-1$
-
- oneOf(projectFacetActionEvent).getType();
- will(returnValue(Type.POST_INSTALL));
-
- oneOf(projectFacetActionEvent).getProject();
- will(returnValue(facetedProject));
-
- oneOf(facetedProject).getProject();
- will(returnValue(project));
-
- oneOf(projectFacetActionEvent).getProjectFacet();
- will(returnValue(projectFacet));
-
- oneOf(projectFacet).getId();
- will(returnValue(JptCorePlugin.FACET_ID));
- }
- });
- // SECOND TEST:
- // build pu via hibernate jpa factory
- PersistenceUnit pu = jpaPlatform.getJpaFactory().buildPersistenceUnit(
- persistence, xmlPersistenceUnit);
- // THIRD TEST:
- // update persistence unit and check number of class refs
- int classRefSizeOld = pu.classRefsSize();
- pu.update(xmlPersistenceUnit);
- int classRefSizeNew = pu.classRefsSize();
- // check is the old number of ref classes remain the same after
- // pu.update call - should be the same
- assertTrue(classRefSizeOld == classRefSizeNew);
- // FOURTH TEST:
- // check for handleEvent of JPAPostInstallFasetListener
- JPAPostInstallFasetListener jpaPostInstallFasetListener = new JPAPostInstallFasetListener();
- jpaPostInstallFasetListener.handleEvent(projectFacetActionEvent);
- // GENERAL TEST:
- // check for all expectations
- context.assertIsSatisfied();
- }
-
-}
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaAllTests.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaAllTests.java (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaAllTests.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateJpaAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(
+ "Test for org.jboss.tools.hibernate.jpt.core.test"); //$NON-NLS-1$
+ suite.addTestSuite(HibernateJpaModelTests.class);
+ suite.addTestSuite(HibernateJpaModelTests.class);
+ return suite;
+ }
+
+}
Added: branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java
===================================================================
--- branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java (rev 0)
+++ branches/3.2.helios/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java 2010-05-28 09:06:52 UTC (rev 22403)
@@ -0,0 +1,244 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.core.context.JpaRootContextNode;
+import org.eclipse.jpt.core.context.java.JavaJoinTable;
+import org.eclipse.jpt.core.context.java.JavaJoinTableJoiningStrategy;
+import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
+import org.eclipse.jpt.core.context.java.JavaPersistentType;
+import org.eclipse.jpt.core.context.java.JavaTypeMapping;
+import org.eclipse.jpt.core.context.persistence.ClassRef;
+import org.eclipse.jpt.core.context.persistence.Persistence;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaBasicMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaColumn;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaEntity;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaJoinTable;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaManyToManyMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaTable;
+import org.jboss.tools.test.util.ResourcesUtils;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateJpaModelTests extends TestCase {
+
+ private static final String PROJECT_NAME = "testHibernateJpaProject";
+ private static final String PROJECT_PATH = "res/" + PROJECT_NAME;
+
+ IProject project = null;
+ JpaProject jpaProject = null;
+
+ public void setUp() throws Exception {
+ project = ResourcesUtils.importProject(Platform.getBundle("org.jboss.tools.hibernate.jpt.core.test"),
+ PROJECT_PATH, new NullProgressMonitor());
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ }
+
+ public void testDefaultMapping(){
+ assertNotNull(jpaProject);
+ JpaRootContextNode rootContextNode = jpaProject.getRootContextNode();
+ Persistence p = rootContextNode.getPersistenceXml().getPersistence();
+ assertTrue(p.persistenceUnits().hasNext());
+ assertTrue(p.persistenceUnits().next() instanceof HibernatePersistenceUnit);
+ HibernatePersistenceUnit hpu = (HibernatePersistenceUnit) p.persistenceUnits().next();
+ List<ClassRef> crs = CollectionTools.list(hpu.classRefs());
+ assertTrue(crs.size() == 2);
+ if (crs.get(0).isFor("entity.ManyToMany1")){
+ checkManyToMany1(crs.get(0));
+ checkManyToMany2(crs.get(1));
+ } else {
+ checkManyToMany1(crs.get(1));
+ checkManyToMany2(crs.get(0));
+ }
+ }
+
+ public void testNamigStrategyMapping(){
+ ConsoleConfiguration cc = KnownConfigurations.getInstance().find(PROJECT_NAME);
+ assertNotNull("Console configuration not foun for project " + PROJECT_NAME, cc);
+ cc.build();
+ assertNotNull("Console configuration build problem", cc.getConfiguration());
+ assertNotNull("Naming Strategy not found", cc.getConfiguration().getNamingStrategy());
+ assertEquals("ns.NamingStrategy", cc.getConfiguration().getNamingStrategy().getClass().getName());
+
+ jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ assertNotNull(jpaProject);
+ JpaRootContextNode rootContextNode = jpaProject.getRootContextNode();
+ Persistence p = rootContextNode.getPersistenceXml().getPersistence();
+ assertTrue(p.persistenceUnits().hasNext());
+ assertTrue(p.persistenceUnits().next() instanceof HibernatePersistenceUnit);
+ HibernatePersistenceUnit hpu = (HibernatePersistenceUnit) p.persistenceUnits().next();
+ List<ClassRef> crs = CollectionTools.list(hpu.classRefs());
+ assertTrue(crs.size() == 2);
+ if (crs.get(0).isFor("entity.ManyToMany1")){
+ checkManyToManyNS1(crs.get(0));
+ checkManyToManyNS2(crs.get(1));
+ } else {
+ checkManyToManyNS1(crs.get(1));
+ checkManyToManyNS2(crs.get(0));
+ }
+ cc.reset();
+ }
+
+ public void checkManyToMany1(ClassRef crs){
+ JavaPersistentType javaPersistentType = crs.getJavaPersistentType();
+ JavaTypeMapping mapping = javaPersistentType.getMapping();
+ assertTrue(mapping instanceof HibernateJavaEntity);
+ HibernateJavaEntity entity = (HibernateJavaEntity) mapping;
+ HibernateJavaTable table = entity.getTable();
+ assertEquals("ManyToMany1", table.getDBTableName());
+
+ ArrayList<JavaPersistentAttribute> attrs = CollectionTools.list(javaPersistentType.attributes());
+ assertTrue(attrs.size() == 3);
+
+ //id
+ assertTrue(attrs.get(0).getMapping() instanceof HibernateJavaIdMapping);
+ HibernateJavaIdMapping hjidm = (HibernateJavaIdMapping)attrs.get(0).getMapping();
+ HibernateJavaColumn hjc = (HibernateJavaColumn)hjidm.getColumn();
+ assertEquals("id1", hjc.getDBColumnName());
+
+ //justData
+ assertTrue(attrs.get(1).getMapping() instanceof HibernateJavaBasicMapping);
+ HibernateJavaBasicMapping hjbm = (HibernateJavaBasicMapping)attrs.get(1).getMapping();
+ hjc = (HibernateJavaColumn)hjbm.getColumn();
+ assertEquals("justData1", hjc.getDBColumnName());
+
+ //mtm
+ assertTrue(attrs.get(2).getMapping() instanceof HibernateJavaManyToManyMapping);
+ HibernateJavaManyToManyMapping hjmtmm = (HibernateJavaManyToManyMapping)attrs.get(2).getMapping();
+ assertEquals("entity.ManyToMany2", hjmtmm.getTargetEntity());
+ }
+
+ public void checkManyToMany2(ClassRef crs){
+ JavaPersistentType javaPersistentType = crs.getJavaPersistentType();
+ JavaTypeMapping mapping = javaPersistentType.getMapping();
+ assertTrue(mapping instanceof HibernateJavaEntity);
+ HibernateJavaEntity entity = (HibernateJavaEntity) mapping;
+ HibernateJavaTable table = entity.getTable();
+ assertEquals("ManyToMany22", table.getDBTableName());
+
+ ArrayList<JavaPersistentAttribute> attrs = CollectionTools.list(javaPersistentType.attributes());
+ assertTrue(attrs.size() == 3);
+ //id
+ assertTrue(attrs.get(0).getMapping() instanceof HibernateJavaIdMapping);
+ HibernateJavaIdMapping hjidm = (HibernateJavaIdMapping)attrs.get(0).getMapping();
+ HibernateJavaColumn hjc = (HibernateJavaColumn)hjidm.getColumn();
+ assertEquals("id", hjc.getDBColumnName());
+
+ //justData
+ assertTrue(attrs.get(1).getMapping() instanceof HibernateJavaBasicMapping);
+ HibernateJavaBasicMapping hjbm = (HibernateJavaBasicMapping)attrs.get(1).getMapping();
+ hjc = (HibernateJavaColumn)hjbm.getColumn();
+ assertEquals("justData", hjc.getDBColumnName());
+
+ //mtm
+ assertTrue(attrs.get(2).getMapping() instanceof HibernateJavaManyToManyMapping);
+ HibernateJavaManyToManyMapping hjmtmm = (HibernateJavaManyToManyMapping)attrs.get(2).getMapping();
+ assertEquals("entity.ManyToMany1", hjmtmm.getTargetEntity());
+ JavaJoinTableJoiningStrategy jtJoiningStrategy = hjmtmm.getRelationshipReference().getJoinTableJoiningStrategy();
+ JavaJoinTable joinTable = jtJoiningStrategy.getJoinTable();
+ assertTrue(joinTable instanceof HibernateJavaJoinTable);
+ HibernateJavaJoinTable hjjt = (HibernateJavaJoinTable)joinTable;
+ assertEquals("ManyToMany22_ManyToMany1", hjjt.getDBTableName());
+ }
+
+ public void checkManyToManyNS1(ClassRef crs){
+ JavaPersistentType javaPersistentType = crs.getJavaPersistentType();
+ JavaTypeMapping mapping = javaPersistentType.getMapping();
+ assertTrue(mapping instanceof HibernateJavaEntity);
+ HibernateJavaEntity entity = (HibernateJavaEntity) mapping;
+ HibernateJavaTable table = entity.getTable();
+ assertEquals("ctn_ManyToMany1", table.getDBTableName());
+
+ ArrayList<JavaPersistentAttribute> attrs = CollectionTools.list(javaPersistentType.attributes());
+ assertTrue(attrs.size() == 3);
+
+ //id
+ assertTrue(attrs.get(0).getMapping() instanceof HibernateJavaIdMapping);
+ HibernateJavaIdMapping hjidm = (HibernateJavaIdMapping)attrs.get(0).getMapping();
+ HibernateJavaColumn hjc = (HibernateJavaColumn)hjidm.getColumn();
+ assertEquals("pc_id1", hjc.getDBColumnName());
+
+ //justData
+ assertTrue(attrs.get(1).getMapping() instanceof HibernateJavaBasicMapping);
+ HibernateJavaBasicMapping hjbm = (HibernateJavaBasicMapping)attrs.get(1).getMapping();
+ hjc = (HibernateJavaColumn)hjbm.getColumn();
+ assertEquals("pc_justData1", hjc.getDBColumnName());
+
+ //mtm
+ assertTrue(attrs.get(2).getMapping() instanceof HibernateJavaManyToManyMapping);
+ HibernateJavaManyToManyMapping hjmtmm = (HibernateJavaManyToManyMapping)attrs.get(2).getMapping();
+ assertEquals("entity.ManyToMany2", hjmtmm.getTargetEntity());
+ }
+
+ public void checkManyToManyNS2(ClassRef crs){
+ JavaPersistentType javaPersistentType = crs.getJavaPersistentType();
+ JavaTypeMapping mapping = javaPersistentType.getMapping();
+ assertTrue(mapping instanceof HibernateJavaEntity);
+ HibernateJavaEntity entity = (HibernateJavaEntity) mapping;
+ HibernateJavaTable table = entity.getTable();
+ assertEquals("tn_ManyToMany22", table.getDBTableName());
+
+ ArrayList<JavaPersistentAttribute> attrs = CollectionTools.list(javaPersistentType.attributes());
+ assertTrue(attrs.size() == 3);
+ //id
+ assertTrue(attrs.get(0).getMapping() instanceof HibernateJavaIdMapping);
+ HibernateJavaIdMapping hjidm = (HibernateJavaIdMapping)attrs.get(0).getMapping();
+ HibernateJavaColumn hjc = (HibernateJavaColumn)hjidm.getColumn();
+ assertEquals("cn_id", hjc.getDBColumnName());
+
+ //justData
+ assertTrue(attrs.get(1).getMapping() instanceof HibernateJavaBasicMapping);
+ HibernateJavaBasicMapping hjbm = (HibernateJavaBasicMapping)attrs.get(1).getMapping();
+ hjc = (HibernateJavaColumn)hjbm.getColumn();
+ assertEquals("cn_justData", hjc.getDBColumnName());
+
+ //mtm
+ assertTrue(attrs.get(2).getMapping() instanceof HibernateJavaManyToManyMapping);
+ HibernateJavaManyToManyMapping hjmtmm = (HibernateJavaManyToManyMapping)attrs.get(2).getMapping();
+ assertEquals("entity.ManyToMany1", hjmtmm.getTargetEntity());
+ JavaJoinTableJoiningStrategy jtJoiningStrategy = hjmtmm.getRelationshipReference().getJoinTableJoiningStrategy();
+ JavaJoinTable joinTable = jtJoiningStrategy.getJoinTable();
+ assertTrue(joinTable instanceof HibernateJavaJoinTable);
+ HibernateJavaJoinTable hjjt = (HibernateJavaJoinTable)joinTable;
+ hjjt.getDbTable();
+ assertEquals("col_entity.ManyToMany2_entity.ManyToMany1_ManyToMany1_entity.ManyToMany1_mtm1", hjjt.getDBTableName());
+ }
+
+ protected void tearDown() throws Exception {
+ if(project != null) {
+ boolean saveAutoBuild = ResourcesUtils.setBuildAutomatically(false);
+ try {
+ project.delete(true,true, null);
+ } finally {
+ ResourcesUtils.setBuildAutomatically(saveAutoBuild);
+ }
+ }
+ }
+
+}
14 years, 7 months
JBoss Tools SVN: r22402 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-05-27 20:34:33 -0400 (Thu, 27 May 2010)
New Revision: 22402
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
Log:
updated release notes with features recommended for inclusion by max
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-05-28 00:03:39 UTC (rev 22401)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-05-28 00:34:33 UTC (rev 22402)
@@ -174,7 +174,7 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBDS-1228">JBDS-1228</ulink>: The JBoss Developer Studio installation wizard would display incorrect step numbering, seeming to jump sporadically. This occured because steps the installer takes that are invisible to the user were still included in the displayed step numbering on each screen. In this release the step numbering has been corrected to count only the steps the user participates in.
+ <ulink url="http://jira.jboss.com/jira/browse/JBDS-1228">JBDS-1228</ulink>: The JBoss Developer Studio installation wizard would display incorrect step numbering, seeming to jump sporadically. This occurred because steps the installer takes that are invisible to the user were still included in the displayed step numbering on each screen. In this release the step numbering has been corrected to count only the steps the user participates in.
</para>
</listitem>
<listitem>
@@ -206,6 +206,11 @@
<para>
<ulink url="http://jira.jboss.com/jira/browse/JBDS-1155">JBDS-1155</ulink>: A regression existed in the Eclipse 3.5.2 Web Tools Platform (WTP) 3.1.2. The bug would break EAR deployments that used classpath variables by deploying dependent artifacts to <filename><root_ear>/lib/lib/lib</filename> instead of <filename><root_ear>/lib</filename>. The issue has been corrected with these updated packages so that the regression no longer exists and EAR deployments function correctly.
</para>
+ <note>
+ <para>
+ Though this bug is fixed, a known issue exists (<xref linkend="JBDS-1207" />) that prohibits WTP updates in this release.
+ </para>
+ </note>
</listitem>
<listitem>
<para>
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2010-05-28 00:03:39 UTC (rev 22401)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Known_Issues.xml 2010-05-28 00:34:33 UTC (rev 22402)
@@ -12,9 +12,22 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="https://jira.jboss.org/jira/browse/JBDS-"> </ulink>
+ <ulink url="https://jira.jboss.org/jira/browse/JBDS-1222">JBDS-1222</ulink>: A bug exists in the JBoss Developer Studio that causes stylesheets to not render correctly in the JBoss Enterprise Application Platform 5 and a <exceptionname>org.ajax4jsf.resource.ResourceNotFoundException: Static resource not found for path <resource name></exceptionname> exception when using the JBoss Enterprise Portal Platform 5 to load a JSF page through a Portlet. These errors are caused by the code to load the style sheet being: <code><a:loadStyle src="resource:///stylesheet/theme.xcss"/></code> instead of <code><a:loadStyle src="/stylesheet/theme.xcss"/></code>.
</para>
+ <para>
+ The current workaround for this issue is to manually remove the code <code>resource://</code> from the beginning of the stylesheet location.
+ </para>
+ <note>
+ <para>
+ This issue does not present in the JBoss Enterprise Application Platform 4.3 because of a bug that exists in it that hides this issue.
+ </para>
+ </note>
</listitem>
+ <listitem id="JBDS-1207" xreflabel="JBDS-1207">
+ <para>
+ <ulink url="https://jira.jboss.org/jira/browse/JBDS-1207">JBDS-1207</ulink>:An issue exists that prohibits updates related to the Web Tools Platform appearing on the JBoss Developer Studio site.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
14 years, 7 months
JBoss Tools SVN: r22401 - in trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf: test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-05-27 20:03:39 -0400 (Thu, 27 May 2010)
New Revision: 22401
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
include JSF KB test into JSF test suite
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java 2010-05-27 23:36:54 UTC (rev 22400)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java 2010-05-28 00:03:39 UTC (rev 22401)
@@ -38,7 +38,7 @@
}
public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.jsf.kb.test",
+ provider = new TestProjectProvider("org.jboss.tools.jsf.test",
null,"TestKbModel" ,true);
project = provider.getProject();
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-05-27 23:36:54 UTC (rev 22400)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2010-05-28 00:03:39 UTC (rev 22401)
@@ -15,6 +15,7 @@
import junit.framework.TestSuite;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.jboss.tools.jsf.kb.test.FaceletsKbModelTest;
import org.jboss.tools.jsf.model.pv.test.JSFPromptingProviderTest;
import org.jboss.tools.jsf.test.refactoring.ELVariableRefactoringTest;
import org.jboss.tools.jsf.test.validation.JSF2ComponentsValidatorTest;
@@ -29,6 +30,7 @@
old.addTestSuite(JSFModelTest.class);
old.addTestSuite(ModelFormat_2_0_0_Test.class);
old.addTestSuite(JSFBeansTest.class);
+ old.addTestSuite(FaceletsKbModelTest.class);
suite.addTest(new ProjectImportTestSetup(old,
"org.jboss.tools.jsf.test", "projects/JSFKickStartOldFormat", //$NON-NLS-1$ //$NON-NLS-2$
"JSFKickStartOldFormat")); //$NON-NLS-1$
14 years, 7 months
JBoss Tools SVN: r22400 - trunk/jst/tests/org.jboss.tools.ui.bot.ext.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-05-27 19:36:54 -0400 (Thu, 27 May 2010)
New Revision: 22400
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/pom.xml
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
revert plug-in -o.j.t.jst.ui.bot.ext to eclipse-plugin or test execution fails because there are no tests inside this plug-ins
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/pom.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/pom.xml 2010-05-27 23:33:05 UTC (rev 22399)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/pom.xml 2010-05-27 23:36:54 UTC (rev 22400)
@@ -10,5 +10,5 @@
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.ui.bot.ext</artifactId>
<version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
+ <packaging>eclipse-plugin</packaging>
</project>
14 years, 7 months
JBoss Tools SVN: r22399 - in trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf: kb and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-05-27 19:33:05 -0400 (Thu, 27 May 2010)
New Revision: 22399
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
part of JSF related tests are moved to jsf tests to fix test errors in tycho
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java 2010-05-27 23:33:05 UTC (rev 22399)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.kb.test;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.internal.scanner.LoadedDeclarations;
+import org.jboss.tools.jst.web.kb.internal.scanner.ScannerException;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
+import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+import junit.framework.TestCase;
+
+public class FaceletsKbModelTest extends TestCase {
+
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = true;
+
+ public FaceletsKbModelTest() {
+ super("Kb Model Test");
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jsf.kb.test",
+ null,"TestKbModel" ,true);
+ project = provider.getProject();
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ this.project.build(IncrementalProjectBuilder.FULL_BUILD, null);
+ }
+
+ private IKbProject getKbProject() {
+ IKbProject kbProject = null;
+ try {
+ kbProject = (IKbProject)project.getNature(IKbProject.NATURE_ID);
+ } catch (Exception e) {
+ JUnitUtils.fail("Cannot get seam nature.",e);
+ }
+ return kbProject;
+ }
+
+ public void testTldXMLScanner() {
+ IKbProject kbProject = getKbProject();
+
+ IFile f = project.getFile("WebContent/WEB-INF/faces-config.xml");
+ assertNotNull(f);
+ XMLScanner scanner = new XMLScanner();
+ List<ITagLibrary> ls = null;
+ try {
+ LoadedDeclarations ds = scanner.parse(f, kbProject);
+ ls = ds.getLibraries();
+ } catch (ScannerException e) {
+ JUnitUtils.fail("Error in xml scanner",e);
+ }
+ assertEquals(1, ls.size());
+ assertTrue(ls.get(0).getComponents().length > 0);
+
+ ls = null;
+ f = project.getFile("WebContent/facelet-taglib.xml");
+ assertNotNull(f);
+ try {
+ LoadedDeclarations ds = scanner.parse(f, kbProject);
+ ls = ds.getLibraries();
+ } catch (ScannerException e) {
+ JUnitUtils.fail("Error in xml scanner",e);
+ }
+ assertEquals(1, ls.size());
+ assertTrue(ls.get(0).getComponents().length > 0);
+
+ ls = null;
+ f = project.getFile("WebContent/facelet-taglib2.xml");
+ assertNotNull(f);
+ try {
+ LoadedDeclarations ds = scanner.parse(f, kbProject);
+ ls = ds.getLibraries();
+ } catch (ScannerException e) {
+ JUnitUtils.fail("Error in xml scanner",e);
+ }
+ assertEquals(1, ls.size());
+ assertTrue(ls.get(0).getComponents().length > 0);
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/kb/test/FaceletsKbModelTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 7 months
JBoss Tools SVN: r22397 - in trunk/jst: plugins/org.jboss.tools.jst.web.kb/META-INF and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-05-27 19:25:20 -0400 (Thu, 27 May 2010)
New Revision: 22397
Removed:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/META-INF/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/classes/demo/
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/common-annotations.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-beanutils.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-collections.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-digester.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-logging.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jsf-api.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jstl.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/standard.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/index.jsp
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/hello.jsp
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/ant/
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties
trunk/jst/tests/org.jboss.tools.jst.css.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.css.test/build.properties
trunk/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.jsp.test/build.properties
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/build.properties
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/.project
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.test/build.properties
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties
Log:
https://jira.jboss.org/browse/JBDS-1202 problems running tests
tycho related manifest errors fixed to let it find tests in test plug-ins
test project adjusted to have only resources relevant for test
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.jst.web.kb;singleton:=true
Bundle-Localization: plugin
Bundle-Version: 3.1.0.qualifier
-Bundle-ClassPath: webKb.jar
Bundle-Activator: org.jboss.tools.jst.web.kb.WebKbPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,11 +1,11 @@
bin.includes = plugin.xml,\
META-INF/,\
plugin.properties,\
- webKb.jar,\
+ .,\
about.html,\
schema/,\
taglibs/
-source.webKb.jar = src/,\
- resources/
-output.webKb.jar = bin/
-jars.compile.order = webKb.jar
+source.. = src/,\
+ resources/
+output.. = bin/
+jars.compile.order = .
Modified: trunk/jst/tests/org.jboss.tools.jst.css.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.css.test/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.css.test/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -4,7 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.jst.css.test;singleton:=true
Bundle-Version: 3.1.0.qualifier
Bundle-Activator: org.jboss.tools.jst.css.test.CSSTestPlugin
-Bundle-ClassPath: css-test.jar
Require-Bundle: org.eclipse.core.runtime,
org.junit,
org.jboss.tools.tests,
Modified: trunk/jst/tests/org.jboss.tools.jst.css.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.css.test/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.css.test/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,7 +1,6 @@
bin.includes = META-INF/,\
- css-test.jar,\
plugin.properties,\
resources/
-source.css-test.jar = src/
-jars.compile.order = css-test.jar
-output.css-test.jar = bin/
+jars.compile.order = .
+source.. = src/
+output.. = bin/
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -15,11 +15,11 @@
org.jboss.tools.jst.jsp,
org.jboss.tools.common.text.ext,
org.jboss.tools.jst.web,
- org.jboss.tools.common.text.xml;bundle-version="2.0.0"
+ org.jboss.tools.common.text.xml;bundle-version="2.0.0",
+ org.jboss.tools.jst.web.kb;bundle-version="3.1.0"
Export-Package:
org.jboss.tools.jst.jsp.test,
org.jboss.tools.jst.jsp.test.ca
-Bundle-ClassPath: jst-jsp-test.jar
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,5 +1,5 @@
bin.includes = META-INF/,\
projects/,\
- jst-jsp-test.jar,\
+ .,\
plugin.properties
-source.jst-jsp-test.jar = src/
+source.. = src/
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -15,4 +15,3 @@
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.jst.web.kb.test
-Bundle-ClassPath: jst-web-kb-tests.jar
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,11 +1,11 @@
output.. = bin/
bin.includes = META-INF/,\
projects/,\
- jst-web-kb-tests.jar,\
+ .,\
plugin.properties
src.includes = src/,\
projects/,\
build.properties,\
META-INF/
-source.jst-web-kb-tests.jar = src/
+source.. = src/
additional.bundles = org.jboss.tools.common.model
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/.project 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/.project 2010-05-27 23:25:20 UTC (rev 22397)
@@ -6,11 +6,6 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
@@ -21,16 +16,6 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.common.verification.verifybuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.jboss.tools.jst.web.kb.kbbuilder</name>
<arguments>
</arguments>
@@ -42,7 +27,6 @@
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.jboss.tools.jsf.jsfnature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.jboss.tools.jst.web.kb.kbnature</nature>
</natures>
</projectDescription>
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/common-annotations.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-beanutils.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-collections.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-digester.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/commons-logging.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/jstl.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/WEB-INF/lib/standard.jar
===================================================================
(Binary files differ)
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/index.jsp
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/index.jsp 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/index.jsp 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,7 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-
-<html>
- <body>
- <jsp:forward page="/pages/inputUserName.jsf" />
- </body>
-</html>
\ No newline at end of file
Deleted: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/hello.jsp
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/hello.jsp 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/hello.jsp 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,20 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-
-<f:loadBundle var="Message" basename="demo.Messages" />
-
-<html>
- <head>
- <title>Hello!</title>
- </head>
-
- <body>
- <f:view>
- <h3>
- <h:outputText value="#{Message.hello_message}" />,
- <h:outputText value="#{user.name}" />!
- </h3>
- </f:view>
- </body>
-
-</html>
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/KbModelTest.java 2010-05-27 23:25:20 UTC (rev 22397)
@@ -55,47 +55,14 @@
return kbProject;
}
- public void testXMLScanner() {
+ public void testTldXMLScanner() {
IKbProject kbProject = getKbProject();
IFile f = project.getFile("WebContent/WEB-INF/faces-config.xml");
assertNotNull(f);
XMLScanner scanner = new XMLScanner();
List<ITagLibrary> ls = null;
- try {
- LoadedDeclarations ds = scanner.parse(f, kbProject);
- ls = ds.getLibraries();
- } catch (ScannerException e) {
- JUnitUtils.fail("Error in xml scanner",e);
- }
- assertEquals(1, ls.size());
- assertTrue(ls.get(0).getComponents().length > 0);
-
ls = null;
- f = project.getFile("WebContent/facelet-taglib.xml");
- assertNotNull(f);
- try {
- LoadedDeclarations ds = scanner.parse(f, kbProject);
- ls = ds.getLibraries();
- } catch (ScannerException e) {
- JUnitUtils.fail("Error in xml scanner",e);
- }
- assertEquals(1, ls.size());
- assertTrue(ls.get(0).getComponents().length > 0);
-
- ls = null;
- f = project.getFile("WebContent/facelet-taglib2.xml");
- assertNotNull(f);
- try {
- LoadedDeclarations ds = scanner.parse(f, kbProject);
- ls = ds.getLibraries();
- } catch (ScannerException e) {
- JUnitUtils.fail("Error in xml scanner",e);
- }
- assertEquals(1, ls.size());
- assertTrue(ls.get(0).getComponents().length > 0);
-
- ls = null;
f = project.getFile("WebContent/WEB-INF/taglib2.tld");
assertNotNull(f);
try {
@@ -113,15 +80,15 @@
// }
}
- public void testKbProjectObjects() {
+ public void toDoTestKbProjectObjects() {
}
- public void testXMLSerialization() {
+ public void toDoXMLSerialization() {
}
- public void testCleanBuild() {
+ public void toDoCleanBuild() {
}
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -9,6 +9,5 @@
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.jst.web.test
-Bundle-ClassPath: jst-web-tests.jar
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jst/tests/org.jboss.tools.jst.web.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.test/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.test/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,10 +1,10 @@
output.. = bin/
bin.includes = META-INF/,\
projects/,\
- jst-web-tests.jar,\
+ .,\
plugin.properties
src.includes = src/,\
projects/,\
build.properties,\
META-INF/
-source.jst-web-tests.jar = src/
+source.. = src/
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/META-INF/MANIFEST.MF 2010-05-27 23:25:20 UTC (rev 22397)
@@ -12,6 +12,5 @@
org.jboss.tools.tests,
org.eclipse.ui.ide
Export-Package: org.jboss.tools.jst.web.ui.test
-Bundle-ClassPath: jst-web-ui.jar
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties 2010-05-27 23:22:43 UTC (rev 22396)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/build.properties 2010-05-27 23:25:20 UTC (rev 22397)
@@ -1,6 +1,6 @@
output.. = bin/
bin.includes = META-INF/,\
- jst-web-ui.jar,\
+ .,\
plugin.properties,\
projects/
-source.jst-web-ui.jar = src/
+source.. = src/
14 years, 7 months