JBoss Tools SVN: r29911 - in trunk/cdi/plugins: org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-03-18 19:55:10 -0400 (Fri, 18 Mar 2011)
New Revision: 29911
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java
Removed:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeletePreviewWizard.java
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/CDIValidationErrorManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllDisposerDuplicantMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
Log:
https://issues.jboss.org/browse/JBIDE-8201
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 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -1633,7 +1633,7 @@
if (Flags.isPublic(field.getFlags()) && !Flags.isStatic(field.getFlags())) {
ITextSourceReference fieldReference = CDIUtil.convertToSourceReference(field.getNameRange());
addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN,
- fieldReference, bean.getResource());
+ fieldReference, bean.getResource(), ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID);
}
}
/*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -27,6 +27,7 @@
public static final int UNSATISFIED_INJECTION_POINTS_ID = 7;
public static final int AMBIGUOUS_INJECTION_POINTS_ID = 8;
public static final int NOT_PASSIVATION_CAPABLE_BEAN_ID = 9;
+ public static final int ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID = 10;
/*
* (non-Javadoc)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -93,7 +93,12 @@
public static String MAKE_INJECTED_POINT_UNAMBIGUOUS_TITLE;
public static String SELECT_BEAN_TITLE;
public static String ADD_SERIALIZABLE_INTERFACE_MARKER_RESOLUTION_TITLE;
+ public static String MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE;
+ public static String MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE;
+ public static String QUESTION;
+ public static String DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS;
+
public static String SELECT_BEAN_WIZARD_TITLE;
public static String SELECT_BEAN_WIZARD_ENTER_BEAN_NAME;
public static String SELECT_BEAN_WIZARD_SELECT_BEAN;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2011-03-18 23:55:10 UTC (rev 29911)
@@ -77,7 +77,13 @@
MAKE_INJECTED_POINT_UNAMBIGUOUS_TITLE=Specify ''{0}'' bean for injection to the injection point
SELECT_BEAN_TITLE=Select bean to configure the injection point
ADD_SERIALIZABLE_INTERFACE_MARKER_RESOLUTION_TITLE=Add java.io.Serializable interface to ''{0}'' class
+MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE=Make ''{0}'' bean scoped @Dependent
+MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE=Make ''{0}'' field protected
+QUESTION=Question
+DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS=Decreasing field visibility may cause compilation problems. Do you want to continue?
+
+
SELECT_BEAN_WIZARD_TITLE=Specify CDI Bean for the Injection Point
SELECT_BEAN_WIZARD_ENTER_BEAN_NAME=Enter CDI Bean name prefix or pattern (? = any character, * = any string):
SELECT_BEAN_WIZARD_SELECT_BEAN=Select CDI Bean:
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.ui.marker;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -155,6 +156,26 @@
new AddSerializableInterfaceMarkerResolution(type, file)
};
}
+ }else if(messageId == CDIValidationErrorManager.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD_ID){
+ IField field = findPublicField(file, start);
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
+ if(cdiNature != null){
+ ICDIProject cdiProject = cdiNature.getDelegate();
+
+ if(cdiProject != null){
+ Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+ Iterator<IBean> iter = beans.iterator();
+ if(iter.hasNext()){
+ IBean bean = iter.next();
+ if(field != null){
+ return new IMarkerResolution[] {
+ new MakeFieldProtectedMarkerResolution(field, file)//,
+ //new MakeBeanScopedDependentMarkerResolution(bean, file)
+ };
+ }
+ }
+ }
+ }
}
}
return new IMarkerResolution[] {};
@@ -317,6 +338,21 @@
}
return null;
}
+
+ private IField findPublicField(IFile file, int start){
+ try{
+ IJavaElement javaElement = findJavaElement(file, start);
+
+ if(javaElement != null && javaElement instanceof IField){
+ IField field = (IField)javaElement;
+ if(Flags.isPublic(field.getFlags()) && !field.isBinary())
+ return field;
+ }
+ }catch(JavaModelException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ return null;
+ }
public boolean hasResolutions(IMarker marker) {
try {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllDisposerDuplicantMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllDisposerDuplicantMarkerResolution.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllDisposerDuplicantMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -17,12 +17,10 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring;
import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.internal.Workbench;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.wizard.DeletePreviewWizard;
/**
* @author Daniel Azarov
@@ -47,8 +45,7 @@
DeleteAllDisposerAnnotationsProcessor processor = new DeleteAllDisposerAnnotationsProcessor(file, method, label);
ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(processor);
DeletePreviewWizard wizard = new DeletePreviewWizard(refactoring);
- RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
- Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
+ //RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
wizard.showWizard();
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -18,13 +18,10 @@
import org.eclipse.jdt.core.Signature;
import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring;
import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.internal.Workbench;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.wizard.DeletePreviewWizard;
/**
* @author Daniel Azarov
@@ -58,7 +55,7 @@
DeleteAllInjectedConstructorsProcessor processor = new DeleteAllInjectedConstructorsProcessor(file, method, label);
ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(processor);
DeletePreviewWizard wizard = new DeletePreviewWizard(refactoring);
- RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
+ //RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
wizard.showWizard();
}
Deleted: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeletePreviewWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeletePreviewWizard.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeletePreviewWizard.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.ui.marker;
-
-import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
-import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
-import org.eclipse.ltk.core.refactoring.Refactoring;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-public class DeletePreviewWizard extends RefactoringWizard {
-
- public DeletePreviewWizard(Refactoring refactoring) {
- super(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
- //setForcePreviewReview(false);
- }
-
- @Override
- protected void addUserInputPages() {
- }
-
- public boolean showWizard() {
- final IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- final Shell shell = win.getShell();
- final RefactoringStarter refactoringStarter = new RefactoringStarter();
- boolean res = refactoringStarter.activate(this, shell, getWindowTitle(), RefactoringSaveHelper.SAVE_ALL);
- //RefactoringStatus rs = refactoringStarter.getInitialConditionCheckingStatus();
- return res;
- }
-
-
-}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.marker;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution2;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+
+/**
+ * @author Daniel Azarov
+ */
+public class MakeBeanScopedDependentMarkerResolution implements IMarkerResolution2{
+ private String label;
+ private IBean bean;
+ private IFile file;
+
+ public MakeBeanScopedDependentMarkerResolution(IBean bean, IFile file){
+ this.label = MessageFormat.format(CDIUIMessages.MAKE_BEAN_SCOPED_DEPENDENT_MARKER_RESOLUTION_TITLE, new Object[]{bean.getBeanClass().getElementName()});
+ this.bean = bean;
+ this.file = file;
+ }
+
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ @Override
+ public void run(IMarker marker) {
+ }
+
+ @Override
+ public String getDescription() {
+ return null;
+ }
+
+ @Override
+ public Image getImage() {
+ return null;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeBeanScopedDependentMarkerResolution.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.marker;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IMarkerResolution2;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.common.EclipseUtil;
+
+/**
+ * @author Daniel Azarov
+ */
+public class MakeFieldProtectedMarkerResolution implements IMarkerResolution2{
+ private static final String PUBLIC = "public"; //$NON-NLS-1$
+ private static final String PROTECTED = "protected"; //$NON-NLS-1$
+
+ private String label;
+ private IField field;
+ private IFile file;
+
+ public MakeFieldProtectedMarkerResolution(IField field, IFile file){
+ this.label = MessageFormat.format(CDIUIMessages.MAKE_FIELD_PROTECTED_MARKER_RESOLUTION_TITLE, new Object[]{field.getElementName()});
+ this.field = field;
+ this.file = file;
+ }
+
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ @Override
+ public void run(IMarker marker) {
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ boolean cont = MessageDialog.openQuestion(shell, CDIUIMessages.QUESTION, CDIUIMessages.DECREASING_FIELD_VISIBILITY_MAY_CAUSE_COMPILATION_PROBLEMS);
+ if(!cont)
+ return;
+ try{
+ ICompilationUnit original = EclipseUtil.getCompilationUnit(file);
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+
+ IBuffer buffer = compilationUnit.getBuffer();
+
+ int flag = field.getFlags();
+
+ String text = buffer.getText(field.getSourceRange().getOffset(), field.getSourceRange().getLength());
+
+ int position = field.getSourceRange().getOffset();
+ if((flag & Flags.AccPublic) != 0){
+ position += text.indexOf(PUBLIC);
+ buffer.replace(position, PUBLIC.length(), PROTECTED);
+ }
+
+ compilationUnit.commitWorkingCopy(false, new NullProgressMonitor());
+ compilationUnit.discardWorkingCopy();
+ }catch(CoreException ex){
+ CDIUIPlugin.getDefault().logError(ex);
+ }
+ }
+
+ @Override
+ public String getDescription() {
+ return null;
+ }
+
+ @Override
+ public Image getImage() {
+ return null;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeFieldProtectedMarkerResolution.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -22,7 +22,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -61,7 +61,7 @@
private void internal_run(IMarker marker, boolean test) {
if(checkBeans()){
- Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
AddQualifiersToBeanWizard wizard = new AddQualifiersToBeanWizard(injectionPoint, beans, selectedBean);
WizardDialog dialog = new WizardDialog(shell, wizard);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeMethodBusinessMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -11,7 +11,6 @@
package org.jboss.tools.cdi.ui.marker;
import java.text.MessageFormat;
-import java.util.HashSet;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -20,9 +19,7 @@
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IBuffer;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IImportDeclaration;
import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IPackageDeclaration;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-03-18 18:53:42 UTC (rev 29910)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -20,7 +20,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IInjectionPoint;
@@ -55,7 +55,7 @@
}
private void internal_run(IMarker marker, boolean test) {
- Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
SelectBeanWizard wizard = new SelectBeanWizard(injectionPoint, beans);
WizardDialog dialog = new WizardDialog(shell, wizard);
Copied: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java (from rev 29904, trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeletePreviewWizard.java)
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java 2011-03-18 23:55:10 UTC (rev 29911)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.ui.wizard;
+
+import org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter;
+import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+public class DeletePreviewWizard extends RefactoringWizard {
+
+ public DeletePreviewWizard(Refactoring refactoring) {
+ super(refactoring, RefactoringWizard.WIZARD_BASED_USER_INTERFACE);
+ //setForcePreviewReview(false);
+ }
+
+ @Override
+ protected void addUserInputPages() {
+ }
+
+ public boolean showWizard() {
+ final IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ final Shell shell = win.getShell();
+ final RefactoringStarter refactoringStarter = new RefactoringStarter();
+ boolean res = refactoringStarter.activate(this, shell, getWindowTitle(), RefactoringSaveHelper.SAVE_ALL);
+ //RefactoringStatus rs = refactoringStarter.getInitialConditionCheckingStatus();
+ return res;
+ }
+
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/DeletePreviewWizard.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 10 months
JBoss Tools SVN: r29910 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-03-18 14:53:42 -0400 (Fri, 18 Mar 2011)
New Revision: 29910
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsUtils.java
Log:
https://issues.jboss.org/browse/JBIDE-7004 , validation for duplicate key was added.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java 2011-03-18 18:48:39 UTC (rev 29909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsKeysListPage.java 2011-03-18 18:53:42 UTC (rev 29910)
@@ -12,13 +12,16 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.viewers.CellEditor;
@@ -33,11 +36,17 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.wst.validation.ValidationFramework;
@@ -50,8 +59,12 @@
private static final String KEY_PROPERTY = "key"; //$NON-NLS-1$
private static final String VALUE_PROPERTY = "value"; //$NON-NLS-1$
- private List<KeyValueElement> keys = new ArrayList<KeyValueElement>();
- private IDocument doc = null;
+ Color red;
+ Color white;
+ private List<KeyValueElement> initKeys;
+ private IDocument doc;
+ Properties properties;
+ TableViewer tv;
protected ExternalizeAllStringsKeysListPage(String pageName) {
super(pageName,
@@ -63,12 +76,16 @@
@Override
public void createControl(Composite parent) {
- keys = getAllStrings();
- Table table = createTable(parent);
- setControl(table);
+ red = parent.getDisplay().getSystemColor(SWT.COLOR_RED);
+ white = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+ initKeys = getAllNonExternalizedStrings();
+ Collections.sort(initKeys, Collections.reverseOrder());
+ tv = createTable(parent);
+ highlightAllDuplicateKeys(tv);
+ setControl(tv.getTable());
}
- private List<KeyValueElement> getAllStrings() {
+ private List<KeyValueElement> getAllNonExternalizedStrings() {
List<KeyValueElement> keys = new ArrayList<KeyValueElement>();
if (getWizard() instanceof ExternalizeAllStringsWizard) {
ExternalizeAllStringsWizard wiz = (ExternalizeAllStringsWizard) getWizard();
@@ -93,7 +110,7 @@
text = doc.get(offset.intValue(), length.intValue());
keys.add(new KeyValueElement(
ExternalizeStringsUtils.generatePropertyKey(text),
- text, offset.intValue(), length.intValue()));
+ text, offset.intValue(), length.intValue(), false));
} catch (BadLocationException e) {
e.printStackTrace();
}
@@ -103,17 +120,79 @@
}
}
}
+ markAllDuplicatedKeys(keys);
return keys;
}
- private Table createTable(Composite parent) {
+ private void markAllDuplicatedKeys(List<KeyValueElement> keys) {
+ /*
+ * Check for duplicated keys and mark corresponding elements
+ */
+ if (properties != null) {
+ for (KeyValueElement k : keys) {
+ if(isDuplicatedBundleKey(k.key)) {
+ k.duplicated = true;
+ }
+ }
+ }
+ }
+
+ private void markAllDuplicatedKeys(TableViewer tv) {
+ for (int i = 0; i < tv.getTable().getItemCount(); i++) {
+ KeyValueElement k = (KeyValueElement) tv.getElementAt(i);
+ if(isDuplicatedBundleKey(k.key)) {
+ k.duplicated = true;
+ }
+ }
+ }
+
+ private boolean isDuplicatedBundleKey(String key) {
+ boolean duplicated = false;
+ if (properties != null) {
+ for (Iterator it = properties.keySet().iterator(); it.hasNext();) {
+ String original = (String) it.next();
+ if (original.equalsIgnoreCase(key)) {
+ duplicated = true;
+ break;
+ }
+ }
+ }
+ return duplicated;
+ }
+
+ private boolean isDuplicatedStringKey(KeyValueElement element, String newKey) {
+ boolean duplicated = false;
+ for (KeyValueElement k : initKeys) {
+ if (!k.equals(element) && k.key.equalsIgnoreCase(newKey)) {
+ duplicated = true;
+ }
+ }
+ return duplicated;
+ }
+
+ private void highlightAllDuplicateKeys(TableViewer tv) {
+ for (int i = 0; i < tv.getTable().getItemCount(); i++) {
+ highlightDuplicateKey(tv.getTable().getItem(i),
+ ((KeyValueElement) tv.getElementAt(i)).duplicated);
+ }
+ }
+
+ private void highlightDuplicateKey(TableItem ti, boolean duplicated) {
+ if (duplicated) {
+ ti.setBackground(0, red);
+ } else {
+ ti.setBackground(0, white);
+ }
+ }
+
+ private TableViewer createTable(Composite parent) {
Table table = new Table(parent, SWT.FULL_SELECTION | SWT.BORDER);
TableViewer tv = layoutTableInViewer(table);
attachContentProvider(tv);
attachLabelProvider(tv);
attachCellEditors(tv, table);
- addProperties(tv);
- return table;
+ addInitialKeysValues(tv);
+ return tv;
}
private TableViewer layoutTableInViewer(Table table) {
@@ -193,14 +272,65 @@
viewer.refresh(kve);
}
});
+ TextCellEditor keyEditor = new TextCellEditor(parent);
+ /*
+ * TODO: cell validator should be added after bug
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=130854
+ * is fixed.
+ */
+// keyEditor.setValidator(new ICellEditorValidator() {
+// @Override
+// public String isValid(Object value) {
+// return null;
+// }
+// });
+ ((Text)keyEditor.getControl()).addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ Text t = (Text) e.getSource();
+ Table table = (Table) t.getParent();
+ int ind = table.getSelectionIndex();
+ KeyValueElement element = (KeyValueElement) viewer.getElementAt(ind);
+ TableItem ti = table.getItem(ind);
+ String key = t.getText();
+ /*
+ * Check duplicate key, set bkg color to red
+ * Setting new key value is called after this modyfy listener,
+ * thus pass new key value manually.
+ */
+ if (isDuplicatedBundleKey(key) || isDuplicatedStringKey(element, key)) {
+ element.duplicated = true;
+ highlightDuplicateKey(ti, true);
+ t.setBackground(red);
+ } else {
+ element.duplicated = false;
+ highlightDuplicateKey(ti, false);
+ t.setBackground(white);
+ }
+ updateStatus();
+ }
+ });
+ ((Text)keyEditor.getControl()).addVerifyListener(new VerifyListener() {
+ public void verifyText(VerifyEvent e) {
+ for (int i = 0; i < ExternalizeStringsUtils.REPLACED_CHARACTERS.length; i++) {
+ /*
+ * Entering of the forbidden characters will be prevented.
+ */
+ if (e.character == ExternalizeStringsUtils.REPLACED_CHARACTERS[i]) {
+ e.doit = false;
+ break;
+ }
+ }
+ }
+ });
viewer.setCellEditors(new CellEditor[] {
- new TextCellEditor(parent), null });
+ keyEditor, null });
viewer.setColumnProperties(new String[] {
KEY_PROPERTY, VALUE_PROPERTY });
}
- private void addProperties(TableViewer viewer) {
- for (KeyValueElement k : keys) {
+ private void addInitialKeysValues(TableViewer viewer) {
+ for (KeyValueElement k : initKeys) {
viewer.add(k);
}
}
@@ -212,9 +342,14 @@
*/
public String getKeyValuePairsList() {
StringBuffer sb = new StringBuffer();
- for (KeyValueElement k : keys) {
- sb.append(k.key + Constants.EQUAL + k.value);
- sb.append('\n');
+ for (KeyValueElement k : initKeys) {
+ /*
+ * Element with duplicated key will be excluded.
+ */
+ if (!k.duplicated) {
+ sb.append(k.key + Constants.EQUAL + k.value);
+ sb.append('\n');
+ }
}
return sb.toString();
}
@@ -230,11 +365,16 @@
/*
* Go from the end to the top of the file.
*/
- Collections.sort(keys);
- for (int i = keys.size()-1; i >= 0; i--) {
- KeyValueElement k = keys.get(i);
+ Collections.sort(initKeys);
+ for (int i = initKeys.size()-1; i >= 0; i--) {
+ KeyValueElement k = initKeys.get(i);
try {
- doc.replace(k.offset, k.length, "#{" +bundlePrefix + Constants.DOT + k.key + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ /*
+ * Element with duplicated key won't be replaced
+ */
+ if (!k.duplicated) {
+ doc.replace(k.offset, k.length, "#{" +bundlePrefix + Constants.DOT + k.key + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
} catch (BadLocationException e) {
JspEditorPlugin.getPluginLog().logError(e);
}
@@ -242,8 +382,52 @@
}
}
+ public void updateTable(Properties p) {
+ this.properties = p;
+ boolean anyDuplicated = false;
+ for (int i = 0; i < tv.getTable().getItemCount(); i++) {
+ KeyValueElement k = (KeyValueElement) tv.getElementAt(i);
+ TableItem ti = tv.getTable().getItem(i);
+ if(isDuplicatedBundleKey(k.key) || isDuplicatedStringKey(k, k.key)) {
+ k.duplicated = true;
+ ti.setBackground(0, red);
+ anyDuplicated = true;
+ } else {
+ k.duplicated = false;
+ ti.setBackground(0, white);
+ }
+ }
+ setDuplicateWarning(anyDuplicated);
+ }
+
+ private void setDuplicateWarning(boolean anyDuplicated) {
+ if (anyDuplicated) {
+ this.setMessage("Duplicated entries won't be externalized",
+ IMessageProvider.WARNING);
+ this.setErrorMessage(null);
+ } else {
+ this.setMessage(null);
+ this.setErrorMessage(null);
+ }
+ }
+
+ private void updateStatus() {
+ boolean anyDuplicated = false;
+ for (KeyValueElement k : initKeys) {
+ if (k.duplicated) {
+ anyDuplicated = true;
+ break;
+ }
+ }
+ setDuplicateWarning(anyDuplicated);
+ }
+
@Override
public boolean isPageComplete() {
+ /*
+ * User always can complete the page
+ * Duplicate entries simply will be ignored.
+ */
return true;
}
@@ -252,11 +436,13 @@
public String value;
public int offset;
public int length;
- public KeyValueElement(String k, String v, int o, int l) {
+ public boolean duplicated;
+ public KeyValueElement(String k, String v, int o, int l, boolean d) {
key = k;
value = v;
offset = o;
length = l;
+ duplicated = d;
}
@Override
public int compareTo(KeyValueElement aThat) {
@@ -271,7 +457,7 @@
}
@Override
public int hashCode() {
- int result = 47;
+ int result = 47 + super.hashCode();
if (key != null) {
result+= key.hashCode();
}
@@ -300,8 +486,9 @@
@Override
public String toString() {
return this.getClass() + "@" + this.hashCode() //$NON-NLS-1$
- + " (key=" + this.key + ", value=" + this.value //$NON-NLS-1$ //$NON-NLS-2$
- + ", offset=" + this.offset + ", length=" + this.length + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + " (key=" + this.key + ", value=" + this.value //$NON-NLS-1$ //$NON-NLS-2$
+ + ", offset=" + this.offset + ", length=" + this.length //$NON-NLS-1$ //$NON-NLS-2$
+ + ", duplicated=" + this.duplicated + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java 2011-03-18 18:48:39 UTC (rev 29909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsSelectBundlePage.java 2011-03-18 18:53:42 UTC (rev 29910)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.jsp.i18n;
import java.io.File;
+import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.preference.FileFieldEditor;
@@ -32,6 +33,7 @@
IFile editorFile;
File bundleFile;
private FileFieldEditor fileFieldEditor;
+ Properties properties;
protected ExternalizeAllStringsSelectBundlePage(String pageName) {
super(pageName,
@@ -53,7 +55,7 @@
fileFieldEditor.setEmptyStringAllowed(false);
if (getWizard() instanceof ExternalizeAllStringsWizard) {
- ExternalizeAllStringsWizard wiz = (ExternalizeAllStringsWizard) getWizard();
+ final ExternalizeAllStringsWizard wiz = (ExternalizeAllStringsWizard) getWizard();
IEditorInput in = wiz.getEditor().getEditorInput();
if (in instanceof IFileEditorInput) {
IFileEditorInput fin = (IFileEditorInput) in;
@@ -62,22 +64,23 @@
if (null != editorFile) {
fileFieldEditor.setFilterPath(editorFile.getProject().getLocation().toFile());
}
+ final Table table = ExternalizeStringsUtils.createPropertiesTable(composite, SWT.BORDER);
+ table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,true, 3, 1));
+ fileFieldEditor.setPropertyChangeListener(new IPropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+ if (FileFieldEditor.VALUE.equalsIgnoreCase(event.getProperty())) {
+ bundleFile = new File((String)event.getNewValue());
+ properties = ExternalizeStringsUtils.populatePropertiesTable(table, bundleFile);
+ wiz.setUpdatedProperties(properties);
+ /*
+ * Set page complete
+ */
+ setPageComplete(isPageComplete());
+ }
+ }
+ });
}
- final Table table = ExternalizeStringsUtils.createPropertiesTable(composite, SWT.BORDER);
- table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,true, 3, 1));
- fileFieldEditor.setPropertyChangeListener(new IPropertyChangeListener() {
- @Override
- public void propertyChange(PropertyChangeEvent event) {
- if (FileFieldEditor.VALUE.equalsIgnoreCase(event.getProperty())) {
- bundleFile = new File((String)event.getNewValue());
- ExternalizeStringsUtils.populatePropertiesTable(table, bundleFile);
- /*
- * Set page complete
- */
- setPageComplete(isPageComplete());
- }
- }
- });
/*
* Wizard Page control should be initialized.
*/
@@ -92,4 +95,8 @@
public File getBundleFile() {
return bundleFile;
}
+
+ public Properties getOriginalProperties() {
+ return properties;
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java 2011-03-18 18:48:39 UTC (rev 29909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeAllStringsWizard.java 2011-03-18 18:53:42 UTC (rev 29910)
@@ -15,6 +15,7 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
+import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.IDocument;
@@ -108,4 +109,13 @@
return true;
}
+ public Properties getOriginalProperties() {
+ if (null != page1) {
+ return page1.getOriginalProperties();
+ }
+ return null;
+ }
+ public void setUpdatedProperties(Properties p) {
+ page2.updateTable(p);
+ }
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsUtils.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsUtils.java 2011-03-18 18:48:39 UTC (rev 29909)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsUtils.java 2011-03-18 18:53:42 UTC (rev 29910)
@@ -281,7 +281,8 @@
* @param table the UI table
* @param propertiesFile resource bundle file
*/
- public static void populatePropertiesTable(Table table, IFile propertiesFile) {
+ public static Properties populatePropertiesTable(Table table, IFile propertiesFile) {
+ Properties properties = null;
if ((propertiesFile != null) && propertiesFile.exists()) {
BufferedReader in = null;
try {
@@ -291,7 +292,7 @@
String encoding = FileUtil.getEncoding(propertiesFile);
in = new BufferedReader(new InputStreamReader(
propertiesFile.getContents(), encoding));
- readFileToProperies(table, in);
+ properties = readFileToProperies(table, in);
in.close();
} catch (CoreException e) {
JspEditorPlugin.getDefault().logError(
@@ -307,9 +308,11 @@
JspEditorPlugin.getDefault().logError(
"Bundle File '" + propertiesFile + "' does not exist!"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ return properties;
}
- public static void populatePropertiesTable(Table table, File propertiesFile) {
+ public static Properties populatePropertiesTable(Table table, File propertiesFile) {
+ Properties properties = null;
if ((propertiesFile != null) && (propertiesFile.exists())) {
/*
* Read the file content
@@ -317,7 +320,7 @@
FileReader fr = null;
try {
fr = new FileReader(propertiesFile);
- readFileToProperies(table, fr);
+ properties = readFileToProperies(table, fr);
fr.close();
} catch (FileNotFoundException e) {
JspEditorPlugin.getDefault().logError(e);
@@ -331,10 +334,11 @@
JspEditorPlugin.getDefault().logError(
"Bundle File '" + propertiesFile + "' does not exist!"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ return properties;
}
- private static void readFileToProperies(Table table, Reader r) {
- Properties properties = new Properties();
+ private static Properties readFileToProperies(Table table, Reader r) {
+ Properties properties = new Properties();
try {
properties.load(r);
r.close();
@@ -359,6 +363,7 @@
k++;
tableItem.setText(new String[] {key, properties.getProperty(key)});
}
+ return properties;
}
/**
13 years, 10 months
JBoss Tools SVN: r29909 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-18 14:48:39 -0400 (Fri, 18 Mar 2011)
New Revision: 29909
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
Log:
JBIDE-8271
Help text for CDI filed conent assist proposal contains unnecessary text with weird symbols in header and doesn't contains any text in case of missing javadoc
Unnecessary empty lines were removed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2011-03-18 18:45:10 UTC (rev 29908)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AutoELContentAssistantProposal.java 2011-03-18 18:48:39 UTC (rev 29909)
@@ -178,7 +178,8 @@
}
if (reader != null) {
- HTMLPrinter.addParagraph(buffer, reader);
+ buffer.append(HTMLPrinter.read(reader));
+// HTMLPrinter.addParagraph(buffer, reader);
}
} else if (element.getElementType() == IJavaElement.LOCAL_VARIABLE || element.getElementType() == IJavaElement.TYPE_PARAMETER) {
13 years, 10 months
JBoss Tools SVN: r29908 - branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-18 14:45:10 -0400 (Fri, 18 Mar 2011)
New Revision: 29908
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-18 18:41:35 UTC (rev 29907)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-18 18:45:10 UTC (rev 29908)
@@ -3293,7 +3293,7 @@
</ICONS>
</XEntityRenderer>
<XModelAttributes>
- <XModelAttribute default="route to" loader="ElementType" name="element type">
+ <XModelAttribute default="object path" loader="ElementType" name="element type">
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
13 years, 10 months
JBoss Tools SVN: r29907 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-18 14:41:35 -0400 (Fri, 18 Mar 2011)
New Revision: 29907
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
JBIDE-8567
https://issues.jboss.org/browse/JBIDE-8567
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-18 17:45:44 UTC (rev 29906)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2011-03-18 18:41:35 UTC (rev 29907)
@@ -3293,7 +3293,7 @@
</ICONS>
</XEntityRenderer>
<XModelAttributes>
- <XModelAttribute default="route to" loader="ElementType" name="element type">
+ <XModelAttribute default="object path" loader="ElementType" name="element type">
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
13 years, 10 months
JBoss Tools SVN: r29906 - in branches/jbosstools-3.2.x: common/plugins/org.jboss.tools.common.model.ui/META-INF and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-18 13:45:44 -0400 (Fri, 18 Mar 2011)
New Revision: 29906
Added:
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
Modified:
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/pom.xml
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/pom.xml
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml
branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/pom.xml
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml
branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java
Log:
JBIDE-8546
Ctrl+Shift+> Matching tag shortcut broken in JBoss Tools HTML Editor.
Issue is fixed. Fixed for 3.2.1
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2011-03-18 17:45:44 UTC (rev 29906)
@@ -93,6 +93,6 @@
org.jboss.tools.common.ui,
org.eclipse.jst.standard.schemas,
org.eclipse.wst.standard.schemas
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: org.jboss.tools.common.model.ui.jar
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/pom.xml 2011-03-18 17:45:44 UTC (rev 29906)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.common</groupId>
<artifactId>org.jboss.tools.common.model.ui</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.model.ui.texteditors;
@@ -31,9 +31,11 @@
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.jboss.tools.common.text.xml.ui.TextEditorMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
public abstract class AbstractMultiPageContributor extends MultiPageEditorActionBarContributor {
-
+ protected static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
/** The global actions to be connected with editor actions */
protected final static String[] ACTIONS= {
ITextEditorActionConstants.UNDO,
@@ -96,7 +98,8 @@
protected RetargetTextEditorAction fContentAssistTip;
protected TextEditorAction fToggleOccurencesMarkUp;
-
+ protected GoToMatchingTagAction fGoToMatchingTagAction;
+
public AbstractMultiPageContributor() {
super();
createAssistObjects();
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -1,15 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.model.ui.texteditors;
+import java.util.ResourceBundle;
+
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;
@@ -18,6 +20,8 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
/**
@@ -25,10 +29,17 @@
*
*/
public class MultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
protected FakeTextEditor fakeTextEditor = new FakeTextEditor();
public MultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void init(IActionBars bars) {
@@ -78,9 +89,16 @@
actionBars.updateActionBars();
}
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ ITextEditor textEditor = getTextEditor(part);
+
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2011-03-18 17:45:44 UTC (rev 29906)
@@ -27,5 +27,5 @@
org.eclipse.core.resources,
org.eclipse.wst.xsd.ui,
org.eclipse.wst.dtd.ui
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/pom.xml 2011-03-18 17:45:44 UTC (rev 29906)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.common</groupId>
<artifactId>org.jboss.tools.common.text.xml</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Added: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
===================================================================
--- branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java (rev 0)
+++ branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.jboss.tools.common.text.xml.xpl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
+
+/**
+ * Moves the cursor to the end tag if it is in a start tag, and vice versa.
+ * Also updates the matching tag annotation in the active editor.
+ *
+ * @author nitin
+ *
+ */
+public class GoToMatchingTagAction extends TextEditorAction {
+
+ private class UpdateListener implements ISelectionChangedListener {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateFor(event.getSelection());
+ }
+ }
+
+ private static final String ANNOTATION_TYPE = "org.eclipse.wst.xml.ui.matching.tag"; //$NON-NLS-1$
+ private ISelectionChangedListener fUpdateListener = null;
+ static final boolean DEBUG = false;
+
+ /**
+ * @param bundle
+ * @param prefix
+ * @param editor
+ * @param style
+ */
+ public GoToMatchingTagAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
+ super(bundle, prefix, editor);
+ fUpdateListener = new UpdateListener();
+ }
+
+ void removeAnnotation(boolean allMatching) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor == null) {
+ if (DEBUG) {
+ System.out.println("no editor"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ if (DEBUG) {
+ System.out.println("no document provider"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ if (annotationModel == null) {
+ if (DEBUG) {
+ System.out.println("no annotation model"); //$NON-NLS-1$
+ }
+ return;
+ }
+
+ Iterator annotationIterator = annotationModel.getAnnotationIterator();
+ List oldAnnotations = new ArrayList();
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ if (ANNOTATION_TYPE.equals(annotation.getType())) {
+ annotation.markDeleted(true);
+ /**
+ * Sometimes it is supported, sometime's it is not. Confusing.
+ */
+ try {
+ annotationIterator.remove();
+ }
+ catch (UnsupportedOperationException e) {
+ oldAnnotations.add(annotation);
+ }
+ if (DEBUG) {
+ System.out.println("removed " + annotation); //$NON-NLS-1$
+ }
+ if (!allMatching)
+ break;
+ }
+ }
+ if (!oldAnnotations.isEmpty()) {
+ int size = oldAnnotations.size();
+ for (int i = 0; i < size; i++) {
+ annotationModel.removeAnnotation((Annotation) oldAnnotations.get(i));
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
+ */
+ public void runWithEvent(Event event) {
+ super.runWithEvent(event);
+ if (getTextEditor() == null)
+ return;
+
+ ISelection selection = getTextEditor().getSelectionProvider().getSelection();
+ if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
+ Object o = ((IStructuredSelection) selection).getFirstElement();
+ if (o instanceof IDOMNode) {
+ int offset = ((ITextSelection) selection).getOffset();
+ IStructuredDocumentRegion matchRegion = null;
+ if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
+ o = ((Attr) o).getOwnerElement();
+ }
+
+ int targetOffset = -1;
+ if (o instanceof IDOMNode) {
+ IDOMNode node = (IDOMNode) o;
+ IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
+ if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
+ matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
+ if (matchRegion != null)
+ targetOffset = matchRegion.getStartOffset() + 2;
+ }
+ else {
+ IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
+ if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
+ matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
+ if (matchRegion != null)
+ targetOffset = matchRegion.getStartOffset() + 1;
+ }
+ }
+ }
+
+ if (targetOffset >= 0) {
+ getTextEditor().getSelectionProvider().setSelection(new TextSelection(targetOffset, 0));
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.texteditor.TextEditorAction#setEditor(org.eclipse.ui.texteditor.ITextEditor)
+ */
+ public void setEditor(ITextEditor editor) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor != null) {
+ removeAnnotation(true);
+
+ ISelectionProvider selectionProvider = textEditor.getSelectionProvider();
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) selectionProvider).removePostSelectionChangedListener(fUpdateListener);
+ }
+ }
+ super.setEditor(editor);
+ if (editor != null) {
+ ISelectionProvider selectionProvider = editor.getSelectionProvider();
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) selectionProvider).addPostSelectionChangedListener(fUpdateListener);
+ }
+
+ updateFor(selectionProvider.getSelection());
+ }
+ }
+
+ public void update() {
+ setEnabled(true);
+
+ }
+
+ void updateFor(ISelection selection) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor == null) {
+ if (DEBUG) {
+ System.out.println("no editor"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ if (DEBUG) {
+ System.out.println("no document provider"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ if (annotationModel == null || !(annotationModel instanceof IAnnotationModelExtension)) {
+ if (DEBUG) {
+ System.out.println("no annotation model"); //$NON-NLS-1$
+ }
+ return;
+ }
+
+ List oldAnnotations = new ArrayList(2);
+ Iterator annotationIterator = annotationModel.getAnnotationIterator();
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ if (ANNOTATION_TYPE.equals(annotation.getType())) {
+ annotation.markDeleted(true);
+ if (DEBUG) {
+ System.out.println("removing " + annotation); //$NON-NLS-1$
+ }
+ oldAnnotations.add(annotation);
+ }
+ }
+
+ Map newAnnotations = new HashMap();
+ if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
+ Object o = ((IStructuredSelection) selection).getFirstElement();
+ if (o instanceof IDOMNode) {
+ int offset = ((ITextSelection) selection).getOffset();
+ IStructuredDocumentRegion matchRegion = null;
+ if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
+ o = ((Attr) o).getOwnerElement();
+ }
+
+ Position pStart = null;
+ Position pEnd = null;
+ String tag = ""; //$NON-NLS-1$
+ if (o instanceof IDOMNode) {
+ IDOMNode node = (IDOMNode) o;
+ IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
+ if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
+ if (startStructuredDocumentRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = startStructuredDocumentRegion.getRegions().get(1);
+ pStart = new Position(startStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ tag = startStructuredDocumentRegion.getText(nameRegion);
+ }
+ matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
+ if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = matchRegion.getRegions().get(1);
+ pEnd = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ }
+ }
+ else {
+ IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
+ if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
+ if (endStructuredDocumentRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = endStructuredDocumentRegion.getRegions().get(1);
+ pEnd = new Position(endStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ tag = endStructuredDocumentRegion.getText(nameRegion);
+ }
+ matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
+ if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = matchRegion.getRegions().get(1);
+ pStart = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ }
+ }
+ }
+ }
+ if (pStart != null && pEnd != null) {
+ Annotation annotation = new Annotation(ANNOTATION_TYPE, false, NLS.bind(XMLUIMessages.gotoMatchingTag_start, tag));
+ newAnnotations.put(annotation, pStart);
+ if (DEBUG) {
+ System.out.println("adding " + annotation); //$NON-NLS-1$
+ }
+ annotation = new Annotation(ANNOTATION_TYPE, false, NLS.bind(XMLUIMessages.gotoMatchingTag_end, tag));
+ newAnnotations.put(annotation, pEnd);
+ if (DEBUG) {
+ System.out.println("adding " + annotation); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ ((IAnnotationModelExtension) annotationModel).replaceAnnotations((Annotation[]) oldAnnotations.toArray(new Annotation[oldAnnotations.size()]), newAnnotations);
+ }
+}
Property changes on: branches/jbosstools-3.2.x/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-03-18 17:45:44 UTC (rev 29906)
@@ -56,7 +56,8 @@
org.eclipse.wst.html.ui;bundle-version="1.0.401",
org.eclipse.pde.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.jst.jsf.core,
- org.eclipse.wst.common.project.facet.core
-Bundle-Version: 3.2.0.qualifier
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.xml.ui;bundle-version="1.1.103"
+Bundle-Version: 3.2.1.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml 2011-03-18 17:45:44 UTC (rev 29906)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jsf.plugins</groupId>
<artifactId>org.jboss.tools.jsf.ui</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Modified: branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -1,17 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.ui.action;
import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.tools.common.model.ui.texteditors.AbstractMultiPageContributor;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.jface.action.IAction;
@@ -24,6 +27,7 @@
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.jboss.tools.common.gef.action.ActionRegistrySupport;
import org.jboss.tools.jsf.ui.editor.FacesConfigGuiEditor;
import org.jboss.tools.jsf.ui.editor.actions.JSFCutRetargetAction;
@@ -32,11 +36,18 @@
* @author Jeremy
*/
public class JSFMultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
protected FakeTextEditor fakeTextEditor = new FakeTextEditor();
ActionRegistrySupport registrySupport = new ActionRegistrySupport();
public JSFMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void dispose() {
@@ -119,11 +130,18 @@
actionBars.updateActionBars();
}
+ ITextEditor textEditor = getTextEditor(part);
+
if(fToggleOccurencesMarkUp != null) {
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
}
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2011-03-18 17:45:44 UTC (rev 29906)
@@ -55,5 +55,5 @@
org.eclipse.ui,
org.eclipse.jst.standard.schemas,
org.eclipse.wst.standard.schemas
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/pom.xml 2011-03-18 17:45:44 UTC (rev 29906)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jst.plugins</groupId>
<artifactId>org.jboss.tools.jst.jsp</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jst.jsp.jspeditor;
@@ -27,9 +27,10 @@
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.ITextEditorExtension;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
/**
@@ -37,9 +38,15 @@
*
*/
public class JSPMultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
public JSPMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void init(IActionBars bars) {
@@ -176,9 +183,17 @@
cleanActionBarStatus();
actionBars.updateActionBars();
}
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+
+ ITextEditor textEditor = getTextEditor(part);
+
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2011-03-18 17:45:44 UTC (rev 29906)
@@ -33,6 +33,7 @@
org.eclipse.pde.ui,
org.jboss.tools.common.gef,
org.eclipse.jface.text,
- org.eclipse.core.expressions
-Bundle-Version: 3.1.0.qualifier
+ org.eclipse.core.expressions,
+ org.eclipse.wst.xml.ui;bundle-version="1.1.103"
+Bundle-Version: 3.2.1.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml 2011-03-18 17:45:44 UTC (rev 29906)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.seam.plugins</groupId>
<artifactId>org.jboss.tools.seam.ui.pages</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Modified: branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java
===================================================================
--- branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
+++ branches/jbosstools-3.2.x/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java 2011-03-18 17:45:44 UTC (rev 29906)
@@ -1,17 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.seam.ui.pages.editor;
import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.tools.common.model.ui.texteditors.AbstractMultiPageContributor;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.jface.action.IAction;
@@ -25,6 +28,7 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.jboss.tools.common.gef.action.ActionRegistrySupport;
/**
@@ -36,6 +40,11 @@
public PagesMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void dispose() {
@@ -118,11 +127,18 @@
actionBars.updateActionBars();
}
+ ITextEditor textEditor = getTextEditor(part);
+
if(fToggleOccurencesMarkUp != null) {
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
}
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
13 years, 10 months
JBoss Tools SVN: r29905 - in trunk: common/plugins/org.jboss.tools.common.model.ui/META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-18 13:12:15 -0400 (Fri, 18 Mar 2011)
New Revision: 29905
Added:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model.ui/pom.xml
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java
Log:
JBIDE-8546
Ctrl+Shift+> Matching tag shortcut broken in JBoss Tools HTML Editor.
Issue is fixed. Fixed for 3.3.0.M1
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
@@ -93,6 +93,6 @@
org.jboss.tools.common.ui,
org.eclipse.jst.standard.schemas,
org.eclipse.wst.standard.schemas
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: org.jboss.tools.common.model.ui.jar
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/pom.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/pom.xml 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.common</groupId>
<artifactId>org.jboss.tools.common.model.ui</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/AbstractMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.model.ui.texteditors;
@@ -31,9 +31,11 @@
import org.eclipse.jface.text.ITextOperationTarget;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.jboss.tools.common.text.xml.ui.TextEditorMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
public abstract class AbstractMultiPageContributor extends MultiPageEditorActionBarContributor {
-
+ protected static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
/** The global actions to be connected with editor actions */
protected final static String[] ACTIONS= {
ITextEditorActionConstants.UNDO,
@@ -96,7 +98,8 @@
protected RetargetTextEditorAction fContentAssistTip;
protected TextEditorAction fToggleOccurencesMarkUp;
-
+ protected GoToMatchingTagAction fGoToMatchingTagAction;
+
public AbstractMultiPageContributor() {
super();
createAssistObjects();
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/MultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -1,15 +1,17 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.common.model.ui.texteditors;
+import java.util.ResourceBundle;
+
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;
@@ -18,6 +20,8 @@
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
/**
@@ -25,10 +29,17 @@
*
*/
public class MultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
protected FakeTextEditor fakeTextEditor = new FakeTextEditor();
public MultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void init(IActionBars bars) {
@@ -78,9 +89,16 @@
actionBars.updateActionBars();
}
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ ITextEditor textEditor = getTextEditor(part);
+
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Added: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -0,0 +1,301 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.jboss.tools.common.text.xml.xpl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.IAnnotationModelExtension;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.TextEditorAction;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
+
+/**
+ * Moves the cursor to the end tag if it is in a start tag, and vice versa.
+ * Also updates the matching tag annotation in the active editor.
+ *
+ * @author nitin
+ *
+ */
+public class GoToMatchingTagAction extends TextEditorAction {
+
+ private class UpdateListener implements ISelectionChangedListener {
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateFor(event.getSelection());
+ }
+ }
+
+ private static final String ANNOTATION_TYPE = "org.eclipse.wst.xml.ui.matching.tag"; //$NON-NLS-1$
+ private ISelectionChangedListener fUpdateListener = null;
+ static final boolean DEBUG = false;
+
+ /**
+ * @param bundle
+ * @param prefix
+ * @param editor
+ * @param style
+ */
+ public GoToMatchingTagAction(ResourceBundle bundle, String prefix, ITextEditor editor) {
+ super(bundle, prefix, editor);
+ fUpdateListener = new UpdateListener();
+ }
+
+ void removeAnnotation(boolean allMatching) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor == null) {
+ if (DEBUG) {
+ System.out.println("no editor"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ if (DEBUG) {
+ System.out.println("no document provider"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ if (annotationModel == null) {
+ if (DEBUG) {
+ System.out.println("no annotation model"); //$NON-NLS-1$
+ }
+ return;
+ }
+
+ Iterator annotationIterator = annotationModel.getAnnotationIterator();
+ List oldAnnotations = new ArrayList();
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ if (ANNOTATION_TYPE.equals(annotation.getType())) {
+ annotation.markDeleted(true);
+ /**
+ * Sometimes it is supported, sometime's it is not. Confusing.
+ */
+ try {
+ annotationIterator.remove();
+ }
+ catch (UnsupportedOperationException e) {
+ oldAnnotations.add(annotation);
+ }
+ if (DEBUG) {
+ System.out.println("removed " + annotation); //$NON-NLS-1$
+ }
+ if (!allMatching)
+ break;
+ }
+ }
+ if (!oldAnnotations.isEmpty()) {
+ int size = oldAnnotations.size();
+ for (int i = 0; i < size; i++) {
+ annotationModel.removeAnnotation((Annotation) oldAnnotations.get(i));
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
+ */
+ public void runWithEvent(Event event) {
+ super.runWithEvent(event);
+ if (getTextEditor() == null)
+ return;
+
+ ISelection selection = getTextEditor().getSelectionProvider().getSelection();
+ if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
+ Object o = ((IStructuredSelection) selection).getFirstElement();
+ if (o instanceof IDOMNode) {
+ int offset = ((ITextSelection) selection).getOffset();
+ IStructuredDocumentRegion matchRegion = null;
+ if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
+ o = ((Attr) o).getOwnerElement();
+ }
+
+ int targetOffset = -1;
+ if (o instanceof IDOMNode) {
+ IDOMNode node = (IDOMNode) o;
+ IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
+ if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
+ matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
+ if (matchRegion != null)
+ targetOffset = matchRegion.getStartOffset() + 2;
+ }
+ else {
+ IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
+ if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
+ matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
+ if (matchRegion != null)
+ targetOffset = matchRegion.getStartOffset() + 1;
+ }
+ }
+ }
+
+ if (targetOffset >= 0) {
+ getTextEditor().getSelectionProvider().setSelection(new TextSelection(targetOffset, 0));
+ }
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.texteditor.TextEditorAction#setEditor(org.eclipse.ui.texteditor.ITextEditor)
+ */
+ public void setEditor(ITextEditor editor) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor != null) {
+ removeAnnotation(true);
+
+ ISelectionProvider selectionProvider = textEditor.getSelectionProvider();
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) selectionProvider).removePostSelectionChangedListener(fUpdateListener);
+ }
+ }
+ super.setEditor(editor);
+ if (editor != null) {
+ ISelectionProvider selectionProvider = editor.getSelectionProvider();
+ if (selectionProvider instanceof IPostSelectionProvider) {
+ ((IPostSelectionProvider) selectionProvider).addPostSelectionChangedListener(fUpdateListener);
+ }
+
+ updateFor(selectionProvider.getSelection());
+ }
+ }
+
+ public void update() {
+ setEnabled(true);
+
+ }
+
+ void updateFor(ISelection selection) {
+ ITextEditor textEditor = getTextEditor();
+ if (textEditor == null) {
+ if (DEBUG) {
+ System.out.println("no editor"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ if (DEBUG) {
+ System.out.println("no document provider"); //$NON-NLS-1$
+ }
+ return;
+ }
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ if (annotationModel == null || !(annotationModel instanceof IAnnotationModelExtension)) {
+ if (DEBUG) {
+ System.out.println("no annotation model"); //$NON-NLS-1$
+ }
+ return;
+ }
+
+ List oldAnnotations = new ArrayList(2);
+ Iterator annotationIterator = annotationModel.getAnnotationIterator();
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ if (ANNOTATION_TYPE.equals(annotation.getType())) {
+ annotation.markDeleted(true);
+ if (DEBUG) {
+ System.out.println("removing " + annotation); //$NON-NLS-1$
+ }
+ oldAnnotations.add(annotation);
+ }
+ }
+
+ Map newAnnotations = new HashMap();
+ if (!selection.isEmpty() && selection instanceof IStructuredSelection && selection instanceof ITextSelection) {
+ Object o = ((IStructuredSelection) selection).getFirstElement();
+ if (o instanceof IDOMNode) {
+ int offset = ((ITextSelection) selection).getOffset();
+ IStructuredDocumentRegion matchRegion = null;
+ if (((Node) o).getNodeType() == Node.ATTRIBUTE_NODE) {
+ o = ((Attr) o).getOwnerElement();
+ }
+
+ Position pStart = null;
+ Position pEnd = null;
+ String tag = ""; //$NON-NLS-1$
+ if (o instanceof IDOMNode) {
+ IDOMNode node = (IDOMNode) o;
+ IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();
+ if (startStructuredDocumentRegion != null && startStructuredDocumentRegion.containsOffset(offset)) {
+ if (startStructuredDocumentRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = startStructuredDocumentRegion.getRegions().get(1);
+ pStart = new Position(startStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ tag = startStructuredDocumentRegion.getText(nameRegion);
+ }
+ matchRegion = ((IDOMNode) o).getEndStructuredDocumentRegion();
+ if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = matchRegion.getRegions().get(1);
+ pEnd = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ }
+ }
+ else {
+ IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();
+ if (endStructuredDocumentRegion != null && endStructuredDocumentRegion.containsOffset(offset)) {
+ if (endStructuredDocumentRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = endStructuredDocumentRegion.getRegions().get(1);
+ pEnd = new Position(endStructuredDocumentRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ tag = endStructuredDocumentRegion.getText(nameRegion);
+ }
+ matchRegion = ((IDOMNode) o).getStartStructuredDocumentRegion();
+ if (matchRegion != null && matchRegion.getNumberOfRegions() > 1) {
+ ITextRegion nameRegion = matchRegion.getRegions().get(1);
+ pStart = new Position(matchRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
+ }
+ }
+ }
+ }
+ if (pStart != null && pEnd != null) {
+ Annotation annotation = new Annotation(ANNOTATION_TYPE, false, NLS.bind(XMLUIMessages.gotoMatchingTag_start, tag));
+ newAnnotations.put(annotation, pStart);
+ if (DEBUG) {
+ System.out.println("adding " + annotation); //$NON-NLS-1$
+ }
+ annotation = new Annotation(ANNOTATION_TYPE, false, NLS.bind(XMLUIMessages.gotoMatchingTag_end, tag));
+ newAnnotations.put(annotation, pEnd);
+ if (DEBUG) {
+ System.out.println("adding " + annotation); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+ ((IAnnotationModelExtension) annotationModel).replaceAnnotations((Annotation[]) oldAnnotations.toArray(new Annotation[oldAnnotations.size()]), newAnnotations);
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/GoToMatchingTagAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
@@ -56,7 +56,8 @@
org.eclipse.wst.html.ui;bundle-version="1.0.401",
org.eclipse.pde.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.jst.jsf.core,
- org.eclipse.wst.common.project.facet.core
-Bundle-Version: 3.2.0.qualifier
+ org.eclipse.wst.common.project.facet.core,
+ org.eclipse.wst.xml.ui;bundle-version="1.1.103"
+Bundle-Version: 3.3.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jsf.plugins</groupId>
<artifactId>org.jboss.tools.jsf.ui</artifactId>
- <version>3.2.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/JSFMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -1,17 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.ui.action;
import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.tools.common.model.ui.texteditors.AbstractMultiPageContributor;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.jface.action.IAction;
@@ -24,6 +27,7 @@
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.jboss.tools.common.gef.action.ActionRegistrySupport;
import org.jboss.tools.jsf.ui.editor.FacesConfigGuiEditor;
import org.jboss.tools.jsf.ui.editor.actions.JSFCutRetargetAction;
@@ -32,11 +36,18 @@
* @author Jeremy
*/
public class JSFMultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
+
protected FakeTextEditor fakeTextEditor = new FakeTextEditor();
ActionRegistrySupport registrySupport = new ActionRegistrySupport();
public JSFMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void dispose() {
@@ -119,11 +130,18 @@
actionBars.updateActionBars();
}
+ ITextEditor textEditor = getTextEditor(part);
+
if(fToggleOccurencesMarkUp != null) {
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
}
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jst.jsp.jspeditor;
@@ -27,9 +27,10 @@
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.ITextEditorExtension;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
/**
@@ -37,9 +38,15 @@
*
*/
public class JSPMultiPageContributor extends AbstractMultiPageContributor {
+ private static final String GO_TO_MATCHING_TAG_ID = "org.eclipse.wst.xml.ui.gotoMatchingTag"; //$NON-NLS-1$
public JSPMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void init(IActionBars bars) {
@@ -176,9 +183,17 @@
cleanActionBarStatus();
actionBars.updateActionBars();
}
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+
+ ITextEditor textEditor = getTextEditor(part);
+
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/META-INF/MANIFEST.MF 2011-03-18 17:12:15 UTC (rev 29905)
@@ -33,6 +33,7 @@
org.eclipse.pde.ui,
org.jboss.tools.common.gef,
org.eclipse.jface.text,
- org.eclipse.core.expressions
-Bundle-Version: 3.1.0.qualifier
+ org.eclipse.core.expressions,
+ org.eclipse.wst.xml.ui
+Bundle-Version: 3.3.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/pom.xml 2011-03-18 17:12:15 UTC (rev 29905)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.seam.plugins</groupId>
<artifactId>org.jboss.tools.seam.ui.pages</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java 2011-03-18 02:47:39 UTC (rev 29904)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/PagesMultiPageContributor.java 2011-03-18 17:12:15 UTC (rev 29905)
@@ -1,17 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.seam.ui.pages.editor;
import java.util.Iterator;
+import java.util.ResourceBundle;
+
import org.jboss.tools.common.model.ui.texteditors.AbstractMultiPageContributor;
+import org.jboss.tools.common.text.xml.xpl.GoToMatchingTagAction;
import org.jboss.tools.common.text.xml.xpl.ToggleOccurencesMarkUpAction;
import org.eclipse.gef.ui.actions.ActionRegistry;
import org.eclipse.jface.action.IAction;
@@ -23,8 +26,8 @@
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.jboss.tools.common.gef.action.ActionRegistrySupport;
/**
@@ -36,6 +39,11 @@
public PagesMultiPageContributor() {
fToggleOccurencesMarkUp = new ToggleOccurencesMarkUpAction();
+
+ ResourceBundle resourceBundle = XMLUIMessages.getResourceBundle();
+ fGoToMatchingTagAction = new GoToMatchingTagAction(resourceBundle, "gotoMatchingTag_", null); //$NON-NLS-1$
+ fGoToMatchingTagAction.setActionDefinitionId(GO_TO_MATCHING_TAG_ID);
+ fGoToMatchingTagAction.setId(GO_TO_MATCHING_TAG_ID);
}
public void dispose() {
@@ -118,11 +126,18 @@
actionBars.updateActionBars();
}
+ ITextEditor textEditor = getTextEditor(part);
+
if(fToggleOccurencesMarkUp != null) {
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ fToggleOccurencesMarkUp.setEditor(textEditor);
fToggleOccurencesMarkUp.update();
}
+ fGoToMatchingTagAction.setEditor(textEditor);
+ if (textEditor != null) {
+ textEditor.setAction(GO_TO_MATCHING_TAG_ID, fGoToMatchingTagAction);
+ }
+
updateStatus();
}
13 years, 10 months
JBoss Tools SVN: r29904 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-17 22:47:39 -0400 (Thu, 17 Mar 2011)
New Revision: 29904
Modified:
trunk/hibernatetools/docs/reference/en-US/plugins.xml
Log:
"Fixed spelling errors"
Modified: trunk/hibernatetools/docs/reference/en-US/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/plugins.xml 2011-03-18 02:45:15 UTC (rev 29903)
+++ trunk/hibernatetools/docs/reference/en-US/plugins.xml 2011-03-18 02:47:39 UTC (rev 29904)
@@ -7,7 +7,7 @@
<section>
<title>Introduction</title>
<para>
- Hibernate Eclipse Tools includes wizards for creating Hibernate mapping files, configuration files (<filename>.cfg.xml</filename>), <filename>revenge.xml</filename> files as well as wizards for adjusting Console Configuration and Code Generation. Special structured and XML editors and editors for executing HQL and Criteria queries are also provided in Hibernate Console. Refer to <xref linkend="hibernate_key_features"/> to find all the benefits that are provided by these tools within Eclipse.
+ Hibernate Eclipse Tools includes wizards for creating Hibernate mapping files, configuration files (<filename>.cfg.xml</filename>), <filename>reveng.xml</filename> files as well as wizards for adjusting Console Configuration and Code Generation. Special structured and XML editors and editors for executing HQL and Criteria queries are also provided in Hibernate Console. Refer to <xref linkend="hibernate_key_features"/> to find all the benefits that are provided by these tools within Eclipse.
</para>
<note>
<title>Note:</title>
13 years, 10 months
JBoss Tools SVN: r29903 - trunk/struts/docs/struts_tools_tutorial/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-03-17 22:45:15 -0400 (Thu, 17 Mar 2011)
New Revision: 29903
Modified:
trunk/struts/docs/struts_tools_tutorial/en-US/struts_application.xml
Log:
updated to fix error with programlisting using cdata tags
Modified: trunk/struts/docs/struts_tools_tutorial/en-US/struts_application.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en-US/struts_application.xml 2011-03-18 00:58:53 UTC (rev 29902)
+++ trunk/struts/docs/struts_tools_tutorial/en-US/struts_application.xml 2011-03-18 02:45:15 UTC (rev 29903)
@@ -177,7 +177,7 @@
<para>
The <emphasis><property moreinfo="none">inputname.jsp</property></emphasis> file needs to be populated with some template code. Click on the <emphasis> <property moreinfo="none">inputname.jsp</property> </emphasis> page in the <property moreinfo="none">Web Projects view</property>, and then modify the file so it looks like this:
<programlisting>
-<![CDATA[<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
+<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<html:html>
<head>
<title></title>
@@ -186,7 +186,7 @@
<html:form action="">
</html:form>
</body>
-</html:html>]]>
+</html:html>
</programlisting>
</para>
</section>
13 years, 10 months
JBoss Tools SVN: r29902 - trunk/seam/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-03-17 20:58:53 -0400 (Thu, 17 Mar 2011)
New Revision: 29902
Modified:
trunk/seam/docs/reference/en-US/adding_seam_support_to_ear_project.xml
trunk/seam/docs/reference/en-US/creating_mavenized_seam.xml
trunk/seam/docs/reference/en-US/creating_new_seam.xml
trunk/seam/docs/reference/en-US/crud_application_walkthrough.xml
trunk/seam/docs/reference/en-US/crud_database_application.xml
trunk/seam/docs/reference/en-US/directory_structure.xml
trunk/seam/docs/reference/en-US/generate_entities.xml
trunk/seam/docs/reference/en-US/seam_editors.xml
trunk/seam/docs/reference/en-US/seam_faq.xml
trunk/seam/docs/reference/en-US/seam_menus_and_actions.xml
trunk/seam/docs/reference/en-US/seam_preferences.xml
trunk/seam/docs/reference/en-US/seam_refactoring.xml
trunk/seam/docs/reference/en-US/seam_view.xml
trunk/seam/docs/reference/en-US/seam_wizards.xml
trunk/seam/docs/reference/en-US/testng.xml
Log:
"Fixed spelling errors"
Modified: trunk/seam/docs/reference/en-US/adding_seam_support_to_ear_project.xml
===================================================================
--- trunk/seam/docs/reference/en-US/adding_seam_support_to_ear_project.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/adding_seam_support_to_ear_project.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -15,9 +15,9 @@
<para>For example you have several WTP projects:</para>
<itemizedlist>
- <listitem><para> seamproject-ear (You can create WTP EAR project using New -> Project -> Java EE -> Enterprise Application Project wizard)</para></listitem>
- <listitem><para> seamproject-ejb (You can create WTP EJB project using New -> Project -> EJB -> EJB Project wizard)</para></listitem>
- <listitem><para> seamproject-war (You can create WTP WEB project using New -> Project -> Web -> Dynamic Web Project wizard)</para></listitem>
+ <listitem><para> seamproject-ear (You can create WTP EAR project using <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Project</guimenuitem><guimenuitem>Java EE</guimenuitem><guimenuitem>Enterprise Application Project wizard</guimenuitem></menuchoice>)</para></listitem>
+ <listitem><para> seamproject-ejb (You can create WTP EJB project using <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Project</guimenuitem><guimenuitem>EJB</guimenuitem><guimenuitem>EJB Project wizard</guimenuitem></menuchoice>)</para></listitem>
+ <listitem><para> seamproject-war (You can create WTP WEB project using <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Project</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Dynamic Web Project wizard</guimenuitem></menuchoice>)</para></listitem>
</itemizedlist>
<note><title>Tip</title>
@@ -32,7 +32,7 @@
</mediaobject>
</figure>
- <para>Make sure EJB and WAR are included in EAR as modules (Properties for seamproject-ear -> Java EE Module Dependencies)</para>
+ <para>Make sure EJB and WAR are included in EAR as modules (Properties for <menuchoice><guimenuitem>seamproject-ear</guimenuitem><guimenuitem>Java EE Module Dependencies</guimenuitem></menuchoice>)</para>
<figure>
<title>Java EE Module Dependencies</title>
@@ -55,7 +55,7 @@
</figure>
- <para>Then include libs from EAR to EJB Manifest Class-Path (Properties for seamproject-ejb -> Java EE Module Dependencies)</para>
+ <para>Then include libs from EAR to EJB Manifest Class-Path (Properties for <menuchoice><guimenuitem>seamproject-ejb</guimenuitem><guimenuitem>Java EE Module Dependencies</guimenuitem></menuchoice>)</para>
<figure>
<title>Including Libs from EAR to EJB Manifest Class-Path</title>
@@ -66,7 +66,7 @@
</mediaobject>
</figure>
- <para>Include libs from EAR and seamproject-ejb.jar to WAR Manifest Class-Path (Properties for seamproject-war -> Java EE Module Dependencies)</para>
+ <para>Include libs from EAR and seamproject-ejb.jar to WAR Manifest Class-Path (Properties for <menuchoice><guimenuitem>seamproject-war</guimenuitem><guimenuitem>Java EE Module Dependencies</guimenuitem></menuchoice>)</para>
<figure>
<title>Including Libs from EAR and seamproject-ejb.jar to WAR Manifest Class-Path</title>
@@ -79,7 +79,7 @@
<para>Thus we have set our WTP EAR/EJB/WAR projects and now we are ready to add Seam support to them:</para>
- <para>First you have to add Seam support to WAR project: Properties for seamproject-war -> Seam Settings</para>
+ <para>First you have to add Seam support to WAR project: Properties for <menuchoice><guimenuitem>seamproject-war</guimenuitem><guimenuitem>Seam Settings</guimenuitem></menuchoice></para>
<figure>
@@ -94,7 +94,7 @@
<para>Set seamproject-war as Main Seam project. All other settings mostly are used by New Seam Entity/Action/Form/Conversation/... Wizards. Thus you can set them as you wish.</para>
- <para>Then you can add Seam support to EJB project: Properties for seamproject-war -> Seam Settings</para>
+ <para>Then you can add Seam support to EJB project: Properties for <menuchoice><guimenuitem>seamproject-war</guimenuitem><guimenuitem>Seam Settings</guimenuitem></menuchoice></para>
<figure>
<title>Adding Seam Support to EJB Project</title>
Modified: trunk/seam/docs/reference/en-US/creating_mavenized_seam.xml
===================================================================
--- trunk/seam/docs/reference/en-US/creating_mavenized_seam.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/creating_mavenized_seam.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -41,7 +41,7 @@
<itemizedlist>
<listitem>
<para>
- Navigate to <emphasis> <property>File > New Seam Project</property>.</emphasis> Give the project a meaningful name, specify a target runtime and server and select the proper configuration for your Seam project:
+ Navigate to <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New Seam Project.</guimenuitem></menuchoice> Give the project a meaningful name, specify a target runtime and server and select the proper configuration for your Seam project:
</para>
<figure>
Modified: trunk/seam/docs/reference/en-US/creating_new_seam.xml
===================================================================
--- trunk/seam/docs/reference/en-US/creating_new_seam.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/creating_new_seam.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -16,7 +16,7 @@
</para>
<para>
- At first, we suggest to set the specific Seam perspective that combines a number of different views and editors needed for work with resources concerned. For that select <emphasis> <property>Window > Open Perspective > Other > Seam</property> </emphasis> or you can also access it through the button in the right top corner.
+ At first, we suggest to set the specific Seam perspective that combines a number of different views and editors needed for work with resources concerned. For that select <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Seam</guimenuitem></menuchoice> or you can also access it through the button in the right top corner.
</para>
<figure>
Modified: trunk/seam/docs/reference/en-US/crud_application_walkthrough.xml
===================================================================
--- trunk/seam/docs/reference/en-US/crud_application_walkthrough.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/crud_application_walkthrough.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,145 +1,162 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="crud_application_walkthrough">
- <?dbhtml filename="crud_application_walkthrough.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>CRUD</keyword>
- <keyword>JBoss AS</keyword>
- </keywordset>
- </chapterinfo>
- <title>The CRUD Application Walkthrough</title>
- <para>After you familiarized oneself with example of creating the CRUD Database Application with
- Seam, you can read this charter.</para>
- <section>
- <title>Using CRUD Application</title>
- <para>To run your CRUD Application you should do the following steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Run a project on the Server. </para>
- </listitem>
- </itemizedlist>
-
- <para>On <emphasis>
- <property>Package Explorer View </property>
- </emphasis> right click on the <emphasis>
- <property>crudapp</property>
- </emphasis> project, select <emphasis><property> Run As > Run on
- Server</property>.</emphasis></para>
-
- <figure>
- <title>Run Project on Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_1.png"
- scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select a Server and click <property>Finish</property></para>
-
- <figure>
- <title>Select a Server</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_3.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Home page of the <emphasis>
- <property>crudapp</property>
- </emphasis> project should appear in <emphasis>
- <property>Web Browser</property>
- </emphasis>.</para>
- <figure>
- <title>Home page</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_4.png"
- scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After that you can use CRUD application with
- <property>"employee"</property> database.</para>
-
- <para>You can use internal JBDS Web Browser or your external Web Browser with the same link
- (<ulink url="http://localhost:8080/crudapp/home.seam"
- >http://localhost:8080/crudapp/home.seam</ulink>). </para>
- <para>Click on the <emphasis>
- <property>Employees List</property>
- </emphasis> link and observe that data from <emphasis>
- <property>employee</property>
- </emphasis> database is displayed.</para>
- <figure>
- <title>Employees List Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_5.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Use <property>Employees search parameters</property> fields to filter the selected
- list.</para>
-
- <para> Press <property>Select</property> opposite one of employees.</para>
- <figure>
- <title>Employee details Page</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_6.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para> Press <property>Edit</property> to edit employee fields.</para>
- <para> Enter <emphasis>
- <property>Login</property>
- </emphasis> and <emphasis>
- <property>Password</property>
- </emphasis> to login. (Use
- <emphasis>"crudapp-user"/"secret"</emphasis> for
- example)</para>
-
- <figure>
- <title>Login page</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_7.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <figure>
- <title>Edit Employee</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/crud_application_walkthrough/crud_application_walkthrough_8.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para> Fill in <emphasis>
- <property>firstname</property>
- </emphasis> and press <property>Save</property>.</para>
- <para> Database will be updated.</para>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="crud_application_walkthrough">
+<?dbhtml filename="crud_application_walkthrough.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>Eclipse</keyword>
+
+ <keyword>Java</keyword>
+
+ <keyword>CRUD</keyword>
+
+ <keyword>JBoss AS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>The CRUD Application Walkthrough</title>
+ <para>
+ After you familiarized oneself with example of creating the CRUD Database Application with Seam, you can read this charter.
+ </para>
+
+ <section>
+ <title>Using CRUD Application</title>
+ <para>
+ To run your CRUD Application you should do the following steps:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Run a project on the Server.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ On <emphasis> <property>Package Explorer View </property> </emphasis> right click on the <emphasis> <property>crudapp</property> </emphasis> project, select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server.</guimenuitem></menuchoice>
+ </para>
+
+ <figure>
+ <title>Run Project on Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_1.png"
+ scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Select a Server and click <property>Finish</property>
+ </para>
+
+ <figure>
+ <title>Select a Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_3.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Home page of the <emphasis> <property>crudapp</property> </emphasis> project should appear in <emphasis> <property>Web Browser</property> </emphasis>.
+ </para>
+
+ <figure>
+ <title>Home page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_4.png"
+ scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ After that you can use CRUD application with <property>"employee"</property> database.
+ </para>
+
+ <para>
+ You can use internal JBDS Web Browser or your external Web Browser with the same link (<ulink url="http://localhost:8080/crudapp/home.seam"
+ >http://localhost:8080/crudapp/home.seam</ulink>).
+ </para>
+
+ <para>
+ Click on the <emphasis> <property>Employees List</property> </emphasis> link and observe that data from <emphasis> <property>employee</property> </emphasis> database is displayed.
+ </para>
+
+ <figure>
+ <title>Employees List Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_5.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Use <property>Employees search parameters</property> fields to filter the selected list.
+ </para>
+
+ <para>
+ Press <property>Select</property> opposite one of employees.
+ </para>
+
+ <figure>
+ <title>Employee details Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_6.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Press <property>Edit</property> to edit employee fields.
+ </para>
+
+ <para>
+ Enter <emphasis> <property>Login</property> </emphasis> and <emphasis> <property>Password</property> </emphasis> to login. (Use <emphasis>"crudapp-user"/"secret"</emphasis> for example)
+ </para>
+
+ <figure>
+ <title>Login page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_7.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Edit Employee</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/crud_application_walkthrough/crud_application_walkthrough_8.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Fill in <emphasis> <property>firstname</property> </emphasis> and press <property>Save</property>.
+ </para>
+
+ <para>
+ Database will be updated.
+ </para>
+ </section>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/crud_database_application.xml
===================================================================
--- trunk/seam/docs/reference/en-US/crud_database_application.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/crud_database_application.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,530 +1,486 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="crud_database_application">
- <?dbhtml filename="crud_database_application.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>Java</keyword>
- <keyword>CRUD</keyword>
- <keyword>Database Application</keyword>
- </keywordset>
- </chapterinfo>
- <title>Generate a CRUD Database Application</title>
- <section>
- <title>What is CRUD?</title>
+<?dbhtml filename="crud_database_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>Eclipse</keyword>
+
+ <keyword>Java</keyword>
+
+ <keyword>CRUD</keyword>
+
+ <keyword>Database Application</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Generate a CRUD Database Application</title>
+ <section>
+ <title>What is CRUD?</title>
+ <para>
+ <property>CRUD</property> is an acronym for the four basic types of SQL commands: <emphasis> <property>Create</property> </emphasis>, <emphasis> <property>Read</property> </emphasis>, <emphasis> <property>Update</property> </emphasis>, <emphasis> <property>Delete</property> </emphasis>. Most applications have some kind of <property>CRUD</property> functionality, and we can assume that every programmer had to deal with <property>CRUD</property> at some point. A <property>CRUD</property> application is one that uses forms to get data into and out of a database.
+ </para>
+
+ <para>
+ In the next section we will create <xref linkend="intro"/> Web application, connect it to the <ulink url="http://www.hsqldb.org/">HSQL</ulink> database and add <property>CRUD</property> support.
+ </para>
+ </section>
+
+ <section>
+ <title>How to create the CRUD Database Application with Seam</title>
+ <itemizedlist>
+ <listitem>
<para>
- <property>CRUD</property> is an acronym for the four basic types of SQL commands: <emphasis>
- <property>Create</property>
- </emphasis>, <emphasis>
- <property>Read</property>
- </emphasis>, <emphasis>
- <property>Update</property>
- </emphasis>, <emphasis>
- <property>Delete</property>
- </emphasis>. Most applications have some kind of <property>CRUD</property>
- functionality, and we can assume that every programmer had to deal with
- <property>CRUD</property> at some point. A <property>CRUD</property> application is
- one that uses forms to get data into and out of a database. </para>
- <para> In the next section we will create <xref linkend="intro"/> Web application,
- connect it to the <ulink url="http://www.hsqldb.org/">HSQL</ulink> database and add
- <property>CRUD</property> support. </para>
- </section>
-
- <section>
- <title>How to create the CRUD Database Application with Seam</title>
-
- <itemizedlist>
- <listitem>
- <para>First, you should <ulink url="http://docs.jboss.org/tools/resources/"
- >download</ulink> a database and start it by running <emphasis>
- <property>./runDBServer.sh</property>
- </emphasis> or <emphasis>
- <property>runDBServer.bat</property>
- </emphasis> from the database directory.</para>
- </listitem>
- <listitem>
- <para>Create a new Seam Web Project using <property>New Seam Project
- wizard</property> or main menu <emphasis><property>File > New > Seam Web
- Project</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Seam Web Project Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ First, you should <ulink url="http://docs.jboss.org/tools/resources/"
+ >download</ulink> a database and start it by running <emphasis> <property>./runDBServer.sh</property> </emphasis> or <emphasis> <property>runDBServer.bat</property> </emphasis> from the database directory.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Create a new Seam Web Project using <property>New Seam Project wizard</property> or main menu <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Seam Web Project.</guimenuitem></menuchoice>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam Web Project Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_01.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Name your project as <emphasis>
- <property>crudapp</property>, </emphasis> specify Target Runtime, Server and
- Seam Runtime configuration. Then press <emphasis>
- <property>Next</property>
- </emphasis> and follow the next wizard steps keeping default settings.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>New Seam Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Name your project as <emphasis> <property>crudapp</property>, </emphasis> specify Target Runtime, Server and Seam Runtime configuration. Then press <emphasis> <property>Next</property> </emphasis> and follow the next wizard steps keeping default settings.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_02.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Tip:</title>
- <para>Please have a look at <xref linkend="create_seam"/> how to create Target
- Runtime and Seam Runtime in order to get started creating, running, and debugging
- J2EE applications.</para>
- </note>
-
- <itemizedlist>
- <listitem>
- <para>On <emphasis>
- <property>Seam Facet</property>
- </emphasis> page click <emphasis>
- <property>New...</property>
- </emphasis> next to the <property>Connection profile</property> section to
- create a new <property>Connection profile</property>.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Seam Facet page</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Tip:</title>
+ <para>
+ Please have a look at <xref linkend="create_seam"/> how to create Target Runtime and Seam Runtime in order to get started creating, running, and debugging J2EE applications.
+ </para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ On <emphasis> <property>Seam Facet</property> </emphasis> page click <emphasis> <property>New...</property> </emphasis> next to the <property>Connection profile</property> section to create a new <property>Connection profile</property>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam Facet page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_03.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On <property>New Connection Profile</property> dialog select the <emphasis>
- <property>HSQLDB</property>
- </emphasis> connection profile type, name it <emphasis>
- <property>cruddb</property>
- </emphasis> and click <emphasis>
- <property>Next</property>. </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>New JDBC Connection Profile</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ On <property>New Connection Profile</property> dialog select the <emphasis> <property>HSQLDB</property> </emphasis> connection profile type, name it <emphasis> <property>cruddb</property> </emphasis> and click <emphasis> <property>Next</property>. </emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New JDBC Connection Profile</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_04.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On the next page click the round icon next to the <emphasis>
- <property>Drivers</property>
- </emphasis> field to select a database driver.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>New JDBC Connection Profile Database Driver</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ On the next page click the round icon next to the <emphasis> <property>Drivers</property> </emphasis> field to select a database driver.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New JDBC Connection Profile Database Driver</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_06.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now you should see the <property>New Driver Definition</property> dialog. On
- the first tab select the <emphasis>
- <property>HSQLDB JBDC Driver</property>. </emphasis> Underneath in the <emphasis>
- <property>Driver name</property>
- </emphasis> field you can change its name if you need.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Database Driver Type</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Now you should see the <property>New Driver Definition</property> dialog. On the first tab select the <emphasis> <property>HSQLDB JBDC Driver</property>. </emphasis> Underneath in the <emphasis> <property>Driver name</property> </emphasis> field you can change its name if you need.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Database Driver Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_07.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>You may notice the note on the previous figure. It prompts that you should
- specify the driver of the type you pointed. Set the location of the driver by
- switching to the next tab and press <emphasis>
- <property>Add JAR/Zip</property>
- </emphasis> button.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Driver Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ You may notice the note on the previous figure. It prompts that you should specify the driver of the type you pointed. Set the location of the driver by switching to the next tab and press <emphasis> <property>Add JAR/Zip</property> </emphasis> button.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Driver Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_09.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>On the <property>Properties</property> tab set the
- <emphasis><property>Connection URL</property>,</emphasis>
- <emphasis>
- <property>Database Name</property>
- </emphasis> and <emphasis>
- <property>User ID</property>
- </emphasis> and click <emphasis>
- <property>OK</property>. </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Driver Definitions Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ On the <property>Properties</property> tab set the <emphasis><property>Connection URL</property>,</emphasis> <emphasis> <property>Database Name</property> </emphasis> and <emphasis> <property>User ID</property> </emphasis> and click <emphasis> <property>OK</property>. </emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Driver Definitions Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_10.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>After clicking <emphasis>
- <property>OK</property>
- </emphasis> to submit the newly created driver you can observe and if you need
- edit all specified connection details.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Driver and Connection Details</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ After clicking <emphasis> <property>OK</property> </emphasis> to submit the newly created driver you can observe and if you need edit all specified connection details.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Driver and Connection Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_11.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now click <emphasis>
- <property>Test Connection</property>
- </emphasis> to be sure that connection can be established.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>JDBC Connection is OK</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Now click <emphasis> <property>Test Connection</property> </emphasis> to be sure that connection can be established.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>JDBC Connection is OK</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_12.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Validate <emphasis>
- <property>JDBC Connection profile</property>
- </emphasis> settings and press <emphasis>
- <property>Finish</property>
- </emphasis> or <emphasis>
- <property>Back</property>
- </emphasis> if something is wrong.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Validate JDBC Connection settings</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Validate <emphasis> <property>JDBC Connection profile</property> </emphasis> settings and press <emphasis> <property>Finish</property> </emphasis> or <emphasis> <property>Back</property> </emphasis> if something is wrong.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Validate JDBC Connection settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_13.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>After clicking <emphasis>
- <property>Finish</property>
- </emphasis> two projects <emphasis>
- <property>crudapp</property>
- </emphasis> and <emphasis>
- <property>crudapp-test</property>
- </emphasis> will be created.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>CRUDAPP Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ After clicking <emphasis> <property>Finish</property> </emphasis> two projects <emphasis> <property>crudapp</property> </emphasis> and <emphasis> <property>crudapp-test</property> </emphasis> will be created.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>CRUDAPP Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_14.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Have a look at the created projects. You can expand
- <property>WEB_CONTENT</property> folder and open
- <property>home.xhtml</property> or <property>login.xhtml</property> with
- <property>JBoss Visual Editor</property>.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>login.xhtml in VPE</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Have a look at the created projects. You can expand <property>WEB_CONTENT</property> folder and open <property>home.xhtml</property> or <property>login.xhtml</property> with <property>JBoss Visual Editor</property>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>login.xhtml in VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_15.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch to <property>Database Development</property> perspective with <emphasis>
- <property>Window->Open Perspective->Other...</property>
- </emphasis> and connect to the <emphasis>
- <property>cruddb</property>
- </emphasis> database.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Connecting to the CRUDDB database</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Switch to <property>Database Development</property> perspective with <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other...</guimenuitem></menuchoice> and connect to the <emphasis> <property>cruddb</property> </emphasis> database.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Connecting to the CRUDDB database</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_16.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Expand <emphasis>
- <property>cruddb</property>
- </emphasis> nodes to view its <emphasis>
- <property>Schemas</property>, </emphasis>
- <emphasis>
- <property>Tables</property>, </emphasis>
- <emphasis>
- <property>Columns</property>
- </emphasis> etc.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>CRUDDB Database</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Expand <emphasis> <property>cruddb</property> </emphasis> nodes to view its <emphasis> <property>Schemas</property>, </emphasis> <emphasis> <property>Tables</property>, </emphasis> <emphasis> <property>Columns</property> </emphasis> etc.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>CRUDDB Database</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_17.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch back to the <property>Seam</property> perspective. From the toolbar
- select <emphasis>
- <property>New->Seam Generate Entities</property>
- </emphasis> to create a set of <property>CRUD</property> Seam components and web
- pages based on existing tables in the database. On the first page of <emphasis>
- <property>Generate Seam Entities</property>
- </emphasis> wizard keep everything by default and press <emphasis>
- <property>Next</property>. </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Generate Seam Entities</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Switch back to the <property>Seam</property> perspective. From the toolbar select <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Seam Generate Entities</guimenuitem></menuchoice> to create a set of <property>CRUD</property> Seam components and web pages based on existing tables in the database. On the first page of <emphasis> <property>Generate Seam Entities</property> </emphasis> wizard keep everything by default and press <emphasis> <property>Next</property>. </emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Generate Seam Entities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Click <emphasis>
- <property>Refresh</property></emphasis> to display all the tables from the
- database.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Dialog for Selecting Tables</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Click <emphasis> <property>Refresh</property></emphasis> to display all the tables from the database.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Dialog for Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18a.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Now you can filter the tables. Use the <emphasis>
- <property>Include</property>
- </emphasis> button to include only necessary ones.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Selecting Tables</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Now you can filter the tables. Use the <emphasis> <property>Include</property> </emphasis> button to include only necessary ones.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_18b.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Under <emphasis>
- <property>WebContent</property>
- </emphasis> folder you can find all generated <property>xhtml</property>
- files:</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Entities Web Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Under <emphasis> <property>WebContent</property> </emphasis> folder you can find all generated <property>xhtml</property> files:
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Entities Web Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_19.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>And under <emphasis>
- <property>src</property>
- </emphasis> folder java classes are created.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Entities Java Classes</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ And under <emphasis> <property>src</property> </emphasis> folder java classes are created.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Entities Java Classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_20.png"
/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Switch to <property>Hibernate</property> perspective with <emphasis>
- <property>Window->Open Perspective->Other...</property>.
- </emphasis> On <property>Hibernate Configurations</property> view expand the <emphasis>
- <property>crudapp</property>
- </emphasis> configuration. Right click on <property>Customers</property> and
- select <emphasis>
- <property>Open Mapping Diagram</property>
- </emphasis> from the popup menu.</para>
- </listitem>
- </itemizedlist>
- <figure>
- <title>Hibernate Configurations View</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Switch to <property>Hibernate</property> perspective with <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Open Perspective</guimenuitem><guimenuitem>Other....</guimenuitem></menuchoice> On <property>Hibernate Configurations</property> view expand the <emphasis> <property>crudapp</property> </emphasis> configuration. Right click on <property>Customers</property> and select <emphasis> <property>Open Mapping Diagram</property> </emphasis> from the popup menu.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Hibernate Configurations View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_21.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Observe the <property>Mapping Diagram</property> opened in the editor. Here
- you can see the relations between models and database tables. For better
- navigating on the diagram use the <property>Outline view</property>.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Mapping Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Observe the <property>Mapping Diagram</property> opened in the editor. Here you can see the relations between models and database tables. For better navigating on the diagram use the <property>Outline view</property>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Mapping Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_22.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>For example, select <property>Customers</property> entity, right click and
- select <emphasis>
- <property>Open Source File</property>.
- </emphasis> This will open the <property>Customers.java</property> file in the
- java editor. You can also do this by right-clicking on the same entity on the
- <property>Mapping Diagram</property>.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Entity class from Mapping Diagram</title>
- <mediaobject>
- <imageobject>
- <imagedata
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ For example, select <property>Customers</property> entity, right click and select <emphasis> <property>Open Source File</property>. </emphasis> This will open the <property>Customers.java</property> file in the java editor. You can also do this by right-clicking on the same entity on the <property>Mapping Diagram</property>.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Entity class from Mapping Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/crud_database_application/crud_database_application_23.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>So far, you are ready to deploy your application to JBoss Application Server. This
- is described in the next chapter.</para>
-
- </section>
-
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ So far, you are ready to deploy your application to JBoss Application Server. This is described in the next chapter.
+ </para>
+ </section>
</chapter>
Modified: trunk/seam/docs/reference/en-US/directory_structure.xml
===================================================================
--- trunk/seam/docs/reference/en-US/directory_structure.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/directory_structure.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,230 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="directory_str">
- <?dbhtml filename="directory_structure.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>Eclipse</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Directory Structure of the Generated Project</title>
-
- <para>In this chapter we describe where the Seam wizard puts the generated files for both EAR
- and WAR deployments.</para>
- <para>The Seam Project wizard generates projects like Eclipse WTP style in order to utilize
- Eclipse WTP features and to have a correct classpath. To be more precise it generates one
- project per artifact.</para>
-
- <section id="WAR">
- <title>WAR Deployment</title>
-
- <para>The project layout for WAR projects is:</para>
-
- <figure>
- <title>Project Layout for WAR projects</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_1.png"
+<?dbhtml filename="directory_structure.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+
+ <keyword>Seam</keyword>
+
+ <keyword>Eclipse</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Directory Structure of the Generated Project</title>
+ <para>
+ In this chapter we describe where the Seam wizard puts the generated files for both EAR and WAR deployments.
+ </para>
+
+ <para>
+ The Seam Project wizard generates projects like Eclipse WTP style in order to utilize Eclipse WTP features and to have a correct classpath. To be more precise it generates one project per artifact.
+ </para>
+
+ <section id="WAR">
+ <title>WAR Deployment</title>
+ <para>
+ The project layout for WAR projects is:
+ </para>
+
+ <figure>
+ <title>Project Layout for WAR projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_1.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>A WAR project can only use Seam JavaBean and JPA Entity bean components; it cannot use
- EJB3 Session beans etc.</para>
- <para>WAR projects are generated to enable Seam war hotdeploy feature. Classes put
- into <emphasis>
- <property>src/action</property>
- </emphasis> will be deployed to <emphasis>
- <property>WEB-INF/dev</property>
- </emphasis> from which Seam automatically will perform hotdeploy of new
- components.</para>
- <note>
- <title>Note:</title>
- <para>Because of Eclipse WTP limits the hot deployed classes also existed in <emphasis>
- <property>WEB-INF/classes</property>, </emphasis> but since Seam gives <emphasis>
- <property>WEB-INF/dev</property>
- </emphasis> precedence it will work.</para>
- </note>
-
- <para>Furthermore the Seam Project wizard generates a test project that is setup to run
- <xref linkend="testNG"/> directly against the proper libraries and
- server runtime libraries. When the TestNG plugin is installed you can just run your
- tests via <emphasis><property>Run As > TestNG Test</property>.</emphasis></para>
- <para>In order to deploy WAR project on server, right-click on the project and select <emphasis>
- <property>Run As > Run on Server</property>.</emphasis> Studio will deploy
- WAR project into one web application on server to <property>deploy</property>
- folder.</para>
-
- </section>
-
- <section id="EAR">
- <title>EAR Deployment</title>
- <para>The project layout for EAR projects is:</para>
-
- <figure>
- <title>Project Layout for EAR projects</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_2.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ A WAR project can only use Seam JavaBean and JPA Entity bean components; it cannot use EJB3 Session beans etc.
+ </para>
+
+ <para>
+ WAR projects are generated to enable Seam war hotdeploy feature. Classes put into <emphasis> <property>src/action</property> </emphasis> will be deployed to <emphasis> <property>WEB-INF/dev</property> </emphasis> from which Seam automatically will perform hotdeploy of new components.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ Because of Eclipse WTP limits the hot deployed classes also existed in <emphasis> <property>WEB-INF/classes</property>, </emphasis> but since Seam gives <emphasis> <property>WEB-INF/dev</property> </emphasis> precedence it will work.
+ </para>
+ </note>
+
+ <para>
+ Furthermore the Seam Project wizard generates a test project that is setup to run <xref linkend="testNG"/> directly against the proper libraries and server runtime libraries. When the TestNG plugin is installed you can just run your tests via <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>TestNG Test.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ In order to deploy WAR project on server, right-click on the project and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server.</guimenuitem></menuchoice> Studio will deploy WAR project into one web application on server to <property>deploy</property> folder.
+ </para>
+ </section>
+
+ <section id="EAR">
+ <title>EAR Deployment</title>
+ <para>
+ The project layout for EAR projects is:
+ </para>
+
+ <figure>
+ <title>Project Layout for EAR projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_2.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>An EAR project can use the whole range of Seam components, including EJB3 Session
- beans.</para>
- <para>In order to deploy EAR project on server, right-click on the project with
- <property>-ear</property> postfix and select <emphasis>
- <property>Run As > Run on Server</property>.</emphasis> Studio will take care
- about all modules and deploy EAR project into one enterprise application on server to
- <property>deploy</property> folder. EAR application keeps <property>ejb</property>
- and <property>war</property> modules of the EAR project.</para>
-
- <note><title>Note:</title>
- <para>The <property>WAR</property> generated for <property>EARs</property> is now configured to utilize Seam hot-deployment (<emphasis><property>WEB-INF/dev</property></emphasis>) similar to standalone <property>WAR</property> projects.</para>
-
- </note>
-
- </section>
-
- <section id="seam_version_changing">
-
- <title>Changing the Seam Version</title>
-
- <para>To upgrade or downgrade your projects Seam version use the facet preferences. You
- should right-click your project, open its <property>Properties</property> and choose <emphasis>
- <property>Project Facets</property>
- </emphasis> category. Next select <emphasis>
- <property>Seam</property>
- </emphasis> and change its version to needed one.</para>
-
- <figure>
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_3.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ An EAR project can use the whole range of Seam components, including EJB3 Session beans.
+ </para>
+
+ <para>
+ In order to deploy EAR project on server, right-click on the project with <property>-ear</property> postfix and select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run on Server.</guimenuitem></menuchoice> Studio will take care about all modules and deploy EAR project into one enterprise application on server to <property>deploy</property> folder. EAR application keeps <property>ejb</property> and <property>war</property> modules of the EAR project.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ The <property>WAR</property> generated for <property>EARs</property> is now configured to utilize Seam hot-deployment (<emphasis><property>WEB-INF/dev</property></emphasis>) similar to standalone <property>WAR</property> projects.
+ </para>
+ </note>
+ </section>
+
+ <section id="seam_version_changing">
+ <title>Changing the Seam Version</title>
+ <para>
+ To upgrade or downgrade your projects Seam version use the facet preferences. You should right-click your project, open its <property>Properties</property> and choose <emphasis> <property>Project Facets</property> </emphasis> category. Next select <emphasis> <property>Seam</property> </emphasis> and change its version to needed one.
+ </para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_3.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After pressing <emphasis>
- <property>Apply</property>
- </emphasis> the wizard for adjusting new Seam runtime settings appears.</para>
-
- <figure>
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_4.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ After pressing <emphasis> <property>Apply</property> </emphasis> the wizard for adjusting new Seam runtime settings appears.
+ </para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_4.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you need to update the libraries for you project, check the <emphasis>
- <property>Update libraries</property>
- </emphasis> option. All libraries you checked will be removed and the libraries from the
- new Seam distribution will be added after clicking <emphasis>
- <property>Ok</property>.</emphasis></para>
-
- <figure>
- <title>Changing the Seam Facet Version</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_5.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ If you need to update the libraries for you project, check the <emphasis> <property>Update libraries</property> </emphasis> option. All libraries you checked will be removed and the libraries from the new Seam distribution will be added after clicking <emphasis> <property>Ok</property>.</emphasis>
+ </para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_5.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Note:</title>
-
- <para>The note "Seam configuration files and their XSDs won't be changed" is
- meant that the libraries, Seam facet and runtime version will be changed, but
- configuration files that refer to the old version will have to be manually
- updated.</para>
- </note>
- </section>
-
- <section id="changing_seam_parent_project">
- <title>Changing Seam Parent Project</title>
-
- <para>Starting from the 2.0.0.CR2 version of <property>JBoss Tools</property> it is possible
- to change the Seam parent project. In earlier versions this was only controllable at a
- project creation time, now it can be changed for existing projects too.</para>
-
- <para>Go to your project preferences and select <emphasis>
- <property>Seam Settings</property>
- </emphasis> category on the left. Press the <emphasis>
- <property>Browse</property>
- </emphasis> button next to the <emphasis>
- <property>Main Seam Project</property>
- </emphasis> section to select the other Seam parent project.</para>
-
- <figure>
- <title>Changing Seam Parent Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_6.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ The note "Seam configuration files and their XSDs won't be changed" is meant that the libraries, Seam facet and runtime version will be changed, but configuration files that refer to the old version will have to be manually updated.
+ </para>
+ </note>
+ </section>
+
+ <section id="changing_seam_parent_project">
+ <title>Changing Seam Parent Project</title>
+ <para>
+ Starting from the 2.0.0.CR2 version of <property>JBoss Tools</property> it is possible to change the Seam parent project. In earlier versions this was only controllable at a project creation time, now it can be changed for existing projects too.
+ </para>
+
+ <para>
+ Go to your project preferences and select <emphasis> <property>Seam Settings</property> </emphasis> category on the left. Press the <emphasis> <property>Browse</property> </emphasis> button next to the <emphasis> <property>Main Seam Project</property> </emphasis> section to select the other Seam parent project.
+ </para>
+
+ <figure>
+ <title>Changing Seam Parent Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_6.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="renaming_projects_folders">
- <title>Renaming the Projects and Folders</title>
-
- <para>If you need to rename one of the Seam Project artifacts
- (<emphasis><project_name></emphasis>,
- <emphasis><project_name>-ear</emphasis>,
- <emphasis><project_name>-ejb</emphasis> or
- <emphasis><project_name>-test</emphasis>) or any entire folder like
- <emphasis><project_name>/WebContent</emphasis>,
- <emphasis><project_name>/ejbModule</emphasis>,
- <emphasis><project_name>-test/test-src</emphasis>, or project name in
- packages <emphasis>org.domain.<project_name>.session</emphasis>,
- <emphasis>org.domain.<project_name>.entity</emphasis>, you can do this
- by brining the context menu and navigating <emphasis>
- <property>Refactor > Rename...</property>
- </emphasis> or just pressing <emphasis>
- <property>Shift + Alt + R</property>
- </emphasis> under the chosen resource.</para>
-
- <figure>
- <title>Renaming the folder</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_7.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="renaming_projects_folders">
+ <title>Renaming the Projects and Folders</title>
+ <para>
+ If you need to rename one of the Seam Project artifacts (<emphasis><project_name></emphasis>, <emphasis><project_name>-ear</emphasis>, <emphasis><project_name>-ejb</emphasis> or <emphasis><project_name>-test</emphasis>) or any entire folder like <emphasis><project_name>/WebContent</emphasis>, <emphasis><project_name>/ejbModule</emphasis>, <emphasis><project_name>-test/test-src</emphasis>, or project name in packages <emphasis>org.domain.<project_name>.session</emphasis>, <emphasis>org.domain.<project_name>.entity</emphasis>, you can do this by brining the context menu and navigating <emphasis> <property>Refactor > Rename...</property> </emphasis> or just pressing <emphasis> <property>Shift + Alt + R</property> </emphasis> under the chosen resource.
+ </para>
+
+ <figure>
+ <title>Renaming the folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_7.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Use <emphasis>
- <property>Refactor > Move...</property>
- </emphasis> (or <emphasis>
- <property>Shift + Alt + V</property>
- </emphasis>), if you need to move
- <emphasis><project_name>/WebContent</emphasis> folder,
- <emphasis><project_name>/ejbModule</emphasis> folder or
- <emphasis><project_name>/test-src</emphasis> folder in the other place
- within the Project structure.</para>
-
- <figure>
- <title>Moving the folder</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/directory_structure/directory_structure_8.png"
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Use <emphasis> <property>Refactor > Move...</property> </emphasis> (or <emphasis> <property>Shift + Alt + V</property> </emphasis>), if you need to move <emphasis><project_name>/WebContent</emphasis> folder, <emphasis><project_name>/ejbModule</emphasis> folder or <emphasis><project_name>/test-src</emphasis> folder in the other place within the Project structure.
+ </para>
+
+ <figure>
+ <title>Moving the folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_8.png"
scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-</chapter>
\ No newline at end of file
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/generate_entities.xml
===================================================================
--- trunk/seam/docs/reference/en-US/generate_entities.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/generate_entities.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,56 +1,79 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="generate_entities">
- <?dbhtml filename="generate_entities.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Generate Entities</title>
-
- <para>The main purpose of this chapter is to tell you about Seam Generate Entities.</para>
- <para>Generate Entities is available directly from Eclipse using Hibernate Tools plugin for the standard seam-gen generation.</para>
- <para>The wizard generates a set of CRUD Seam components and web pages based on existing tables in a database or on existing entities in your application.</para>
-
-
- <figure>
- <title>Generate Seam Entities Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/generate_entities/generate_entities1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>By default, the generation mode is set to <emphasis><property>Reverse engineer from database</property>.</emphasis>
- The reverse engineering from a database could be described in four steps:</para>
- <orderedlist>
- <listitem><para>The wizard gets in database, extracts the tables and
- their connections</para></listitem>
- <listitem><para>On basis of this metainfomation the Entity classes are generated into
- <literal>org.domain.project.entity</literal> package</para></listitem>
- <listitem><para>For the entities from step 2 the classes <property>EntityList</property> and <property>EntityHome</property> are generated
- into <literal>org.domain.project.session</literal> package</para></listitem>
- <listitem><para>The xhtml pages are generated.</para></listitem>
- </orderedlist>
-
- <note>
- <title>Note:</title>
- <para>The entities are generated from a database based on the console configuration that is created automatically during a Seam project creation.
- (Read more about the console configuration in the Hibernate guides). The created console configuration is based on the
- connection profile set on the <xref linkend="seamFacet"/> while creating a project.
- Configured connection profile settings are hold in the generated <literal>hibernate-console.properties</literal>. To change the connection
- profile, double-click the console configuration. It could be found in the <property>Hibernate Configurations</property> view
- (<emphasis><property>Window > Show view > Other > Hibernate > Hibernate Configurations</property></emphasis>
- or just switch to the <property>Hibernate</property> perspective).</para>
- </note>
- <para>
- Checking the <emphasis><property>Use existing entities</property></emphasis> mode the wizard executes only 3 and 4 steps. It generates missing classes and
- xhtml pages.
- </para>
-
- <para>Read the <xref linkend="crud_database_application"/> chapter in order to see how the <property>Generate Seam Entities</property> wizard can be used.</para>
- </chapter>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="generate_entities">
+<?dbhtml filename="generate_entities.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+
+ <keyword>Seam</keyword>
+
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Seam Generate Entities</title>
+ <para>
+ The main purpose of this chapter is to tell you about Seam Generate Entities.
+ </para>
+
+ <para>
+ Generate Entities is available directly from Eclipse using Hibernate Tools plugin for the standard seam-gen generation.
+ </para>
+
+ <para>
+ The wizard generates a set of CRUD Seam components and web pages based on existing tables in a database or on existing entities in your application.
+ </para>
+
+ <figure>
+ <title>Generate Seam Entities Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/generate_entities/generate_entities1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ By default, the generation mode is set to <emphasis><property>Reverse engineer from database</property>.</emphasis> The reverse engineering from a database could be described in four steps:
+ </para>
+
+ <orderedlist>
+ <listitem>
+ <para>
+ The wizard gets in database, extracts the tables and their connections
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ On basis of this metainfomation the Entity classes are generated into <literal>org.domain.project.entity</literal> package
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ For the entities from step 2 the classes <property>EntityList</property> and <property>EntityHome</property> are generated into <literal>org.domain.project.session</literal> package
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ The xhtml pages are generated.
+ </para>
+ </listitem>
+ </orderedlist>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ The entities are generated from a database based on the console configuration that is created automatically during a Seam project creation. (Read more about the console configuration in the Hibernate guides). The created console configuration is based on the connection profile set on the <xref linkend="seamFacet"/> while creating a project. Configured connection profile settings are hold in the generated <literal>hibernate-console.properties</literal>. To change the connection profile, double-click the console configuration. It could be found in the <property>Hibernate Configurations</property> view (<menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show view</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Hibernate</guimenuitem><guimenuitem>Hibernate Configurations</guimenuitem></menuchoice> or just switch to the <property>Hibernate</property> perspective).
+ </para>
+ </note>
+
+ <para>
+ Checking the <emphasis><property>Use existing entities</property></emphasis> mode the wizard executes only 3 and 4 steps. It generates missing classes and xhtml pages.
+ </para>
+
+ <para>
+ Read the <xref linkend="crud_database_application"/> chapter in order to see how the <property>Generate Seam Entities</property> wizard can be used.
+ </para>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/seam_editors.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_editors.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_editors.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -302,7 +302,7 @@
<section>
<title>Seam Pages Diagram Preferences</title>
<para>
- In order to customize the layout of Diagram you can go to <property>Window > Preferences > JBoss Tools > Web > Seam > Editors > Seam Pages Diagram</property>.
+ In order to customize the layout of Diagram you can go to <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Seam</guimenuitem><guimenuitem>Editors</guimenuitem><guimenuitem>Seam Pages Diagram</guimenuitem></menuchoice>.
</para>
<figure>
@@ -756,7 +756,7 @@
</note>
<para>
- In the preferences page for Seam Validator you can see and modify the validator behavior. Go to <emphasis> <property>Window > Preferences > JBoss Tools > Web > Seam > Validator</property> </emphasis> and select the severity level for the optional Seam Validator problem.
+ In the preferences page for Seam Validator you can see and modify the validator behavior. Go to <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Seam</guimenuitem><guimenuitem>Validator</guimenuitem></menuchoice> and select the severity level for the optional Seam Validator problem.
</para>
<figure>
Modified: trunk/seam/docs/reference/en-US/seam_faq.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_faq.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_faq.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,73 +1,60 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="seam_faq">
- <?dbhtml filename="vwt_faq.html"?>
- <title>FAQ</title>
-
- <section id="seam_question_1">
- <title>How to get Code Assist for Seam specific resources in an externally generated
- project?</title>
-
- <para>To get Code Assist for Seam specific resources in an externally generated project, you
- should enable Seam features in Project Preferences. Right click an imported project and
- navigate <emphasis>
- <property>Properties > Seam Settings</property>.</emphasis> Check <emphasis>
- <property>Seam support</property>
- </emphasis> box to enable all available <xref linkend="project_pref"/>.</para>
- </section>
-
- <section id="seam_question_2">
- <title>How to import an example Seam project from jboss-eap directory?</title>
-
- <para>To import an example Seam project from <emphasis>
- <property>jboss-eap</property>
- </emphasis> into your working directory, you should perform the following steps:</para>
-
- <itemizedlist>
- <listitem>
- <para>Go to <emphasis>
- <property>New > Other > Java Project from Existing Buildfile</property>
- </emphasis></para>
- </listitem>
-
- <listitem>
- <para>Point to the <emphasis>
- <property>build.xml</property>
- </emphasis> of any chosen project by pressing <emphasis>
- <property>Browse</property>
- </emphasis> button</para>
- </listitem>
-
- <listitem>
- <para>Hit <emphasis>
- <property>Finish</property>
- </emphasis> to open the project</para>
- </listitem>
- </itemizedlist>
-
- <para>As these seam examples are non WTP projects, next you should enable Seam support for
- them. To do that, right click the project and go to <emphasis>
- <property>Properties > Seam Settings</property>.</emphasis></para>
- </section>
-
- <section id="seam_question_3">
- <title>How to change the deploy folders for Seam source code from src/hot and src/main?</title>
-
- <para>You should right-click the project, select <emphasis>
- <property>Properties > Java Build Path</property>,</emphasis> then switch to the <emphasis>
- <property>Source tab</property>,</emphasis> select the output folder for <emphasis>
- <property>src/hot</property></emphasis> (<emphasis>
- <property>src/main</property>)</emphasis> and click <emphasis>
- <property>Edit</property></emphasis> to change their output location.</para>
-
- <para>In conclusion, the main goal of this document is to get you know with a full featureset
- that <property>JBoss Tools</property> provides to support Seam development. Thus if you have
- some questions, comments or suggestions on the topic, please fell free to ask in the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
- Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in
- future leaving your vote on the article <ulink
- url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
- >Overview of the improvements required by JBossTools/JBDS Docs users</ulink>. </para>
-
- <para>A set of movies on Seam tooling is available on <ulink url="http://docs.jboss.org/tools/movies">Seam movies page</ulink>.</para>
- </section>
-</chapter>
+<?xml version='1.0' encoding='UTF-8'?>
+<chapter id="seam_faq">
+<?dbhtml filename="vwt_faq.html"?>
+ <title>FAQ</title>
+ <section id="seam_question_1">
+ <title>How to get Code Assist for Seam specific resources in an externally generated project?</title>
+ <para>
+ To get Code Assist for Seam specific resources in an externally generated project, you should enable Seam features in Project Preferences. Right click an imported project and navigate <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Seam Settings.</guimenuitem></menuchoice> Check <emphasis> <property>Seam support</property> </emphasis> box to enable all available <xref linkend="project_pref"/>.
+ </para>
+ </section>
+
+ <section id="seam_question_2">
+ <title>How to import an example Seam project from jboss-eap directory?</title>
+ <para>
+ To import an example Seam project from <emphasis> <property>jboss-eap</property> </emphasis> into your working directory, you should perform the following steps:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Go to <menuchoice><guimenuitem>New</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>Java Project from Existing Buildfile</guimenuitem></menuchoice>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Point to the <emphasis> <property>build.xml</property> </emphasis> of any chosen project by pressing <emphasis> <property>Browse</property> </emphasis> button
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Hit <emphasis> <property>Finish</property> </emphasis> to open the project
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ As these seam examples are non WTP projects, next you should enable Seam support for them. To do that, right click the project and go to <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Seam Settings.</guimenuitem></menuchoice>
+ </para>
+ </section>
+
+ <section id="seam_question_3">
+ <title>How to change the deploy folders for Seam source code from src/hot and src/main?</title>
+ <para>
+ You should right-click the project, select <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Java Build Path,</guimenuitem></menuchoice> then switch to the <emphasis> <property>Source tab</property>,</emphasis> select the output folder for <emphasis> <property>src/hot</property></emphasis> (<emphasis> <property>src/main</property>)</emphasis> and click <emphasis> <property>Edit</property></emphasis> to change their output location.
+ </para>
+
+ <para>
+ In conclusion, the main goal of this document is to get you know with a full feature set that <property>JBoss Tools</property> provides to support Seam development. Thus if you have some questions, comments or suggestions on the topic, please fell free to ask in the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in future leaving your vote on the article <ulink
+ url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
+ >Overview of the improvements required by JBossTools/JBDS Docs users</ulink>.
+ </para>
+
+ <para>
+ A set of movies on Seam tooling is available on <ulink url="http://docs.jboss.org/tools/movies">Seam movies page</ulink>.
+ </para>
+ </section>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/seam_menus_and_actions.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_menus_and_actions.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_menus_and_actions.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -42,7 +42,7 @@
<section id="file_menu">
<title>File Menu Actions</title>
<para>
- In a Seam perspective, by default there are the following actions in <emphasis> <property>File > New</property> </emphasis> submenu
+ In a Seam perspective, by default there are the following actions in <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem></menuchoice> submenu
</para>
<table>
@@ -270,7 +270,7 @@
<section id="open_seam_component">
<title>Open Seam Component</title>
<para>
- To open Seam Components click on <emphasis><property>Navigate > Open Seam Component</property></emphasis> in the main menu bar. This dialog is also available from toolbar icon or with hot keys combination "Ctrl+Shift+Z ".
+ To open Seam Components click on <menuchoice><guimenuitem>Navigate</guimenuitem><guimenuitem>Open Seam Component</guimenuitem></menuchoice> in the main menu bar. This dialog is also available from toolbar icon or with hot keys combination "Ctrl+Shift+Z ".
</para>
<figure>
Modified: trunk/seam/docs/reference/en-US/seam_preferences.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_preferences.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_preferences.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,237 +1,250 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="seam_preferences">
- <!-- mark as new -->
- <?dbhtml filename="seam_preferences.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>Preferences</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Preferences</title>
-
- <para>In this chapter you get to know how Seam preferences can be modified during the
- development process.</para>
-
- <section id="gen_pref">
- <title>General Preferences</title>
-
- <para>Seam preferences can be set using the Seam preference page. Click on
- <emphasis><property>Window > Preferences > JBoss Tools > Web >
- Seam</property>.</emphasis></para>
-
- <para>On this page you can manage the Seam Runtime. Use the appropriate buttons to
- <property>Add</property> more runtimes or to <property>Remove</property> those that
- are not needed.</para>
-
- <figure>
- <title>Seam Preferences Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Clicking on <property>Edit</property> button you get the form where you can change the
- path of Seam runtime home folder, modify name and version. Press
- <property>Finish</property> to apply the changes.</para>
-
- <figure>
- <title>Edit Seam Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences1_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Tip:</title>
- <para>If you try to delete the Seam Runtime that is already in use by some project in the current workspace, then a warning message will appear. To confirm the removal press <property>OK</property>
- </para>
- <para>Besides, when you right-click on your Seam project with deleted runtime in Project Explorer and select<property> Properties > Seam Settings</property> the error message "Runtime <runtime_name> does not exist" will appear. </para>
- </note>
- <section id="validator_pref">
-
- <title>Validator Preferences</title>
-
- <para>Seam preference page includes a subsection <property>Validator</property>. See
- <emphasis><property>Window > Preferences > JBoss Tools > Web > Seam >
- Validator</property>.</emphasis></para>
- <para>On this page you can choose a severity level for the various Seam validator
- problems. For example, if you want to ignore the case when component name is
- duplicated expand the <property>Components</property> node and select
- <property>Ignore</property> next to <property>Duplicate component
- name</property>. After that you won't see the error.</para>
-
-
- <figure>
- <title>Seam Validator Preference Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences1_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Notice, that in the <emphasis>
- <property>Expression language</property>
- </emphasis> section there is now a preference for setting severity of EL Syntax. You
- can select whether the Seam validator displays an error, a warning or just ignore
- the EL Syntax error.</para>
- <note><para>There are references made between each EL and variable name, so you can revalidate a particular EL if a context variable was changed. This makes parsing of each resource with referenced ELs much faster.</para></note>
-
-
- <figure>
- <title>Severity Preference for EL Syntax</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/el_syntax_error.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <emphasis>
- <property>Revalidate unresolved ELs automatically</property></emphasis> option is enabled by default.
- If necessary, you can uncheck it. It may increase a performance for big complex projects.</para>
-
- <para>In the upper right corner of the Seam Validator preferences page there is a <emphasis><property>Configure Project
- Specific Settings</property></emphasis> link. Clicking on it you get the form where you can
- choose a project for specific setting. Project specific configuration allows you to
- have different validator settings for each project. Check the <emphasis><property>Show only
- projects with project specific settings</property></emphasis> if you want to see the
- projects that have been already set. Click on <property>Ok</property>.</para>
-
- <figure>
- <title>Project Specific Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences1_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You get the validator properties page for chosen project. Check the
- <property>Enable project specific settings</property> to be able to change the
- settings.</para>
-
- <note>
- <title>Note:</title>
- <para>You can open the same page by right clicking on the needed project in Package
- Explorer, then <emphasis><property>Properties > Seam
- Validator</property>.</emphasis></para>
- </note>
-
- <figure>
- <title>Validator Properties Page for Chosen Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences1_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- </section>
- </section>
-
- <section id="project_pref">
- <title>Project Preferences</title>
-
- <para>Once Seam project is created you can modify its settings. Right click on Seam project
- in Project Explorer and select <emphasis><property>Properties > Seam
- Settings</property>.</emphasis></para>
- <para>This project properties page allows you to have a flexible project layout. It means
- that you are not restricted with a specific project structure. You can use the Seam
- wizards (New Action, Form, Entity, etc.) on Maven, command line seam-gen or your own
- project structure. </para>
-
- <figure>
- <title>Properties for Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Tip:</title>
- <para>The wizard doesn't allow the renaming of the artifacts listed in the Seam
- Settings. It's possible to do in the <property>Package Explorer</property>.
- See <xref linkend="renaming_projects_folders"/>.</para>
- </note>
-
- <para>Also notice, you are not required to use the <property>New Seam Project
- wizard</property> to benefit from Seam artifact wizards. You can just enable Seam on
- your existing project by checking <property>Seam Support</property> and targeting to
- Seam Runtime, and then configure the folders as you want.</para>
-
- <figure>
- <title>Properties for Seam Project when Seam runtime is not selected</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences2_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <note>
- <title>Tip:</title>
- <para>On the figure above fields for configuring Seam artifacts are unavailable because Seam
- Runtime is not selected.</para>
- </note>
-
- <para>In Seam Wizards (New Action, Form, Entity, Conversation, Generate Entities) you can
- get a quick access to project settings using the <property>Settings</property> link in
- the upper right corner of each wizard.</para>
-
- <figure>
- <title>Quick Setting Link In Seam Wizards</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/seam_preferences2_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="add_custom_capabilities">
- <title>Adding Custom Capabilities</title>
-
- <para><property>JBoss Tools</property> provides a possibility to add custom capabilities to any Seam project,
- i.e. add a support of additional frameworks built on top of JSF, such as <itemizedlist>
- <listitem><para>ADF</para></listitem>
- <listitem><para>Facelets</para></listitem>
- <listitem><para>JBoss Rich Faces (versions 3.1, 3.2, 3.3)</para></listitem>
- </itemizedlist>
- </para>
- <para>To enable it, you should call the context menu for a Seam project and select <emphasis><property>JBoss
- Tools > Add Custom Capabilities</property>.</emphasis> Then check the needed modules and press
- <emphasis><property>Finish</property>.</emphasis></para>
-
- <figure>
- <title> Custom Capabilities be added to Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/addCustomCapabilities.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The next page displays all the updates that have been made to the project.</para>
-
- <figure>
- <title>Adding Custom Capabilities to Seam Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_preferences/addCustomCapabilities2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="seam_preferences">
+<!-- mark as new -->
+<?dbhtml filename="seam_preferences.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+
+ <keyword>Seam</keyword>
+
+ <keyword>Preferences</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Seam Preferences</title>
+ <para>
+ In this chapter you get to know how Seam preferences can be modified during the development process.
+ </para>
+
+ <section id="gen_pref">
+ <title>General Preferences</title>
+ <para>
+ Seam preferences can be set using the Seam preference page. Click on <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Seam.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ On this page you can manage the Seam Runtime. Use the appropriate buttons to <property>Add</property> more runtimes or to <property>Remove</property> those that are not needed.
+ </para>
+
+ <figure>
+ <title>Seam Preferences Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Clicking on <property>Edit</property> button you get the form where you can change the path of Seam runtime home folder, modify name and version. Press <property>Finish</property> to apply the changes.
+ </para>
+
+ <figure>
+ <title>Edit Seam Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences1_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Tip:</title>
+ <para>
+ If you try to delete the Seam Runtime that is already in use by some project in the current workspace, then a warning message will appear. To confirm the removal press <property>OK</property>
+ </para>
+
+ <para>
+ Besides, when you right-click on your Seam project with deleted runtime in Project Explorer and select <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Seam Settings</guimenuitem></menuchoice> the error message "Runtime <runtime_name> does not exist" will appear.
+ </para>
+ </note>
+
+ <section id="validator_pref">
+ <title>Validator Preferences</title>
+ <para>
+ Seam preference page includes a subsection <property>Validator</property>. See <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Seam</guimenuitem><guimenuitem>Validator.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ On this page you can choose a severity level for the various Seam validator problems. For example, if you want to ignore the case when component name is duplicated expand the <property>Components</property> node and select <property>Ignore</property> next to <property>Duplicate component name</property>. After that you won't see the error.
+ </para>
+
+ <figure>
+ <title>Seam Validator Preference Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences1_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Notice, that in the <emphasis> <property>Expression language</property> </emphasis> section there is now a preference for setting severity of EL Syntax. You can select whether the Seam validator displays an error, a warning or just ignore the EL Syntax error.
+ </para>
+
+ <note>
+ <para>
+ There are references made between each EL and variable name, so you can revalidate a particular EL if a context variable was changed. This makes parsing of each resource with referenced ELs much faster.
+ </para>
+ </note>
+
+ <figure>
+ <title>Severity Preference for EL Syntax</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/el_syntax_error.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The <emphasis> <property>Revalidate unresolved ELs automatically</property></emphasis> option is enabled by default. If necessary, you can uncheck it. It may increase a performance for big complex projects.
+ </para>
+
+ <para>
+ In the upper right corner of the Seam Validator preferences page there is a <emphasis><property>Configure Project Specific Settings</property></emphasis> link. Clicking on it you get the form where you can choose a project for specific setting. Project specific configuration allows you to have different validator settings for each project. Check the <emphasis><property>Show only projects with project specific settings</property></emphasis> if you want to see the projects that have been already set. Click on <property>Ok</property>.
+ </para>
+
+ <figure>
+ <title>Project Specific Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences1_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ You get the validator properties page for chosen project. Check the <property>Enable project specific settings</property> to be able to change the settings.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ You can open the same page by right clicking on the needed project in Package Explorer, then <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Seam Validator.</guimenuitem></menuchoice>
+ </para>
+ </note>
+
+ <figure>
+ <title>Validator Properties Page for Chosen Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences1_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="project_pref">
+ <title>Project Preferences</title>
+ <para>
+ Once Seam project is created you can modify its settings. Right click on Seam project in Project Explorer and select <menuchoice><guimenuitem>Properties</guimenuitem><guimenuitem>Seam Settings.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ This project properties page allows you to have a flexible project layout. It means that you are not restricted with a specific project structure. You can use the Seam wizards (New Action, Form, Entity, etc.) on Maven, command line seam-gen or your own project structure.
+ </para>
+
+ <figure>
+ <title>Properties for Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Tip:</title>
+ <para>
+ The wizard doesn't allow the renaming of the artifacts listed in the Seam Settings. It's possible to do in the <property>Package Explorer</property>. See <xref linkend="renaming_projects_folders"/>.
+ </para>
+ </note>
+
+ <para>
+ Also notice, you are not required to use the <property>New Seam Project wizard</property> to benefit from Seam artifact wizards. You can just enable Seam on your existing project by checking <property>Seam Support</property> and targeting to Seam Runtime, and then configure the folders as you want.
+ </para>
+
+ <figure>
+ <title>Properties for Seam Project when Seam runtime is not selected</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences2_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Tip:</title>
+ <para>
+ On the figure above fields for configuring Seam artifacts are unavailable because Seam Runtime is not selected.
+ </para>
+ </note>
+
+ <para>
+ In Seam Wizards (New Action, Form, Entity, Conversation, Generate Entities) you can get a quick access to project settings using the <property>Settings</property> link in the upper right corner of each wizard.
+ </para>
+
+ <figure>
+ <title>Quick Setting Link In Seam Wizards</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/seam_preferences2_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="add_custom_capabilities">
+ <title>Adding Custom Capabilities</title>
+ <para>
+ <property>JBoss Tools</property> provides a possibility to add custom capabilities to any Seam project, i.e. add a support of additional frameworks built on top of JSF, such as
+ <itemizedlist>
+ <listitem>
+ <para>
+ ADF
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Facelets
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ JBoss Rich Faces (versions 3.1, 3.2, 3.3)
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>
+ To enable it, you should call the context menu for a Seam project and select <menuchoice><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Add Custom Capabilities.</guimenuitem></menuchoice> Then check the needed modules and press <emphasis><property>Finish</property>.</emphasis>
+ </para>
+
+ <figure>
+ <title> Custom Capabilities be added to Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/addCustomCapabilities.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The next page displays all the updates that have been made to the project.
+ </para>
+
+ <figure>
+ <title>Adding Custom Capabilities to Seam Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_preferences/addCustomCapabilities2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/seam_refactoring.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_refactoring.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_refactoring.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,231 +1,292 @@
<?xml version='1.0' encoding='UTF-8'?>
<chapter id="seam_refactoring">
- <?dbhtml filename="seam_refactoring.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>Seam refactoring tools
- </keyword>
- <keyword>seam</keyword>
- <keyword>rename</keyword>
- </keywordset>
- </chapterinfo>
- <title>Seam Refactoring Tools</title>
- <para>The goal of Seam components refactoring is to make system-wide code changes without affecting the behavior of the program.
- The Seam module of <property>JBoss Tools</property> provides assistance in easily code refactoring.</para>
-
- <para>Starting from Jboss Tools M4 refactoring functionality became also available for managed beans, method and properties used in ELs.
- Thus now Seam refactoring tools include the next refactoring operations:</para>
-
- <itemizedlist>
- <listitem><para><xref linkend="renaming_seam_components"/></para></listitem>
- <listitem><para><xref linkend="renaming_seam_context_vars"/></para></listitem>
- </itemizedlist>
-
- <para>Refactoring commands are available from the context menus of several views and editors and use a standard Eclipse refactoring wizard.
- For details, see <xref linkend="RefactornigWizard"/> later in this chapter.</para>
-
- <note>
- <title>Note:</title>
- <para>Seam refactoring could be only performed in the file that is not marked as <emphasis><property>Read only</property></emphasis> in its properties.</para>
- </note>
-
- <figure>
- <title>Properties View for Java File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <section id="RefactornigWizard">
- <title>Using the Refactorinig Wizard</title>
- <para>This wizard is opened always when the user clicks the <emphasis><property>Rename Seam Component</property>,</emphasis>
- <emphasis><property>Rename Seam Context Variable</property></emphasis>
- or <emphasis><property>Rename</property></emphasis> command in any of the views/editors mentioned later in this chapter.
- </para>
-
- <figure>
- <title>Refactoring Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the <property>Seam Components name</property> field you should enter a new name of the component,
- then click <property>Next</property> and follow the next wizard steps:
+<?dbhtml filename="seam_refactoring.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Seam refactoring tools</keyword>
+
+ <keyword>seam</keyword>
+
+ <keyword>rename</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Seam Refactoring Tools</title>
+ <para>
+ The goal of Seam components refactoring is to make system-wide code changes without affecting the behavior of the program. The Seam module of <property>JBoss Tools</property> provides assistance in easily code refactoring.
+ </para>
+
+ <para>
+ Starting from Jboss Tools M4 refactoring functionality became also available for managed beans, method and properties used in ELs. Thus now Seam refactoring tools include the next refactoring operations:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="renaming_seam_components"/>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <xref linkend="renaming_seam_context_vars"/>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Refactoring commands are available from the context menus of several views and editors and use a standard Eclipse refactoring wizard. For details, see <xref linkend="RefactornigWizard"/> later in this chapter.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ Seam refactoring could be only performed in the file that is not marked as <emphasis><property>Read only</property></emphasis> in its properties.
+ </para>
+ </note>
+
+ <figure>
+ <title>Properties View for Java File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="RefactornigWizard">
+ <title>Using the Refactorinig Wizard</title>
+ <para>
+ This wizard is opened always when the user clicks the <emphasis><property>Rename Seam Component</property>,</emphasis> <emphasis><property>Rename Seam Context Variable</property></emphasis> or <emphasis><property>Rename</property></emphasis> command in any of the views/editors mentioned later in this chapter.
+ </para>
+
+ <figure>
+ <title>Refactoring Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ In the <property>Seam Components name</property> field you should enter a new name of the component, then click <property>Next</property> and follow the next wizard steps:
+ </para>
+
+ <figure>
+ <title>Navigating Between the Differences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ As you see, when performing a refactoring operation, you can preview all of the changes resulting from a refactoring action before you choose to carry them out.
+ </para>
+
+ <para>
+ The view represents two windows: one with the original source code and the other with refactored one.
+ </para>
+
+ <para>
+ With the help of
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt1.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ,
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt2.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ,
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt3.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ ,
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/butt4.png"/>
+ </imageobject>
+ </inlinemediaobject>
+ buttons you can quickly navigate between the differences in the code. If you don't agree with some changes you can't undo them but you can remove the class from the list of classes that need refactoring.
+ </para>
+
+ <figure>
+ <title>List of classes that need refactoring </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ To apply the changes click <emphasis><property>Finish</property>.</emphasis>
+ </para>
+
+ <para>
+ Renaming the selected seam component corrects all references to the component (also in other files in the project). Renaming a type doesn't allow to rename similarly named variables and methods.
+ </para>
+ </section>
+
+ <section id="renaming_seam_components">
+ <title>Renaming Seam Components</title>
+ <para>
+ Renaming a Seam component could be performed in the:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="JavaEditor"/>
</para>
-
- <figure>
- <title>Navigating Between the Differences</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you see, when performing a refactoring operation, you can preview all of the changes resulting from a refactoring
- action before you choose to carry them out.</para>
-
- <para>The view represents two windows: one with the original source code and the other with refactored one.</para>
-
- <para>With the help of
- <inlinemediaobject> <imageobject>
- <imagedata fileref="images/seam_refactoring/butt1.png"/>
- </imageobject></inlinemediaobject>,
- <inlinemediaobject> <imageobject>
- <imagedata fileref="images/seam_refactoring/butt2.png"/>
- </imageobject></inlinemediaobject>,
- <inlinemediaobject> <imageobject>
- <imagedata fileref="images/seam_refactoring/butt3.png"/>
- </imageobject></inlinemediaobject>,
- <inlinemediaobject> <imageobject>
- <imagedata fileref="images/seam_refactoring/butt4.png"/>
- </imageobject></inlinemediaobject> buttons you can quickly navigate between the differences in the code.
- If you don't agree with some changes you can't undo them but you can remove the class from the list of classes that need refactoring.
- </para>
-
- <figure>
- <title>List of classes that need refactoring
- </title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To apply the changes click <emphasis><property>Finish</property>.</emphasis></para>
-
- <para>Renaming the selected seam component corrects all references to the
- component (also in other files in the project). Renaming a type doesn't allow to rename
- similarly named variables and methods.
- </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <xref linkend="SeamComponents"/>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <xref linkend="components_xml_editor"/>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="JavaEditor">
+ <title>Renaming Seam Components in the Java Editor</title>
+ <para>
+ If you want to rename certain seam component using Java editor, first of all it's necessary to open it. If you don't know, where the seam component is declared, use <xref linkend="open_seam_component"/> icon.
+ </para>
+
+ <para>
+ To rename a Seam component in the Java editor it's necessary to select the component, left click the file and then select <menuchoice><guimenuitem>Seam Refactor</guimenuitem><guimenuitem>Rename Seam Component.</guimenuitem></menuchoice>
+ </para>
+
+ <figure>
+ <title>Opening Refactoring Wizard in Java Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ For details, see also the movie, <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_java/rena...">"Renaming a Seam component in the Java Editor"</ulink>.
+ </para>
</section>
-
- <section id="renaming_seam_components">
- <title>Renaming Seam Components</title>
-
- <para>Renaming a Seam component could be performed in the:</para>
-
- <itemizedlist>
- <listitem><para><xref linkend="JavaEditor"/></para></listitem>
- <listitem><para><xref linkend="SeamComponents"/></para></listitem>
- <listitem><para><xref linkend="components_xml_editor"/></para></listitem>
- </itemizedlist>
-
- <section id="JavaEditor">
- <title>Renaming Seam Components in the Java Editor</title>
- <para>If you want to rename certain seam component using Java editor, first of all it's necessary to open it.
- If you don't know, where the seam component is declared, use <xref linkend="open_seam_component"/> icon.</para>
- <para>To rename a Seam component in the Java editor it's necessary to select the component, left click the file and then select
- <emphasis><property>Seam Refactor > Rename Seam Component</property>.</emphasis>
- </para>
- <figure>
- <title>Opening Refactoring Wizard in Java Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For details, see also the movie,
- <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_java/rena...">"Renaming a Seam component in the Java Editor"</ulink>.</para>
- </section>
-
- <section id="SeamComponents">
- <title>Renaming Seam Components in the Seam Components View</title>
- <para>To open the <property>Refactoring</property> wizard in the <property>Seam Components</property> view
- you should left click the component you want to open and choose <property>Rename Seam Component</property> option.</para>
-
- <figure>
- <title>Opening Refactoring Wizard in Seam Components View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For details, see also the movie,
- <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_view...">"Renaming a Seam component in the Seam Components view"</ulink>.</para>
- </section>
-
- <section id="components_xml_editor">
- <title>Renaming Seam Components in the Seam Components Editor</title>
- <para>When you open <literal>components.xml</literal> file using <property>JBoss Tools XML Editor</property>, open the
- <property>Refactoring</property> wizard in the Tree tab by left-clicking the component in
- <property>components</property> area and choosing <property>Rename</property> option.</para>
-
- <figure>
- <title>Opening Refactoring Wizard in <emphasis><property>components.xml</property></emphasis> File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For details, see also the movie,
- <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_xml/...">"Renaming a Seam component in the components.xml file"</ulink>.</para>
- </section>
-
- </section>
-
- <section id="renaming_seam_context_vars">
- <title>Renaming Seam Context Variables in EL</title>
-
- <para>Renaming a Seam context variables in EL could be executed in <literal>.java</literal>, <literal>.xml</literal>, <literal>.jsp</literal>,
- <literal>.xhtml</literal> and <literal>.properties</literal> files in Seam projects using
- the context menu command <emphasis><property>Seam Refactor > Rename Seam Context Variable</property>.</emphasis></para>
-
- <figure>
- <title>Refactoring Seam Context Variable in .properties File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure>
- <title>Opening Refactoring wizard in components.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <figure>
- <title>Opening Refactoring wizard in .html file</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_refactoring/seam_refactor8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For details, see also a set of movies about renaming Seam context variables in EL in different locations:</para>
- <itemizedlist>
- <listitem>
- <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_java/re...">In the Java editor</ulink></para>
- </listitem>
- <listitem>
- <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_propert...">In the JBoss Tools Properties Editor</ulink></para>
- </listitem>
- <listitem>
- <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_xml/ren...">In the XML editor</ulink></para>
- </listitem>
- <listitem>
- <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_vpe/ren...">In the Visual Page Editor</ulink></para>
- </listitem>
- </itemizedlist>
- </section>
+
+ <section id="SeamComponents">
+ <title>Renaming Seam Components in the Seam Components View</title>
+ <para>
+ To open the <property>Refactoring</property> wizard in the <property>Seam Components</property> view you should left click the component you want to open and choose <property>Rename Seam Component</property> option.
+ </para>
+
+ <figure>
+ <title>Opening Refactoring Wizard in Seam Components View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ For details, see also the movie, <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_view...">"Renaming a Seam component in the Seam Components view"</ulink>.
+ </para>
+ </section>
+
+ <section id="components_xml_editor">
+ <title>Renaming Seam Components in the Seam Components Editor</title>
+ <para>
+ When you open <literal>components.xml</literal> file using <property>JBoss Tools XML Editor</property>, open the <property>Refactoring</property> wizard in the Tree tab by left-clicking the component in <property>components</property> area and choosing <property>Rename</property> option.
+ </para>
+
+ <figure>
+ <title>Opening Refactoring Wizard in <emphasis><property>components.xml</property></emphasis> File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ For details, see also the movie, <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_xml/...">"Renaming a Seam component in the components.xml file"</ulink>.
+ </para>
+ </section>
+ </section>
+
+ <section id="renaming_seam_context_vars">
+ <title>Renaming Seam Context Variables in EL</title>
+ <para>
+ Renaming a Seam context variables in EL could be executed in <literal>.java</literal>, <literal>.xml</literal>, <literal>.jsp</literal>, <literal>.xhtml</literal> and <literal>.properties</literal> files in Seam projects using the context menu command <menuchoice><guimenuitem>Seam Refactor</guimenuitem><guimenuitem>Rename Seam Context Variable.</guimenuitem></menuchoice>
+ </para>
+
+ <figure>
+ <title>Refactoring Seam Context Variable in .properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Opening Refactoring wizard in components.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>Opening Refactoring wizard in .html file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_refactoring/seam_refactor8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ For details, see also a set of movies about renaming Seam context variables in EL in different locations:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_java/re...">In the Java editor</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_propert...">In the JBoss Tools Properties Editor</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_xml/ren...">In the XML editor</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_vpe/ren...">In the Visual Page Editor</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>
-
-
Modified: trunk/seam/docs/reference/en-US/seam_view.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_view.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_view.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -29,7 +29,7 @@
<para>The Seam Components View can show a components default scope in two ways:</para>
<itemizedlist>
- <listitem><para>as labels on each component (click on the triangular symbol at the top of the Seam Components View page and select <emphasis><property>Scope Presentation > Label</property></emphasis>)</para></listitem>
+ <listitem><para>as labels on each component (click on the triangular symbol at the top of the Seam Components View page and select <menuchoice><guimenuitem>Scope Presentation</guimenuitem><guimenuitem>Label</guimenuitem></menuchoice>)</para></listitem>
</itemizedlist>
<figure>
Modified: trunk/seam/docs/reference/en-US/seam_wizards.xml
===================================================================
--- trunk/seam/docs/reference/en-US/seam_wizards.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/seam_wizards.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,341 +1,370 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="seam_wizards">
- <?dbhtml filename="seam_wizards.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Seam</keyword>
- <keyword>JBDS</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Seam Wizards</title>
-
- <para>This chapter introduces you with Seam Components.</para>
- <para>All the Seam component generations options known from Seam-gen are available as wizards
- (with sensible auto-defaulting) for creating various common Seam components:</para>
-
- <itemizedlist>
- <listitem>
- <para>
- <property>Seam Action</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property>Seam Form</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property>Seam Entity</property>
- </para>
- </listitem>
- <listitem>
- <para>
- <property>Seam Conversation</property>
- </para>
- </listitem>
- </itemizedlist>
-
- <para>Go to <emphasis>
- <property>File > New</property>
- </emphasis> and select the component wizard.</para>
-
- <figure>
- <title>Seam Component Wizards</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizards create multiple resources and place it in the appropriate folders depending on
- your project structure (WAR or EAR).</para>
- <para>Let's create a WAR project using the New Seam Project wizard.</para>
-
- <figure>
- <title>Seam Project WAR Deployment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After the project is created you need deploy it on server.</para>
-
-
- <section id="seam_action">
-
- <title>New Seam Action</title>
-
- <para>In this and following sections you can see example creating Seam Components.</para>
- <para>To create a New Seam Action you should select a necessary project, type a name for
- <property>Seam component</property>, <property>POJO class</property>,
- <property>Method</property>, <property>Page</property> and select a
- <property>Package</property> using the <emphasis>
- <property>Browse</property>
- </emphasis> button.</para>
-
- <figure>
- <title>New Seam Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you about it.</para>
-
- <figure>
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/action_warning.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can see the action page in <property>WebContent</property> folder. Click on it to
- open in JBoss Tools HTML Editor.</para>
-
- <figure>
- <title>Action Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_5.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <note>
- <title>Note:</title>
- <para>You don't need to restart the server to see how the action component works. Just
- use context menu <emphasis><property>Run As > Run On
- Server</property>.</emphasis></para>
- </note>
-
- <para>Action component was hot-deployed. Forms and Conversations will work the same
- way.</para>
-
- <figure>
- <title>Action Component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- </section>
- <section id="seam_form">
- <title>New Seam Form</title>
-
- <para>Click on <property>actionMethod</property> in the internal browser and add a form in
- your project using the New Seam Form wizard <emphasis><property>File > New > Seam
- Form</property>.</emphasis></para>
- <para>Select a necessary project, type a name for <property>Seam component</property>,
- <property>POJO class</property>, <property>Method</property>,
- <property>Page</property> and select a <property>Package</property> using <emphasis>
- <property>Browse</property>
- </emphasis> button.</para>
-
- <figure>
- <title>New Seam Form Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you about it.</para>
-
- <figure>
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/form_warning.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Form Page was created in <property>WebContent</property> folder.</para>
-
- <figure>
- <title>Form Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_8.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Deploy the form on server. Right click on Form Page, select <emphasis><property>Run As
- > Run On Server</property>.</emphasis></para>
-
- <figure>
- <title>Form Component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Form component was hot-deployed.</para>
-
- </section>
-
- <section id="seam_conversation">
- <title>New Seam Conversation</title>
-
- <para>Enter some value in the text field (e.g. <property>value1</property>) and click on
- <property>formMethod</property>.</para>
- <para>Add a conversation using the New Seam Conversation wizard <emphasis><property>File >
- New > Seam Form</property>.</emphasis></para>
- <para>You should select a necessary project, type a name for <property>Seam
- component</property>, <property>POJO class</property>, <property>Method</property>,
- <property>Page</property> and select a <property>Package</property> using <emphasis>
- <property>Browse</property>
- </emphasis> button.</para>
-
-
- <figure>
- <title>New Seam Conversation Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you about it.</para>
-
- <figure>
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/conversation_warning.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Conversation page was created in <property>WebContent</property> folder.</para>
-
- <figure>
- <title>Conversation Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_11.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Right click on Conversation page, select <emphasis><property>Run As > Run On
- Server</property>.</emphasis></para>
-
- <figure>
- <title>Conversation Component</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_12.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Conversation component was hot-deployed.</para>
- <para>Click on <property>Begin</property> and <property>Increment</property> buttons to
- check the conversation functionality.</para>
-
- </section>
-
-
- <section id="seam_entity">
- <title>New Seam Entity</title>
-
- <para>Entities cannot be hot-deployed, so we need to stop the server.</para>
- <para>Create an Entity using the New Entity wizard <emphasis><property>File > New > Seam
- Entity</property>.</emphasis>
- </para>
-
- <para>You should select a necessary project, type a name for <property>Entity
- class</property>, select a <property>Package</property> using <emphasis>
- <property>Browse</property>
- </emphasis> button, type a name for <property>Master Page</property> and
- <property>Page</property>.</para>
-
- <figure>
- <title>New Seam Entity Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_13.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you specify a class which already exists, the wizard will warn you about it.</para>
-
- <figure>
- <title>Wizard Warning against Existing File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/entity_warning.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Master Page and the Entity were created in <property>WebContent</property>
- folder.</para>
-
- <figure>
- <title>Master Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_14.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Entity page is:</para>
-
- <figure>
- <title>Entity Page in JBoss Tools HTML Editor.</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_15.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Run the Entity page on server. This is what you get:</para>
-
- <figure>
- <title>Customer Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_16.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Let's create two customers <property>c1</property> and <property>c2</property>. Enter
- the name in the text field and press the <property>Save</property> button. Customer
- should be successfully created. Press <property>Done</property>. Do the same for
- <property>c2</property> customer. The result should be:</para>
-
- <figure>
- <title>Two Customers Are Created</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_17.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="seam_wizards">
+<?dbhtml filename="seam_wizards.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+
+ <keyword>Seam</keyword>
+
+ <keyword>JBDS</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Seam Wizards</title>
+ <para>
+ This chapter introduces you with Seam Components.
+ </para>
+
+ <para>
+ All the Seam component generations options known from Seam-gen are available as wizards (with sensible auto-defaulting) for creating various common Seam components:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <property>Seam Action</property>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <property>Seam Form</property>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <property>Seam Entity</property>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <property>Seam Conversation</property>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Go to <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem></menuchoice> and select the component wizard.
+ </para>
+
+ <figure>
+ <title>Seam Component Wizards</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The wizards create multiple resources and place it in the appropriate folders depending on your project structure (WAR or EAR).
+ </para>
+
+ <para>
+ Let's create a WAR project using the New Seam Project wizard.
+ </para>
+
+ <figure>
+ <title>Seam Project WAR Deployment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ After the project is created you need deploy it on server.
+ </para>
+
+ <section id="seam_action">
+ <title>New Seam Action</title>
+ <para>
+ In this and following sections you can see example creating Seam Components.
+ </para>
+
+ <para>
+ To create a New Seam Action you should select a necessary project, type a name for <property>Seam component</property>, <property>POJO class</property>, <property>Method</property>, <property>Page</property> and select a <property>Package</property> using the <emphasis> <property>Browse</property> </emphasis> button.
+ </para>
+
+ <figure>
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ If you specify a class which already exists, the wizard will warn you about it.
+ </para>
+
+ <figure>
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/action_warning.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ You can see the action page in <property>WebContent</property> folder. Click on it to open in JBoss Tools HTML Editor.
+ </para>
+
+ <figure>
+ <title>Action Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_5.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ You don't need to restart the server to see how the action component works. Just use context menu <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run On Server.</guimenuitem></menuchoice>
+ </para>
+ </note>
+
+ <para>
+ Action component was hot-deployed. Forms and Conversations will work the same way.
+ </para>
+
+ <figure>
+ <title>Action Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="seam_form">
+ <title>New Seam Form</title>
+ <para>
+ Click on <property>actionMethod</property> in the internal browser and add a form in your project using the New Seam Form wizard <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Seam Form</guimenuitem></menuchoice>.
+ </para>
+
+ <para>
+ Select a necessary project, type a name for <property>Seam component</property>, <property>POJO class</property>, <property>Method</property>, <property>Page</property> and select a <property>Package</property> using <emphasis> <property>Browse</property> </emphasis> button.
+ </para>
+
+ <figure>
+ <title>New Seam Form Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ If you specify a class which already exists, the wizard will warn you about it.
+ </para>
+
+ <figure>
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/form_warning.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The Form Page was created in <property>WebContent</property> folder.
+ </para>
+
+ <figure>
+ <title>Form Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_8.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Deploy the form on server. Right click on Form Page, select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run On Server.</guimenuitem></menuchoice>
+ </para>
+
+ <figure>
+ <title>Form Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Form component was hot-deployed.
+ </para>
+ </section>
+
+ <section id="seam_conversation">
+ <title>New Seam Conversation</title>
+ <para>
+ Enter some value in the text field (e.g. <property>value1</property>) and click on <property>formMethod</property>.
+ </para>
+
+ <para>
+ Add a conversation using the New Seam Conversation wizard <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Seam Form.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ You should select a necessary project, type a name for <property>Seam component</property>, <property>POJO class</property>, <property>Method</property>, <property>Page</property> and select a <property>Package</property> using <emphasis> <property>Browse</property> </emphasis> button.
+ </para>
+
+ <figure>
+ <title>New Seam Conversation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ If you specify a class which already exists, the wizard will warn you about it.
+ </para>
+
+ <figure>
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/conversation_warning.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Conversation page was created in <property>WebContent</property> folder.
+ </para>
+
+ <figure>
+ <title>Conversation Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_11.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Right click on Conversation page, select <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>Run On Server.</guimenuitem></menuchoice>
+ </para>
+
+ <figure>
+ <title>Conversation Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_12.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Conversation component was hot-deployed.
+ </para>
+
+ <para>
+ Click on <property>Begin</property> and <property>Increment</property> buttons to check the conversation functionality.
+ </para>
+ </section>
+
+ <section id="seam_entity">
+ <title>New Seam Entity</title>
+ <para>
+ Entities cannot be hot-deployed, so we need to stop the server.
+ </para>
+
+ <para>
+ Create an Entity using the New Entity wizard <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Seam Entity.</guimenuitem></menuchoice>
+ </para>
+
+ <para>
+ You should select a necessary project, type a name for <property>Entity class</property>, select a <property>Package</property> using <emphasis> <property>Browse</property> </emphasis> button, type a name for <property>Master Page</property> and <property>Page</property>.
+ </para>
+
+ <figure>
+ <title>New Seam Entity Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ If you specify a class which already exists, the wizard will warn you about it.
+ </para>
+
+ <figure>
+ <title>Wizard Warning against Existing File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/entity_warning.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The Master Page and the Entity were created in <property>WebContent</property> folder.
+ </para>
+
+ <figure>
+ <title>Master Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_14.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The Entity page is:
+ </para>
+
+ <figure>
+ <title>Entity Page in JBoss Tools HTML Editor.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_15.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Run the Entity page on server. This is what you get:
+ </para>
+
+ <figure>
+ <title>Customer Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Let's create two customers <property>c1</property> and <property>c2</property>. Enter the name in the text field and press the <property>Save</property> button. Customer should be successfully created. Press <property>Done</property>. Do the same for <property>c2</property> customer. The result should be:
+ </para>
+
+ <figure>
+ <title>Two Customers Are Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
Modified: trunk/seam/docs/reference/en-US/testng.xml
===================================================================
--- trunk/seam/docs/reference/en-US/testng.xml 2011-03-18 00:42:10 UTC (rev 29901)
+++ trunk/seam/docs/reference/en-US/testng.xml 2011-03-18 00:58:53 UTC (rev 29902)
@@ -1,249 +1,294 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="testNG">
- <?dbhtml filename="testNG.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>JBDS</keyword>
- <keyword>testNG</keyword>
- </keywordset>
- </chapterinfo>
- <title>Using TestNG project</title>
- <para>With the help this chapter you will get to know with TestNG.</para>
- <section>
- <title>What is TestNG?</title>
- <para><property>TestNG</property> ("Testing, the Next Generation") is a
- Java unit testing framework that aims to overcome many limitations of JUnit. TestNG
- introduces some new functionalities that make it more powerful and easier to use, such
- as:</para>
- <itemizedlist>
- <listitem>
- <para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)</para>
- </listitem>
- <listitem>
- <para>Flexible test configuration</para>
- </listitem>
- <listitem>
- <para>Support for data-driven testing (with @DataProvider)</para>
- </listitem>
- <listitem>
- <para>Support for parameters</para>
- </listitem>
- <listitem>
- <para>Allows distribution of tests on slave machines</para>
- </listitem>
- <listitem>
- <para>Powerful execution model (no more TestSuite)</para>
- </listitem>
- <listitem>
- <para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven,
- etc...)</para>
- </listitem>
- <listitem>
- <para>Embeds BeanShell for further flexibility</para>
- </listitem>
- <listitem>
- <para>Default JDK functions for runtime and logging (no dependencies)</para>
- </listitem>
- <listitem>
- <para>Dependent methods for application server testing</para>
- </listitem>
- </itemizedlist>
-
- <para>More information can be found on home page: <ulink url="http://testng.org"
- >www.testng.org</ulink></para>
- </section>
- <section id="OtherRelevantResourcesOnTheTopic5">
- <?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
- <title>Other relevant resources on the topic</title>
- <para>
- <ulink url="http://www.artima.com/lejava/articles/testng.html">Next-Generation Testing
- with TestNG (An Interview with Cedric Beust)</ulink>
- </para>
- <para>
- <ulink url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html">TestNG:
- The next generation of unit testing</ulink>
- </para>
- <para>
- <ulink url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html">Test
- Categorization Techniques with TestNG</ulink>
- </para>
- <para>
- <ulink url="http://www-128.ibm.com/developerworks/java/library/j-testng/">TestNG makes
- Java unit testing a breeze</ulink>
- </para>
- <para>
- <ulink url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/index.html">In
- pursuit of code quality: JUnit 4 vs. TestNG</ulink>
- </para>
- </section>
- <section>
- <title>How to use the generated Seam-test project to run Seam tests?</title>
-
- <itemizedlist>
- <listitem>
- <para>Create a new Seam Web Project with EAR deployment using the New Seam Project
- wizard.</para>
- </listitem>
- </itemizedlist>
-
- <itemizedlist>
- <listitem>
- <para>After a project is created you will have the generated Seam-test project that
- is setup to run TestNG directly against the proper libraries and server runtime
- libraries.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Seam-test Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Add Seam Action to your project via <emphasis><property>File > New > Seam
- Action</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Seam Action Creation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>Fill out the wizard fields. New Seam Action wizard will create resources and
- place them in the appropriate folders dependent on EAR project structure.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>New Seam Action Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <itemizedlist>
- <listitem>
- <para>When Action is created you will see <property>actionPage.xhtml</property> in
- Package Explorer view. <property>ActionBean.java</property> will be
- automatically opened in Java Editor.</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Created Action</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_8.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <itemizedlist>
- <listitem>
- <para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run
- the test with right click <emphasis><property>Run As > TestNG
- Suite</property>.</emphasis></para>
- </listitem>
- </itemizedlist>
- <note><para>OpenOn is available in testNG XML files opened in JBoss XML Editor</para></note>
- <figure>
- <title>Running TestNG</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The test process will start and its output will be written in Console View.</para>
-
- <figure>
- <title>Test is Finished</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_10.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <itemizedlist>
- <listitem>
- <para>After running TestNG you will have the test results in <emphasis>
- <property>test-output</property>
- </emphasis> folder in Seam-test project (press F5 to refresh the Package
- Explorer view). Open <property>index.html</property> file with Web Browser or
- simply use the TestNG view.</para>
- </listitem>
- </itemizedlist>
-
- <para>The below view shows a successful run of the test.</para>
-
- <figure>
- <title>Viewing the Test Results</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_11.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can see the test results in Web Browser.</para>
-
- <figure>
- <title>Test Results in Browser</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_12.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After clicking on <emphasis>
- <property>ActionLocal Tests</property>
- </emphasis> link you will see the Results for ActionLocal Tests.</para>
-
- <figure>
- <title>Test Information</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_13.png" scale="70"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Select a result on the left-hand pane and its details will be displayed on the
- right-hand one.</para>
-
- <figure>
- <title>ActionLocal Test Details</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/testng/testng_14.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Thus with Seam tooling you can easily take advantage of TestNG framework. As you can
- see, it generates its own TestNG project as a separate module within which you can
- easily monitor the tests execution and their output.</para>
-
- </section>
-</chapter>
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="testNG">
+<?dbhtml filename="testNG.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>JBDS</keyword>
+
+ <keyword>testNG</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Using TestNG project</title>
+ <para>
+ With the help this chapter you will get to know with TestNG.
+ </para>
+
+ <section>
+ <title>What is TestNG?</title>
+ <para>
+ <property>TestNG</property> ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit. TestNG introduces some new functionalities that make it more powerful and easier to use, such as:
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Flexible test configuration
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Support for data-driven testing (with @DataProvider)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Support for parameters
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Allows distribution of tests on slave machines
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Powerful execution model (no more TestSuite)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Embeds BeanShell for further flexibility
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Default JDK functions for runtime and logging (no dependencies)
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Dependent methods for application server testing
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ More information can be found on home page: <ulink url="http://testng.org"
+ >www.testng.org</ulink>
+ </para>
+ </section>
+
+ <section id="OtherRelevantResourcesOnTheTopic5">
+<?dbhtml filename="OtherRelevantResourcesOnTheTopic5.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para>
+ <ulink url="http://www.artima.com/lejava/articles/testng.html">Next-Generation Testing with TestNG (An Interview with Cedric Beust)</ulink>
+ </para>
+
+ <para>
+ <ulink url="http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html">TestNG: The next generation of unit testing</ulink>
+ </para>
+
+ <para>
+ <ulink url="http://dev2dev.bea.com/pub/a/2006/09/testng-categorization.html">Test Categorization Techniques with TestNG</ulink>
+ </para>
+
+ <para>
+ <ulink url="http://www-128.ibm.com/developerworks/java/library/j-testng/">TestNG makes Java unit testing a breeze</ulink>
+ </para>
+
+ <para>
+ <ulink url="http://www-128.ibm.com/developerworks/java/library/j-cq08296/index.html">In pursuit of code quality: JUnit 4 vs. TestNG</ulink>
+ </para>
+ </section>
+
+ <section>
+ <title>How to use the generated Seam-test project to run Seam tests?</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Create a new Seam Web Project with EAR deployment using the New Seam Project wizard.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ After a project is created you will have the generated Seam-test project that is setup to run TestNG directly against the proper libraries and server runtime libraries.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam-test Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add Seam Action to your project via <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>New</guimenuitem><guimenuitem>Seam Action.</guimenuitem></menuchoice>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Seam Action Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Fill out the wizard fields. New Seam Action wizard will create resources and place them in the appropriate folders dependent on EAR project structure.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ When Action is created you will see <property>actionPage.xhtml</property> in Package Explorer view. <property>ActionBean.java</property> will be automatically opened in Java Editor.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Created Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_8.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ Select <property>ActionLocalTest.xml</property> in Seam-test project and run the test with right click <menuchoice><guimenuitem>Run As</guimenuitem><guimenuitem>TestNG Suite.</guimenuitem></menuchoice>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <para>
+ OpenOn is available in testNG XML files opened in JBoss XML Editor
+ </para>
+ </note>
+
+ <figure>
+ <title>Running TestNG</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ The test process will start and its output will be written in Console View.
+ </para>
+
+ <figure>
+ <title>Test is Finished</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_10.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ After running TestNG you will have the test results in <emphasis> <property>test-output</property> </emphasis> folder in Seam-test project (press F5 to refresh the Package Explorer view). Open <property>index.html</property> file with Web Browser or simply use the TestNG view.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ The below view shows a successful run of the test.
+ </para>
+
+ <figure>
+ <title>Viewing the Test Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_11.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ You can see the test results in Web Browser.
+ </para>
+
+ <figure>
+ <title>Test Results in Browser</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_12.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ After clicking on <emphasis> <property>ActionLocal Tests</property> </emphasis> link you will see the Results for ActionLocal Tests.
+ </para>
+
+ <figure>
+ <title>Test Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_13.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Select a result on the left-hand pane and its details will be displayed on the right-hand one.
+ </para>
+
+ <figure>
+ <title>ActionLocal Test Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testng/testng_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ Thus with Seam tooling you can easily take advantage of TestNG framework. As you can see, it generates its own TestNG project as a separate module within which you can easily monitor the tests execution and their output.
+ </para>
+ </section>
+</chapter>
13 years, 10 months