JBoss Tools SVN: r19899 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: editor/propertySections and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-01-25 03:38:23 -0500 (Mon, 25 Jan 2010)
New Revision: 19899
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
Log:
JBIDE-5726
done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2010-01-25 05:49:20 UTC (rev 19898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2010-01-25 08:38:23 UTC (rev 19899)
@@ -12,9 +12,16 @@
import java.io.File;
import java.lang.reflect.Array;
+import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URL;
+import java.nio.charset.Charset;
import java.util.ArrayList;
+import java.util.Calendar;
import java.util.Collection;
+import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
@@ -162,6 +169,7 @@
import org.jboss.tools.smooks.model.groovy.GroovyPackage;
import org.jboss.tools.smooks.model.javabean12.BeanType;
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
+import org.jboss.tools.smooks.model.javabean12.ValueType;
import org.jboss.tools.smooks.model.jmsrouting.JmsRouter;
import org.jboss.tools.smooks.model.jmsrouting.JmsroutingPackage;
import org.jboss.tools.smooks.model.jmsrouting12.JMS12Router;
@@ -465,6 +473,82 @@
Composite parent, Object model) {
// IHyperlinkListener link
}
+
+ public static String getDefualtDecoder(ValueType value){
+ BeanType bean= (BeanType)((EObject)value).eContainer();
+ String clazzString = bean.getClass_();
+ try {
+ ProjectClassLoader loader = new ProjectClassLoader(SmooksUIUtils.getJavaProject(bean));
+ Class<?> clazz = loader.loadClass(clazzString);
+ Field field = clazz.getDeclaredField(((ValueType)value).getProperty());
+ if(field != null){
+ Class<?> fieldType = field.getType();
+ if(fieldType.isEnum()){
+ return "Enum";
+ }
+ if(fieldType == Integer.class || fieldType == int.class){
+ return "Integer";
+ }
+ if(fieldType == Float.class || fieldType == float.class){
+ return "Float";
+ }
+ if(fieldType == Double.class || fieldType == double.class){
+ return "Double";
+ }
+ if(fieldType == BigInteger.class ){
+ return "BigInteger";
+ }
+ if(fieldType == BigDecimal.class ){
+ return "BigDecimal";
+ }
+ if(fieldType == Long.class || fieldType == long.class){
+ return "Long";
+ }
+ if(fieldType == Boolean.class|| fieldType == boolean.class){
+ return "Boolean";
+ }
+ if(fieldType == Short.class|| fieldType == short.class){
+ return "Short";
+ }
+ if(fieldType == Byte.class|| fieldType == byte.class){
+ return "Byte";
+ }
+ if(fieldType == Short.class|| fieldType == short.class){
+ return "Short";
+ }
+ if(Calendar.class.isAssignableFrom(fieldType)){
+ return "Calendar";
+ }
+ if(fieldType == Class.class){
+ return "Class";
+ }
+ if(fieldType == Date.class){
+ return "Date";
+ }
+ if(fieldType == Character.class){
+ return "Character";
+ }
+ if(Charset.class.isAssignableFrom(fieldType)){
+ return "Charset";
+ }
+ if(fieldType == java.sql.Date.class){
+ return "SqlDate";
+ }
+ if(fieldType == java.sql.Time.class){
+ return "SqlTime";
+ }
+ if(fieldType == URI.class){
+ return "URI";
+ }
+ if(fieldType == URL.class){
+ return "URL";
+ }
+ }
+ } catch (Throwable e) {
+ // ignore
+ }
+ return null;
+ }
public static void createLinkMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model, boolean multiText, int height, boolean linkLabel,
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-01-25 05:49:20 UTC (rev 19898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java 2010-01-25 08:38:23 UTC (rev 19899)
@@ -21,13 +21,11 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.viewers.CellEditor;
@@ -48,20 +46,22 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
-import org.jboss.tools.smooks.configuration.editors.ModelPanelCreator;
import org.jboss.tools.smooks.configuration.editors.SelectorCreationDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
import org.jboss.tools.smooks.model.javabean12.DecodeParamType;
import org.jboss.tools.smooks.model.javabean12.Javabean12Factory;
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
@@ -130,7 +130,7 @@
}
private void createDecoderCombo(TabbedPropertySheetWidgetFactory factory, Composite parent) {
- factory.createLabel(controlComposite, "Decoder :");
+ factory.createLabel(controlComposite, "Decoder :").setForeground(factory.getColors().getColor(IFormColors.TITLE));
decoderCombo = factory.createCCombo(parent, SWT.READ_ONLY);
// decoderCombo.setEditable(false);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -157,7 +157,8 @@
if (provider != null) {
AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) provider.getEditingDomain();
String newDecoder = decoderCombo.getText();
- Object model = getPresentSelectedModel();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
model = AdapterFactoryEditingDomain.unwrap(model);
if (model != null && model instanceof ValueType) {
String decoder = ((ValueType) model).getDecoder();
@@ -195,7 +196,8 @@
}
if ("Enum".equals(decoder)) {
- Object model = getPresentSelectedModel();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
model = AdapterFactoryEditingDomain.unwrap(model);
if (model != null && model instanceof ValueType) {
String[] enumFieldsString = null;
@@ -260,28 +262,28 @@
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
- factory.createLabel(sashForm, "Decoder Parameters :").setLayoutData(gd);
+ Label label = factory.createLabel(sashForm, "Decoder Parameters :");
+ label.setLayoutData(gd);
+ label.setForeground(factory.getColors().getColor(IFormColors.TITLE));
Composite viewerComposite = factory.createComposite(sashForm, SWT.NONE);
gd = new GridData(GridData.FILL_BOTH);
gd.horizontalSpan = 2;
+ gd.heightHint = 150;
viewerComposite.setLayoutData(gd);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- viewerComposite.setLayout(gridLayout);
+ viewerComposite.setBackground(factory.getColors().getBorderColor());
+// Composite viewerContianer = factory.createComposite(viewerComposite, SWT.NONE);
+// gd = new GridData(GridData.FILL_BOTH);
+// gd.heightHint = 150;
+// viewerContianer.setLayoutData(gd);
+
- Composite viewerContianer = factory.createComposite(viewerComposite, SWT.NONE);
- gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 150;
- viewerContianer.setLayoutData(gd);
- viewerContianer.setBackground(factory.getColors().getBorderColor());
-
FillLayout layout = new FillLayout();
layout.marginHeight = 1;
layout.marginWidth = 1;
- viewerContianer.setLayout(layout);
+ viewerComposite.setLayout(layout);
- paramterViewer = new TableViewer(viewerContianer, SWT.FULL_SELECTION);
+ paramterViewer = new TableViewer(viewerComposite, SWT.FULL_SELECTION);
paramterViewer.setContentProvider(new DecodeParamViewerContentProvider());
paramterViewer.setLabelProvider(new DecodeParamTypeLabelProvider());
@@ -303,7 +305,8 @@
public void modify(Object element, String property, Object value) {
if (element instanceof TableItem) {
Object currentElement = ((TableItem) element).getData();
- Object model = getPresentSelectedModel();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
model = AdapterFactoryEditingDomain.unwrap(model);
if (model != null && model instanceof ValueType && currentElement instanceof DecodeParam) {
String pname = ((DecodeParam) currentElement).getName();
@@ -371,7 +374,8 @@
private void initDecoderCombo() {
decoderCombo.select(-1);
- Object model = getPresentSelectedModel();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
model = AdapterFactoryEditingDomain.unwrap(model);
if (model != null && model instanceof ValueType) {
String decoder = ((ValueType) model).getDecoder();
@@ -385,7 +389,8 @@
private void initDecodeParamViewer() {
paramterViewer.setInput("NULL");
- Object model = getPresentSelectedModel();
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
model = AdapterFactoryEditingDomain.unwrap(model);
if (model != null && model instanceof ValueType) {
String decoder = ((ValueType) model).getDecoder();
@@ -431,18 +436,18 @@
protected void createDecodeParamGUIContents(Object model, ISmooksModelProvider provider, IEditorPart part,
FormToolkit factory, Composite controlComposite) {
- ModelPanelCreator creator = new ModelPanelCreator();
- model = AdapterFactoryEditingDomain.unwrap(model);
- if (model != null && model instanceof EObject && provider != null && part != null) {
- AdapterFactoryEditingDomain domain = (AdapterFactoryEditingDomain) provider.getEditingDomain();
- IItemPropertySource itemPropertySource = (IItemPropertySource) domain.getAdapterFactory().adapt(model,
- IItemPropertySource.class);
- if (itemPropertySource != null) {
- creator
- .createModelPanel((EObject) model, factory, controlComposite, itemPropertySource, provider,
- part);
- }
- }
+// ModelPanelCreator creator = new ModelPanelCreator();
+// model = AdapterFactoryEditingDomain.unwrap(model);
+// if (model != null && model instanceof EObject && provider != null && part != null) {
+// AdapterFactoryEditingDomain domain = (AdapterFactoryEditingDomain) provider.getEditingDomain();
+// IItemPropertySource itemPropertySource = (IItemPropertySource) domain.getAdapterFactory().adapt(model,
+// IItemPropertySource.class);
+// if (itemPropertySource != null) {
+// creator
+// .createModelPanel((EObject) model, factory, controlComposite, itemPropertySource, provider,
+// part);
+// }
+// }
}
/*
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java 2010-01-25 05:49:20 UTC (rev 19898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java 2010-01-25 08:38:23 UTC (rev 19899)
@@ -11,13 +11,16 @@
package org.jboss.tools.smooks.editor.propertySections;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.GraphicalViewer;
import org.eclipse.jface.viewers.IFilter;
import org.eclipse.ui.IEditorPart;
-import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel;
+import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart;
+import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart;
-import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigChildNodeEditPart;
import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanChildNodeEditPart;
import org.jboss.tools.smooks.graphical.editors.template.SmooksFreemarkerTemplateGraphicalEditor;
+import org.jboss.tools.smooks.model.javabean12.ValueType;
/**
* @author Dart
@@ -33,18 +36,19 @@
public boolean select(Object toTest) {
if (toTest == null)
return false;
- if (toTest instanceof JavaBeanChildNodeEditPart) {
- IEditorPart editorPart = ((AbstractResourceConfigChildNodeEditPart) toTest).getEditorPart();
+ if (toTest instanceof TreeNodeConnectionEditPart) {
+ GraphicalViewer viewer = (GraphicalViewer) ((TreeNodeConnectionEditPart) toTest).getViewer();
+ ((DefaultEditDomain) viewer.getEditDomain()).getEditorPart();
+ IEditorPart editorPart = ((DefaultEditDomain) viewer.getEditDomain()).getEditorPart();
if (toTest instanceof JavaBeanChildNodeEditPart && editorPart instanceof IGraphicalEditorPart) {
if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorPart).getID())) {
return false;
}
}
- AbstractSmooksGraphicalModel model = (AbstractSmooksGraphicalModel) ((JavaBeanChildNodeEditPart) toTest)
- .getModel();
- Object data = model.getData();
+ TreeNodeConnection connection = (TreeNodeConnection) ((TreeNodeConnectionEditPart) toTest).getModel();
+ Object data = connection.getTargetNode().getData();
data = AdapterFactoryEditingDomain.unwrap(data);
- if (data instanceof org.jboss.tools.smooks.model.javabean12.ValueType) {
+ if (data instanceof ValueType) {
return true;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java 2010-01-25 05:49:20 UTC (rev 19898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java 2010-01-25 08:38:23 UTC (rev 19899)
@@ -69,9 +69,9 @@
protected List<AbstractSmooksGraphicalModel> children = null;
- private List<TreeNodeConnection> sourceConnections = new ArrayList<TreeNodeConnection>();
+ protected List<TreeNodeConnection> sourceConnections = new ArrayList<TreeNodeConnection>();
- private List<TreeNodeConnection> targetConnections = new ArrayList<TreeNodeConnection>();
+ protected List<TreeNodeConnection> targetConnections = new ArrayList<TreeNodeConnection>();
public AbstractSmooksGraphicalModel(Object data) {
setData(data);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-01-25 05:49:20 UTC (rev 19898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java 2010-01-25 08:38:23 UTC (rev 19899)
@@ -10,11 +10,25 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.editors.model.javamapping;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Calendar;
import java.util.Collections;
+import java.util.Date;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -22,6 +36,8 @@
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel;
import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
@@ -33,6 +49,9 @@
import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerTemplateXMLModel;
import org.jboss.tools.smooks.graphical.editors.model.freemarker.IFreemarkerTemplateModel;
import org.jboss.tools.smooks.graphical.editors.template.SmooksFreemarkerTemplateGraphicalEditor;
+import org.jboss.tools.smooks.model.javabean12.BeanType;
+import org.jboss.tools.smooks.model.javabean12.DecodeParamType;
+import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
import org.jboss.tools.smooks.model.javabean12.ValueType;
import org.jboss.tools.smooks.templating.model.ModelBuilder;
import org.jboss.tools.smooks.templating.template.TemplateBuilder;
@@ -155,7 +174,7 @@
IFreemarkerTemplateModel iFreemarkerTemplateModel = (IFreemarkerTemplateModel) pd;
if (iFreemarkerTemplateModel.isManyOccurs() && pgm.getTargetConnections().isEmpty()) {
Node modelNode = iFreemarkerTemplateModel.getModelNode();
- if(modelNode instanceof Element) {
+ if (modelNode instanceof Element) {
return !ModelBuilder.getEnforceCollectionSubMappingRules((Element) modelNode);
} else {
return false;
@@ -224,6 +243,118 @@
/*
* (non-Javadoc)
*
+ * @seeorg.jboss.tools.smooks.graphical.editors.model.
+ * AbstractResourceConfigChildNodeGraphModel
+ * #addTargetConnection(org.jboss.tools
+ * .smooks.gef.tree.model.TreeNodeConnection)
+ */
+ @Override
+ public void addTargetConnection(TreeNodeConnection connection) {
+ Object model = getData();
+ model = AdapterFactoryEditingDomain.unwrap(model);
+ if (model instanceof ValueType) {
+ EObject owner = (EObject) model;
+ AbstractSmooksGraphicalModel targetGraphModel = connection.getSourceNode();
+ Object tm = targetGraphModel.getData();
+ if (tm instanceof IXMLStructuredObject) {
+
+ CompoundCommand compoundCommand = new CompoundCommand();
+
+ String selector = SmooksUIUtils.generateFullPath((IXMLStructuredObject) tm, "/"); //$NON-NLS-1$
+ Command command = SetCommand.create(domainProvider.getEditingDomain(), owner,
+ Javabean12Package.Literals.VALUE_TYPE__DATA, selector);
+ compoundCommand.append(command);
+
+ DecoderRecorder recoder = (DecoderRecorder) connection.getData();
+
+ String dataDecoder = getDataDecoder(connection);
+ List<?> oldParameters = null;
+ if(recoder != null){
+ dataDecoder = recoder.getDecoder();
+ oldParameters = recoder.getDecoderParameters();
+ }
+
+ if(oldParameters != null){
+ Command addParamsCommand = AddCommand.create(domainProvider.getEditingDomain(), owner,
+ Javabean12Package.Literals.VALUE_TYPE__DECODE_PARAM, oldParameters);
+ compoundCommand.append(addParamsCommand);
+ }
+
+ if (dataDecoder != null) {
+ Command decoderSetCommand = SetCommand.create(domainProvider.getEditingDomain(), owner,
+ Javabean12Package.Literals.VALUE_TYPE__DECODER, dataDecoder);
+ compoundCommand.append(decoderSetCommand);
+ }
+
+ domainProvider.getEditingDomain().getCommandStack().execute(compoundCommand);
+
+ if (this.targetConnections.indexOf(connection) == -1) {
+ this.targetConnections.add(connection);
+ support.firePropertyChange(PRO_ADD_TARGET_CONNECTION, null, connection);
+ }
+ }
+ } else {
+ super.addTargetConnection(connection);
+ }
+ }
+
+ protected String getDataDecoder(TreeNodeConnection connection) {
+ Object data = getData();
+ data = AdapterFactoryEditingDomain.unwrap(data);
+ if(((ValueType)data).getDecoder() != null) return null;
+ return SmooksUIUtils.getDefualtDecoder((ValueType)data);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.graphical.editors.model.
+ * AbstractResourceConfigChildNodeGraphModel
+ * #removeTargetConnection(org.jboss
+ * .tools.smooks.gef.tree.model.TreeNodeConnection)
+ */
+ @Override
+ public void removeTargetConnection(TreeNodeConnection connection) {
+ Object model = getData();
+ model = AdapterFactoryEditingDomain.unwrap(model);
+ if (model instanceof ValueType) {
+ EObject owner = (EObject) model;
+
+ DecoderRecorder recorder = new DecoderRecorder();
+
+ CompoundCommand compoundCommand = new CompoundCommand();
+
+ Command deleteDataCommand = SetCommand.create(domainProvider.getEditingDomain(), owner, Javabean12Package.Literals.VALUE_TYPE__DATA, null);
+ compoundCommand.append(deleteDataCommand);
+
+ String decoder = ((ValueType)model).getDecoder();
+ if(decoder != null){
+ Command deleteDecoderCommand = SetCommand.create(domainProvider.getEditingDomain(), owner, Javabean12Package.Literals.VALUE_TYPE__DECODER, null);
+ compoundCommand.append(deleteDecoderCommand);
+ recorder.setDecoder( decoder);
+ }
+
+ if(!((ValueType)model).getDecodeParam().isEmpty()){
+ List<DecodeParamType> tempList = new ArrayList<DecodeParamType>();
+ tempList.addAll(((ValueType)model).getDecodeParam());
+ recorder.setDecoderParameters(tempList);
+ Command remvoeParameterCommand = DeleteCommand.create(domainProvider.getEditingDomain(), ((ValueType)model).getDecodeParam());
+ compoundCommand.append(remvoeParameterCommand);
+ }
+ domainProvider.getEditingDomain().getCommandStack().execute(compoundCommand);
+ connection.setData(recorder);
+ if (this.targetConnections.indexOf(connection) != -1) {
+ this.targetConnections.remove(connection);
+ support.firePropertyChange(PRO_REMOVE_TARGET_CONNECTION, connection, null);
+ }
+ } else {
+ super.removeTargetConnection(connection);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#getText()
*/
@Override
@@ -237,5 +368,35 @@
}
return super.getText();
}
+
+ private class DecoderRecorder{
+ private String decoder=null;
+ private List<?> decoderParameters = null;
+ /**
+ * @return the decoder
+ */
+ public String getDecoder() {
+ return decoder;
+ }
+ /**
+ * @param decoder the decoder to set
+ */
+ public void setDecoder(String decoder) {
+ this.decoder = decoder;
+ }
+ /**
+ * @return the decoderParameters
+ */
+ public List<?> getDecoderParameters() {
+ return decoderParameters;
+ }
+ /**
+ * @param decoderParameters the decoderParameters to set
+ */
+ public void setDecoderParameters(List<?> decoderParameters) {
+ this.decoderParameters = decoderParameters;
+ }
+
+ }
}
15 years, 11 months
JBoss Tools SVN: r19898 - trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-25 00:49:20 -0500 (Mon, 25 Jan 2010)
New Revision: 19898
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/ModuleExportOperation.java
Log:
JBIDE-5504 - trying to add more info
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/ModuleExportOperation.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/ModuleExportOperation.java 2010-01-25 04:54:45 UTC (rev 19897)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/ModuleExportOperation.java 2010-01-25 05:49:20 UTC (rev 19898)
@@ -114,7 +114,7 @@
export();
} catch (Exception e) {
monitor.worked(CLOSE_WORK);
- throw new ExecutionException(EJBArchiveOpsResourceHandler.Error_exporting__UI_ + component.getProject().getName(), e);
+ throw new ExecutionException(EJBArchiveOpsResourceHandler.Error_exporting__UI_ + " " + component.getProject().getName() + ": " + e.getMessage(), e);
}
}
} finally {
@@ -167,7 +167,9 @@
return;
}
}
- }
+ module = modules.length > 0 ? modules[0] : null;
+ return;
+ }
module = null;
}
@@ -266,7 +268,7 @@
protected void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
if( module == null )
- throw new SaveFailureException(); // TODO add some real message
+ throw new SaveFailureException("No module found for given project");
try {
File dest = getDestinationPath().toFile();
File parent = dest.getParentFile();
@@ -292,8 +294,7 @@
addChildren(saver, module, moduleDelegate.getChildModules());
saver.finish();
} catch( Exception e ) {
- e.printStackTrace();
- throw new SaveFailureException();
+ throw new SaveFailureException(e.getMessage(), e);
}
}
15 years, 11 months
JBoss Tools SVN: r19897 - trunk/jmx/plugins/org.jboss.tools.jmx.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-24 23:54:45 -0500 (Sun, 24 Jan 2010)
New Revision: 19897
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.ui/plugin.xml
Log:
JBIDE-5724 - removing conflict in binding by removing a default binding for opening mbeans
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/plugin.xml
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/plugin.xml 2010-01-25 04:16:07 UTC (rev 19896)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/plugin.xml 2010-01-25 04:54:45 UTC (rev 19897)
@@ -213,13 +213,6 @@
</command>
</extension>
<extension
- point="org.eclipse.ui.bindings">
- <key
- sequence="M1+M2+M"
- commandId="org.jboss.tools.jmx.ui.navigate.open.mbean"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
- </extension>
- <extension
point="org.jboss.tools.jmx.ui.attribute.controls">
<control
id="org.jboss.tools.jmx.ui.attribute.displays.Text"
15 years, 11 months
JBoss Tools SVN: r19896 - trunk/documentation/guides/Beginners_Guide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-01-24 23:16:07 -0500 (Sun, 24 Jan 2010)
New Revision: 19896
Modified:
trunk/documentation/guides/Beginners_Guide/en-US/Book_Info.xml
trunk/documentation/guides/Beginners_Guide/en-US/Feedback.xml
trunk/documentation/guides/Beginners_Guide/en-US/Introduction.xml
trunk/documentation/guides/Beginners_Guide/en-US/Java_Web_(EE)_and_Standard_Edition_(SE).xml
trunk/documentation/guides/Beginners_Guide/en-US/Revision_History.xml
trunk/documentation/guides/Beginners_Guide/en-US/Service-Oriented_Architecture_Development.xml
trunk/documentation/guides/Beginners_Guide/en-US/The_interface.xml
trunk/documentation/guides/Beginners_Guide/en-US/Where_to_go_from_here.xml
Log:
updated book with info from Max's tech review
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Book_Info.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Book_Info.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,14 +3,14 @@
]>
<bookinfo id="book-Beginners_Guide-Beginners_Guide">
<title>Beginners Guide</title>
- <subtitle>Provides information about the use of <application>JBoss Tools </application>and the <application>JBoss Developer Studio</application> from a beginners level.</subtitle>
+ <subtitle>Provides information about the use of the <application>JBoss Developer Studio</application> from a beginners level.</subtitle>
<productname>JBoss Developer Studio</productname>
<productnumber>3.0</productnumber>
<edition>1.0</edition>
<pubsnumber>7</pubsnumber>
<abstract>
<para>
-The Beginners Guide brings all concepts pertaining to <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> back to basics. It is intended for individuals who may be
+The Beginners Guide brings all concepts pertaining to the <application>JBoss Developer Studio</application> back to basics. It is intended for individuals who may be
new to application servers and the creation of applications for
deployment.
</para>
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Feedback.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Feedback.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Feedback.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -7,7 +7,7 @@
<secondary>contact information for this manual</secondary>
</indexterm>
<para>
- If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in JIRA agaist JBoss Tools for the community: <ulink url="https://jira.jboss.org/jira/browse/JBIDE">https://jira.jboss.org/jira/browse/JBIDE</ulink> or JBoss Developer Studio for the enterprise: <ulink url="https://jira.jboss.org/jira/browse/JBDS">https://jira.jboss.org/jira/browse/JBDS</ulink>
+ If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in JIRA against JBoss Developer Studio: <ulink url="https://jira.jboss.org/jira/browse/JBDS">https://jira.jboss.org/jira/browse/JBDS</ulink>
</para>
<para>
When submitting a bug report, be sure to mention the manual's name.
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Introduction.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Introduction.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Introduction.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,10 +3,10 @@
<chapter id="chap-Beginners_Guide-Introduction">
<title>Introduction</title>
<para>
- The <application>JBoss Tools</application> and <application>JBoss Developer Studio</application> tools suites are designed to assist with the development of applications and services for JBoss Middleware software. These tools have been developed and are used by developers to increase their efficiency and productivity with JBoss software offerings (be it community or enterprise offerings).
+ The <application>JBoss Developer Studio</application> is an Integrated Development Environment (IDE) that includes JBoss Tools and assists with the development of applications and services on JBoss Middleware software. These tools have been developed and are used by developers for increased efficiency and productivity with JBoss software.
</para>
<para>
- This beginners guide covers the basics of the interface you will be working with and the tools within it, assuming as little knowledge on your side as possible. If you are not familiar with <application>JBoss Tools</application> or <application>JBoss Developer Studio</application> then this guide provides the best place to begin.
+ This guide covers the basics of the interface you will be working with and the tools within it, assuming as little knowledge on your side as possible. If you are not familiar with <application>JBoss Developer Studio</application> then this guide is the best place to begin.
</para>
</chapter>
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Java_Web_(EE)_and_Standard_Edition_(SE).xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Java_Web_(EE)_and_Standard_Edition_(SE).xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Java_Web_(EE)_and_Standard_Edition_(SE).xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,12 +3,12 @@
<chapter id="chap-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins">
<title>Java Web (EE) and Standard Edition (SE) Plug-Ins</title>
<para>
- This chapter covers the Java plug-ins included with <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application>.
+ Included <application>JBoss Developer Studio</application> Java plug-ins are detailed.
</para>
<section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-Visual_Web_Tools">
<title>Visual Web Tools</title>
<para>
- The Visual Web Tools consist of a number of features designed to aid in the development of web pages and web projects.
+ Visual Web Tools aids in the development of web pages and web projects.
</para>
<variablelist>
<varlistentry>
@@ -21,7 +21,7 @@
<title>Visual Page Editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Visual_Page_Editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Visual_Page_Editor.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -108,7 +108,7 @@
<term>Web Projects View</term>
<listitem>
<para>
- The Web Projects View is an additional view for <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application>. It enhances project authoring with a number of features:
+ The Web Projects View is an additional view. It enhances project authoring with a number of features:
</para>
<itemizedlist>
<listitem>
@@ -118,7 +118,7 @@
</listitem>
<listitem>
<para>
- Selected items can be dragged and dropped into <acronym>JSP</acronym> pages:
+ Selected items can be dragged and dropped into <acronym>JSP</acronym> and other <acronym>JSF</acronym> compatible pages:
</para>
<itemizedlist>
<listitem>
@@ -153,11 +153,11 @@
</listitem>
</itemizedlist>
</listitem>
- <listitem>
+ <!-- <listitem>
<para>
Context menus can be used to speed up application authoring.
</para>
- </listitem>
+ </listitem> -->
<listitem>
<para>
<acronym>JSF</acronym> and Struts projects can be quickly created or imported from the shortcut buttons.
@@ -173,7 +173,7 @@
<title>Web Projects View for <acronym>JSF</acronym> (left) and Struts (right) projects</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Web_Projects_View_for_JSF_left_and_Struts_right_projects.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Web_Projects_View_for_JSF_left_and_Struts_right_projects.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -191,7 +191,7 @@
<term>OpenOn</term>
<listitem>
<para>
- OpenOn provides an easy method to switch directly from one resource to another in the project without navigating through the <guilabel>Package Explorer</guilabel> view. Pressing <keycap>F3</keycap> or <keycombo><keycap>Ctrl</keycap><mousebutton>click</mousebutton></keycombo> when a reference to another file is highlighted will open the file in the editor.
+ OpenOn provides an easy method for switching directly from one project resource to another without navigating through the <guilabel>Package Explorer</guilabel> view. Pressing <keycap>F3</keycap> or <keycombo><keycap>Ctrl</keycap><mousebutton>click</mousebutton></keycombo> when a reference to another file is highlighted will open the file in the editor.
</para>
<para>
Refer to the <citetitle pubwork="chapter">Editors</citetitle> chapter of <citetitle pubwork="book">Visual Web Tools Reference Guide</citetitle> for full details.
@@ -211,7 +211,7 @@
<title>Content Assist</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Content_Assist.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Visual_Web_Tools-Content_Assist.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -240,7 +240,7 @@
<term>RichFaces Support</term>
<listitem>
<para>
- The RichFaces framework is tightly integrated with <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application>. RichFaces and Ajax4jsf tag libraries can be used in the JBoss Tools Palette, and RichFaces components are rendered in the Visual Page Editor.
+ RichFaces and Ajax4jsf tag libraries can be used from the JBoss Tools Palette, and RichFaces components are rendered in the Visual Page Editor.
</para>
<para>
Refer to the <citetitle pubwork="chapter">Editors</citetitle> chapter of <citetitle pubwork="book">Visual Web Tools Reference Guide</citetitle> for full details.
@@ -253,7 +253,7 @@
<section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-Seam_Development_Tools">
<title>Seam Development Tools</title>
<para>
- <application>JBoss Seam</application> is an application framework that simplifies the development of Web 2.0 applications. It combines several technologies to reduce the complexity of developing modern web applications:
+ <application>JBoss Seam</application> combines several technologies to reduce the complexity of developing modern Web 2.0 applications:
</para>
<itemizedlist>
<listitem>
@@ -286,7 +286,7 @@
<application>Seam</application> provides an interface to these different technologies through simple <emphasis>Plain Old Java Objects</emphasis> (<acronym>POJO</acronym>), user interface components, and <acronym>XML</acronym>. <application>Seam</application> does not distinguish between presentation-tier components and business logic components in an effort to present a simple, unified component model for the Java Enterprise Edition platform. Seam also provides mechanisms to manage application states across multiple workspaces, methods to manage workflow and pageflow through <acronym>jBPM</acronym>, and comprehensive integrated testing features.
</para>
<para>
- The Seam Development Tools in <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> allow for easy <application>Seam</application> application development:
+ The Seam Development Tools in the <application>JBoss Developer Studio</application> allow for easy <application>Seam</application> application development:
</para>
<variablelist>
<varlistentry>
@@ -330,7 +330,7 @@
<term>Editors and views</term>
<listitem>
<para>
- There are a number of editors available in <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> for working with Seam in addition to the Visual Page Editor:
+ There are a number of editors available in the <application>JBoss Developer Studio</application> for working with Seam in addition to the Visual Page Editor:
</para>
<variablelist>
<varlistentry>
@@ -360,7 +360,7 @@
<title>Seam Pages Editor (graphical view)</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Seam_Development_Tools-Seam_Pages_Editor_graphical_view.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Seam_Development_Tools-Seam_Pages_Editor_graphical_view.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -381,7 +381,7 @@
<title>Seam Components Editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Seam_Development_Tools-Seam_Components_Editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Seam_Development_Tools-Seam_Components_Editor.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -426,10 +426,10 @@
<section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-Hibernate_Tools">
<title>Hibernate Tools</title>
<para>
- <application>Hibernate</application> is an object-relational mapping (<acronym>ORM</acronym>) library, used for mapping an object-oriented domain model to a relational database. It replaces persistence-related database accesses with high-level object-handling functions to solve problems relating to object-relational impedance mismatch. <application>Hibernate</application> also serves as a query service, allowing queries to be expressed in native <acronym>SQL</acronym> (Structured Query Language), an extension of <acronym>SQL</acronym> named <emphasis>Hibernate Query Language</emphasis> (<acronym>HQL</acronym>), or an object-oriented Criteria and Example <acronym>API</acronym> (Application Programming Interface).
+ <application>Hibernate</application> is an object-relational mapping (<acronym>ORM</acronym>) library, used for mapping an object-oriented domain model to a relational database.<!-- It replaces persistence-related database accesses with high-level object-handling functions to solve problems relating to object-relational impedance mismatch.--> <application>Hibernate</application> also serves as a query service, allowing queries to be expressed in native <acronym>SQL</acronym> (Structured Query Language), an extension of <acronym>SQL</acronym> named <emphasis>Hibernate Query Language</emphasis> (<acronym>HQL</acronym>), or an object-oriented Criteria and Example <acronym>API</acronym> (Application Programming Interface).
</para>
<para>
- Hibernate Tools in <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> provides several features to aid in developing with <application>Hibernate</application>:
+ Hibernate Tools in the <application>JBoss Developer Studio</application> provides several features to aid in developing with <application>Hibernate</application>:
</para>
<variablelist>
<varlistentry>
@@ -450,7 +450,7 @@
<title>Hibernate Console</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Hibernate_Tools-Hibernate_Console.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Hibernate_Tools-Hibernate_Console.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -494,7 +494,7 @@
<section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-Portal_Tools">
<title>Portal Tools</title>
<para>
- <application>JBoss Portal</application> is a platform for hosting and serving the web interface of a portal. It allows for content management and experience customization, and supports standard portlets, single sign-ons, clustering, and internationalization.
+ <application>JBoss Portal</application> is a platform for hosting and serving the web interface of a web portal. It allows for content management and experience customization, and supports standard portlets, single sign-ons, clustering, and internationalization.
</para>
<para>
<application>JBoss Portal</application> applications can be created through the Dynamic Web Project wizard. Java portlets, <acronym>JSF</acronym> portlets, and Seam portlets are all supported.
@@ -503,7 +503,7 @@
<title>Dynamic Web Project wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Portal_Tools-Dynamic_Web_Project_wizard.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Portal_Tools-Dynamic_Web_Project_wizard.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -513,6 +513,9 @@
</mediaobject>
</figure>
<para>
+ Click the <guibutton>Modify...</guibutton> button and enable portlets for the creation of <application>JBoss Portal</application> applications through this wizard.
+ </para>
+ <para>
Refer to the <citetitle pubwork="book">JBoss Portal Tools Reference Guide</citetitle> for full details.
</para>
</section>
@@ -523,7 +526,7 @@
Java Management Extensions (<acronym>JMX</acronym>) is a Java tool-set for managing and monitoring applications, connected devices, and service-oriented networks. A managed resource is represented by a dynamic object called a <emphasis>Managed Bean</emphasis> (or <emphasis>MBean</emphasis>, which is a JavaBean with a dependency injection.
</para>
<para>
- The <acronym>JMX</acronym> Tools in <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> consist on the <emphasis>MBean Explorer</emphasis> and the <emphasis>MBean Editor</emphasis>.
+ The <acronym>JMX</acronym> Tools consists of the <emphasis>MBean Explorer</emphasis> and the <emphasis>MBean Editor</emphasis>.
</para>
<variablelist>
<varlistentry>
@@ -579,7 +582,7 @@
<title>MBean Editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-JMX_Tools-MBean_Editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-JMX_Tools-MBean_Editor.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -596,16 +599,85 @@
</para>
</section>
+ <section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-JSF_Tools">
+ <title>JSF Tools</title>
+ <para>
+ JavaServer Faces (JSF) is a Web application framework developed by Sun Microsystems© Inc. JSF Tools allows you to build JSF based applications, add JSF capabilities to existing web projects, import JSF projects and choose a JSF implementation during application development.
+ </para>
+ <para>
+ The tools included are outlined as follows:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Wizards that assist with the creation of new JSF and Facelets projects and adding JSF capabilities to existing web projects.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Pre-configured templates are included and the functionality to create your own.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add and generate code for new managed beans and then add them to a JSF configuration file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The ability to create your own custom Converter and Validator.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Constant validation checking no matter how you are currently interacting with the code, ensures you are always aware of any errors during the development process.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Three views are provided for interacting with the code: Diagram view, Tree view and Source view. Synchronization between the views ensures you are always working on the newest version.
+ </para>
+ <figure id="figu-Beginners_Guide-JSF_Tools-Diagram_view">
+ <title>Diagram view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/JSF_diagram_view.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure id="figu-Beginners_Guide-JSF_Tools-Tree_view">
+ <title>Tree view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/JSF_tree_view.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure id="figu-Beginners_Guide-JSF_Tools-Source_view">
+ <title>Source view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/JSF_source_view.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Refer to the <citetitle pubwork="book">JSF Tools Reference Guide</citetitle> for more details.
+ </para>
+ </section>
+
<section id="sect-Beginners_Guide-Java_Web_EE_and_Standard_Edition_SE_Plug_Ins-JBoss_AS_Tools">
<title>JBoss AS Tools</title>
<para>
- The JBoss <acronym>AS</acronym> Tools consist of a number of additional views for managing an installed JBoss Server through the JBoss <acronym>AS</acronym> (Application Server) perspective. These additional views include the standard Console view and Properties view, and the Servers view. The Servers view allows installed servers to be configured, monitored, and managed.
+ The JBoss <acronym>AS</acronym> Tools consists of a number of additional views for managing an installed JBoss Server through the JBoss <acronym>AS</acronym> (Application Server) perspective. These additional views include the standard Console and Properties views, and the Servers view. The Servers view allows installed servers to be configured, monitored, and managed.
</para>
<figure id="figu-Beginners_Guide-JBoss_AS_Tools-Servers_view">
<title>Servers view</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-JBoss_AS_Tools-JBoss_Server_View.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-JBoss_AS_Tools-JBoss_Server_View.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
@@ -628,7 +700,7 @@
<title>Archive Tools</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Beginners_Guide-Archive_Tools-Archive_Tools.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Beginners_Guide-Archive_Tools-Archive_Tools.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Revision_History.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Revision_History.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Revision_History.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -18,6 +18,20 @@
</simplelist>
</revdescription>
</revision>
+ <revision>
+ <revnumber>1</revnumber>
+ <date>Mon Jan 26 2010</date>
+ <author>
+ <firstname>Isaac</firstname>
+ <surname>Rooskov</surname>
+ <email>irooskov(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Review and editing</member>
+ </simplelist>
+ </revdescription>
+ </revision>
</revhistory>
</simpara>
</appendix>
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Service-Oriented_Architecture_Development.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Service-Oriented_Architecture_Development.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Service-Oriented_Architecture_Development.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,12 +3,12 @@
<chapter id="chap-Beginners_Guide-Service_Oriented_Architecture_Development">
<title>Service-Oriented Architecture Development</title>
<para>
- This chapter covers the <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> plug-ins for development on Service-Oriented Architecture (SOA).
+ Included <application>JBoss Developer Studio</application> plug-ins for development on Service-Oriented Architecture (SOA) are detailed.
</para>
<section id="sect-Beginners_Guide-Service_Oriented_Architecture_Development-jBPM_Tools">
<title>jBPM Tools</title>
<para>
- jBPM is a workflow tool, allowing for the creation of framework control over business processes and languages.
+ jBPM is a workflow tool for framework control over business processes and languages.
</para>
<para>
jBPM supports the jBPM Process Definition Language (jPDL) and includes a perspective for easy creation and manipulation using the jPDL. Through this view you can add states, transitions and other processes and waypoints in order to create your own business workflow. Refer to the <citetitle pubwork="section">A Minimal Process Definition</citetitle> section of the <citetitle pubwork="chapter">Creating an Empty Process Definition</citetitle> chapter within the <citetitle pubwork="book">jBPM Tools Reference Guide</citetitle> for more details.
@@ -27,12 +27,12 @@
<title>ESB Editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/ESB_Editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/ESB_Editor.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
<para>
- <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> include a tool called the ESB file Editor. Through the use of this tool you can develop an application that will utilize the advantages of ESB technology. Features of the ESB Editor include:
+ The <application>JBoss Developer Studio</application> includes a tool called the ESB file Editor. Through the use of this tool you can develop an application that will utilize the advantages of ESB technology. Features of the ESB Editor include:
</para>
<formalpara id="form-Beginners_Guide-ESB_Editor-ESB_syntax_validation">
<title>ESB syntax validation</title>
@@ -72,24 +72,24 @@
JBoss Web Services is an integral part of the JBoss Application Server and JBoss Enterprise Application Platform, providing a standard means of working reliably between different software applications.
</para>
<para>
- A Web Service defines a collection of technologies that provide protocols and standards for the exchange of data between applications. You can create a Web Service for your application server through the use of wizards in <application>JBoss Tools</application> or the <application>JBoss Developer Studio</application>. For further details refer to the <citetitle pubwork="chapter">Creating a Web Service using JBossWS runtime</citetitle> chapter of the <citetitle pubwork="book">JBoss WS User Guide</citetitle>
+ A Web Service defines a collection of technologies that provide protocols and standards for the exchange of data between applications. You can create a Web Service for your application server through the use of wizards in the <application>JBoss Developer Studio</application>. For further details refer to the <citetitle pubwork="chapter">Creating a Web Service using JBossWS runtime</citetitle> chapter of the <citetitle pubwork="book">JBoss WS User Guide</citetitle>
</para>
<figure id="figu-Beginners_Guide-Web_Services_Tools-Example_of_a_Web_Services_wizard">
<title>Example of a Web Services wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Web_Services_Wizard.png" format="PNG" width="444" />
+ <imagedata fileref="images/Web_Services_Wizard.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
<para>
- Web Services Tools also includes the ability to create a Web Service client through the use of a Web Services Description Language (WSDL) document. This can be useful if you already have a predefined service that you wish to recreate in JBoss Tools, or you wish to use one as a template for you to work with. Refer to the <citetitle pubwork="chapter">Creating a Web Service Client from a WSDL Document using JBoss WS</citetitle> chapter of the <citetitle pubwork="book">JBoss WS User Guide</citetitle> for more details.
+ Web Services Tools also includes the ability to create a Web Service client through the use of a Web Services Description Language (WSDL) document. This can be useful if you already have a predefined service that you wish to recreate, or you wish to use one as a template for you to work with. Refer to the <citetitle pubwork="chapter">Creating a Web Service Client from a WSDL Document using JBoss WS</citetitle> chapter of the <citetitle pubwork="book">JBoss WS User Guide</citetitle> for more details.
</para>
<figure id="figu-Beginners_Guide-Web_Services_Tools-Web_Services_client_creation">
<title>Web Services client creation</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Web_Services_Using_Document.png" format="PNG" width="444" />
+ <imagedata fileref="images/Web_Services_Using_Document.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -107,7 +107,7 @@
<title>Rule text editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Drools_code_rule_editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/Drools_code_rule_editor.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -115,7 +115,7 @@
<title>Rule Flow graphical editor</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Drools_rete_rule_editor.png" format="PNG" width="444" />
+ <imagedata fileref="images/Drools_rete_rule_editor.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -139,7 +139,7 @@
<title>Guvnor connection wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Guvnor_connection_wizard.png" format="PNG" width="444" />
+ <imagedata fileref="images/Guvnor_connection_wizard.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -153,7 +153,7 @@
<title>Guvnor repository view</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Guvnor_repository.png" format="PNG" width="444" />
+ <imagedata fileref="images/Guvnor_repository.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -167,7 +167,7 @@
<title>Guvnor resource history view</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Guvnor_resource_history_view.png" format="PNG" width="444" />
+ <imagedata fileref="images/Guvnor_resource_history_view.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -181,7 +181,7 @@
<title>Guvnor resource importing wizard</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Guvnor_copy_file.png" format="PNG" width="444" />
+ <imagedata fileref="images/Guvnor_copy_file.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -238,74 +238,7 @@
</para>
</section>
- <section id="sect-Beginners_Guide-Service_Oriented_Architecture_Development-JSF_Tools">
- <title>JSF Tools</title>
- <para>
- JavaServer Faces (JSF) is a Web application framework developed by Sun Microsystems© Inc. that <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> provide developer tools for. JSF Tools allows you to build JSF based applications, add JSF capabilities to existing web projects, import JSF projects and choose a JSF implementation during application development.
- </para>
- <para>
- The tools included are outlined as follows:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Wizards that assist with the creation of new JSF and Facelets projects and adding JSF capabilities to existing web projects.
- </para>
- </listitem>
- <listitem>
- <para>
- Pre-configured templates are included and the functionality to create your own.
- </para>
- </listitem>
- <listitem>
- <para>
- Add and generate code for new managed beans and then add them to a JSF configuration file.
- </para>
- </listitem>
- <listitem>
- <para>
- The ability to create your own custom Converter and Validator.
- </para>
- </listitem>
- <listitem>
- <para>
- Constant validation checking no matter how you are currently interacting with the code, ensures you are always aware of any errors during the development process.
- </para>
- </listitem>
- <listitem>
- <para>
- Three views are provided for interacting with the code: Diagram view, Tree view and Source view. Synchronization between the views ensures you are always working on the newest version.
- </para>
- <figure id="figu-Beginners_Guide-JSF_Tools-Diagram_view">
- <title>Diagram view</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/JSF_diagram_view.png" format="PNG" width="444" />
- </imageobject>
- </mediaobject>
- </figure>
- <figure id="figu-Beginners_Guide-JSF_Tools-Tree_view">
- <title>Tree view</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/JSF_tree_view.png" format="PNG" width="444" />
- </imageobject>
- </mediaobject>
- </figure>
- <figure id="figu-Beginners_Guide-JSF_Tools-Source_view">
- <title>Source view</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/JSF_source_view.png" format="PNG" width="444" />
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>
- Refer to the <citetitle pubwork="book">JSF Tools Reference Guide</citetitle> for more details.
- </para>
- </section>
+
</chapter>
Modified: trunk/documentation/guides/Beginners_Guide/en-US/The_interface.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/The_interface.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/The_interface.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,24 +3,24 @@
<chapter id="chap-Beginners_Guide-The_interface">
<title>The interface</title>
<para>
- This chapter discusses the interfaces that the <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application> plug-ins are built for.
+ The interfaces that the <application>JBoss Developer Studio</application> IDE is built for are discussed.
</para>
<section id="sect-Beginners_Guide-The_interface-Eclipse">
<title>Eclipse</title>
<para>
- Eclipse is the container for all development work in <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application>. It allows for control over the running of the application server, the applications on it and provides an interface for developing your own applications.
+ Eclipse is the container for all development work in the <application>JBoss Developer Studio</application>. It allows for control over the running of the application server, the applications on it and provides an interface for developing your own applications.
</para>
<para>
Eclipse is started by double-clicking on the <filename>eclipse</filename> executeable in your installation directory.
</para>
<para>
- Following this you will be asked to specify a workspace for your Eclipse session. A workspace is the location on your computer where your files will be stored relating to the session. If you wish to change your workspace location after this step you can do so by following the menu items <guimenuitem>File</guimenuitem>, <guimenuitem>Switch Workspace</guimenuitem>, <guimenuitem>Other...</guimenuitem>.
+ Following this you will be asked to specify a workspace. A workspace is the location on your computer where your files will be stored relating to the multiple sessions. If you wish to change your workspace location after this step you can do so by following the menu items <guimenuitem>File</guimenuitem>, <guimenuitem>Switch Workspace</guimenuitem>, <guimenuitem>Other...</guimenuitem>.
</para>
<figure id="figu-Beginners_Guide-Eclipse-Eclipse_Workspace_launcher">
<title>Eclipse Workspace launcher</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Eclipse_workspace.png" format="PNG" width="444" />
+ <imagedata fileref="images/Eclipse_workspace.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -31,7 +31,7 @@
<title>Eclipse welcome screen</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Eclipse_welcome_screen.png" format="PNG" width="444" />
+ <imagedata fileref="images/Eclipse_welcome_screen.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -42,7 +42,7 @@
<title>Eclipse Workbench</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Eclipse_main.png" format="PNG" width="444" />
+ <imagedata fileref="images/Eclipse_main.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -53,12 +53,12 @@
<title>Views button</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/View_Button.png" format="PNG" width="444" />
+ <imagedata fileref="images/View_Button.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
<para>
- The window that may be of most use to you can be found by following: <menuchoice><guimenuitem>Other...</guimenuitem><guimenuitem>JBoss Tools Web</guimenuitem><guimenuitem>JBoss Tools Palette</guimenuitem></menuchoice>. This window opens an interface to the tools included with <application>JBoss Tools</application> and the <application>JBoss Developer Studio</application>.
+ The window that may be of most use to you can be found by following: <menuchoice><guimenuitem>Other...</guimenuitem><guimenuitem>JBoss Tools Web</guimenuitem><guimenuitem>JBoss Tools Palette</guimenuitem></menuchoice>. This window opens an interface to the tools included with the <application>JBoss Developer Studio</application>.
</para>
<para>
Refer to the <citetitle pubwork="section">Welcome to JBoss Developer Studio</citetitle> section of the <citetitle pubwork="book">Getting Started with JBoss Developer Studio</citetitle> guide for further details.
@@ -70,16 +70,16 @@
<para>
The JBoss Application Server provides the full range of Java EE 5 features as well as extended enterprise services including clustering, caching, and persistence.
</para>
- <section id="sect-Beginners_Guide-JBoss_Application_Server-Use_of_the_application_server_shipped_with_JBoss_Tools_or_JBoss_Developer_Studio">
- <title>Use of the application server shipped with JBoss Tools or JBoss Developer Studio</title>
+ <section id="sect-Beginners_Guide-JBoss_Application_Server-Use_of_the_application_server_shipped_with_the_JBoss_Developer_Studio">
+ <title>Use of the application server shipped with the JBoss Developer Studio</title>
<para>
- This section discusses the JBoss Application Server with regards to its use through Eclipse. Once you have started the Eclipse interface for <application>JBoss Tools</application> or the <application>JBoss Developer Studio</application>, the JBoss Application Server can be started by clicking on its name in the lower part of the window and then clicking the green arrow to the right.
+ This section discusses the JBoss Application Server with regards to its use through Eclipse. Once you have started the Eclipse interface for the <application>JBoss Developer Studio</application>, the JBoss Application Server can be started by clicking on its name in the lower part of the window and then clicking the green arrow to the right.
</para>
<figure id="figu-Beginners_Guide-Use_of_the_application_server_shipped_with_JBoss_Tools_or_JBoss_Developer_Studio-Starting_and_stopping_the_server">
<title>Starting and stopping the server</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Start_Stop_Server.png" format="PNG" width="444" />
+ <imagedata fileref="images/Start_Stop_Server.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -95,7 +95,7 @@
<title>Server started successfully</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Server_Started.png" format="PNG" width="444" />
+ <imagedata fileref="images/Server_Started.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -106,7 +106,7 @@
<title>JBoss Application Server overview</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/JBoss_AS_Overview.png" format="PNG" width="444" />
+ <imagedata fileref="images/JBoss_AS_Overview.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -114,13 +114,13 @@
From this <guilabel>Overview</guilabel> section there are six subsections consisting of: <guilabel>General Information</guilabel>, <guilabel>Login Credentials</guilabel>, <guilabel>Publishing</guilabel>, <guilabel>Timeouts</guilabel>, <guilabel>Server Polling</guilabel> and <guilabel>Server Ports</guilabel>.
</para>
<para>
- The <guilabel>General Information</guilabel> subsection allows you to change the <guilabel>Server name</guilabel> and <guilabel>Host name</guilabel> to your own preferences. By clicking on the <guilabel>Runtime Environment</guilabel> label a dialog box with options to change the name of the server runtime, the home directory, the Java compiler and which server configuration should be used when running the application server. The <guibutton>Open launch configuration</guibutton> button displays a dialog box for configuring the technical details of the application server instance.
+ The <guilabel>General Information</guilabel> subsection allows you to change the <guilabel>Server name</guilabel> and <guilabel>Host name</guilabel> to your own preferences. By clicking on the <guilabel>Runtime Environment</guilabel> label a dialog box with options to change the name of the server runtime, the home directory, the Java Runtime and which server configuration should be used when running the application server. The <guibutton>Open launch configuration</guibutton> button displays a dialog box for configuring the technical details of the application server instance.
</para>
<para>
- Below the <guilabel>General Information</guilabel> subsection is the <guilabel>Login Credentials</guilabel> subsection. This allows you to set the <guilabel>User Name</guilabel> and <guilabel>Password</guilabel> for your server.
+ Below the <guilabel>General Information</guilabel> subsection is the <guilabel>Login Credentials</guilabel> subsection. Set the <guilabel>User Name</guilabel> and <guilabel>Password</guilabel> for secure access to your server.
</para>
<para>
- The <guilabel>Publishing</guilabel> subsection at the top right of the <guilabel>Overview</guilabel> section allows you to set when applications should be made available through the application server. You can select to either never have an application be published automatically or for a check of new applications yet to be published to occur at a certain timed interval.
+ The <guilabel>Publishing</guilabel> subsection at the top right of the <guilabel>Overview</guilabel> section allows you to set when applications will be published to the location specified (whether the applications will be made available through the application server depends on the server running and if it is configured to recognise dynamic changes). You can select to either never have an application be published automatically or for a check of new applications yet to be published to occur at a certain timed interval.
</para>
<para>
The <guilabel>Timeouts</guilabel> subsection below <guilabel>Publishing</guilabel> allows you to set the start and stop time (in seconds) for the server to complete all of its operations. This setting is made available in order to decrease the chance of the server freezing or hanging.
@@ -143,7 +143,7 @@
<title>Server access</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/JBoss_AS_localhost.png" format="PNG" width="444" />
+ <imagedata fileref="images/JBoss_AS_localhost.png" format="PNG" />
</imageobject>
</mediaobject>
</figure>
@@ -152,10 +152,10 @@
</para>
</section>
- <section id="sect-Beginners_Guide-JBoss_Application_Server-Adding_a_new_application_server_for_use_with_JBoss_Tools_or_JBoss_Developer_Studio">
- <title>Adding a new application server for use with JBoss Tools or JBoss Developer Studio</title>
+ <section id="sect-Beginners_Guide-JBoss_Application_Server-Adding_a_new_application_server_for_use_with_the_JBoss_Developer_Studio">
+ <title>Adding a new application server for use with the JBoss Developer Studio</title>
<para>
- Though JBoss Tools and JBoss Developer Studio may come with a pre-configured application server, you can still add your own servers. This section details how to add additional servers for use with JBoss Tools and the JBoss Developer Studio.
+ Though the JBoss Developer Studio may come with a pre-configured application server, you can still add your own servers. This section details how to add additional servers for use with the JBoss Developer Studio.
</para>
<para>
To add a new server runtime follow these steps:
Modified: trunk/documentation/guides/Beginners_Guide/en-US/Where_to_go_from_here.xml
===================================================================
--- trunk/documentation/guides/Beginners_Guide/en-US/Where_to_go_from_here.xml 2010-01-23 16:01:32 UTC (rev 19895)
+++ trunk/documentation/guides/Beginners_Guide/en-US/Where_to_go_from_here.xml 2010-01-25 04:16:07 UTC (rev 19896)
@@ -3,19 +3,13 @@
<chapter id="chap-Beginners_Guide-Where_to_go_from_here">
<title>Where to go from here</title>
<para>
- For information pertaining to Eclipse visit <ulink url="http://www.eclipse.org/">www.eclipse.org</ulink>.
+ For documentation on the plugins available as part of the JBoss Developer Studio visit <ulink url="http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/">http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/</ulink>.
</para>
<para>
- For information about the JBoss Application Server visit <ulink url="http://www.jboss.org/jbossas/">http://www.jboss.org/jbossas/</ulink>.
- </para>
- <para>
For documentation about the JBoss Enterprise Application Platform visit <ulink url="http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/">http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/</ulink>.
</para>
<para>
- For documentation on the plugins available as part of JBoss Tools visit <ulink url="http://www.jboss.org/tools/docs.html">http://www.jboss.org/tools/docs.html</ulink>.
+ For information pertaining to Eclipse visit <ulink url="http://www.eclipse.org/">www.eclipse.org</ulink>.
</para>
- <para>
- For documentation on the plugins available as part of the JBoss Developer Studio visit <ulink url="http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/">http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/</ulink>.
- </para>
</chapter>
15 years, 11 months
JBoss Tools SVN: r19895 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-01-23 11:01:32 -0500 (Sat, 23 Jan 2010)
New Revision: 19895
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5731 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java 2010-01-23 15:22:57 UTC (rev 19894)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java 2010-01-23 16:01:32 UTC (rev 19895)
@@ -22,6 +22,8 @@
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
/**
@@ -50,6 +52,10 @@
List<Change> changes = new ArrayList<Change>();
Change change = null;
for (int i= 0; i < configs.length; i++) {
+ ConsoleConfiguration cc = KnownConfigurations.getInstance().find(configs[i].getName());
+ if (cc != null) {
+ cc.reset();
+ }
change = new LaunchConfigurationResourceNameChange(configs[i], fResource.getFullPath(),
fResource.getParent().getFullPath().append(getArguments().getNewName()));
changes.add(change);
15 years, 11 months
JBoss Tools SVN: r19894 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/wizards and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-01-23 10:22:57 -0500 (Sat, 23 Jan 2010)
New Revision: 19894
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-2795, import/export wizards were finished.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-01-22 20:40:59 UTC (rev 19893)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.properties 2010-01-23 15:22:57 UTC (rev 19894)
@@ -9,7 +9,7 @@
PreferencePage_ElVariables=El Variables
visualEditorImpl_name=XulRunner Visual Editor
PreferencePage_VpeEditor=Visual Page Editor
-exportUnknownTagsTemplatesWizardName=Export unknown tags templates wizard
+exportUnknownTagsTemplatesWizardName=Unknown tags templates
exportUnknownTagsTemplatesWizardDescription=Export unknown tags templates to the external file
-importUnknownTagsTemplatesWizardName=Import unknown tags templates wizard
+importUnknownTagsTemplatesWizardName=Unknown tags templates
importUnknownTagsTemplatesWizardDescription=Import unknown tags templates from the external file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-01-22 20:40:59 UTC (rev 19893)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-01-23 15:22:57 UTC (rev 19894)
@@ -123,7 +123,7 @@
/*
* Fill the table with stored tags
*/
- updateTagsTable();
+ updateTagsTable(true);
/*
* Add path output and browse button
@@ -148,8 +148,10 @@
if (path != null) {
File file = new File(path);
pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
pathText.setText(pathString);
- setPageComplete(isPageComplete());
}
}
});
@@ -171,10 +173,34 @@
*/
}
- private void updateTagsTable() {
+ /**
+ * Updates visual table with tags templates.
+ *
+ * @param clearTagsTable clears current tags table
+ */
+ private void updateTagsTable(boolean clearTagsTable) {
+ /*
+ * Return when visual table hasn't been initialized.
+ */
if(tagsTable == null || tagsTable.isDisposed()) {
return;
}
+ /*
+ * Clear current visual table.
+ */
+ if (clearTagsTable) {
+ tagsTable.clearAll();
+ }
+ /*
+ * Return when tags templates list hasn't been initialized.
+ */
+ if (tagsList == null) {
+ return;
+ }
+ /*
+ * Remember current selection index
+ * and restore it at the end.
+ */
int selectionIndex = tagsTable.getSelectionIndex();
TableItem tableItem = null;
for (int i = 0; i < tagsList.size(); i++) {
@@ -262,11 +288,10 @@
@Override
public boolean isPageComplete() {
- /*
- * Later page should be complete some tags are selected.
- */
boolean isPageComplete = false;
- if ((pathString != null) && !Constants.EMPTY.equalsIgnoreCase(pathString)) {
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))) {
isPageComplete = true;
}
return isPageComplete;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-01-22 20:40:59 UTC (rev 19893)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-01-23 15:22:57 UTC (rev 19894)
@@ -118,24 +118,23 @@
*/
tagsList = VpeTemplateManager.getInstance()
.getAnyTemplates(enteredPath);
- /*
- * Update table tags list based on the loaded file.
- */
- updateTagsTable();
- /*
- * Check if the page is complete.
- */
- setPageComplete(isPageComplete());
+
} else {
/*
* Reset taglist, show empty table
*/
if (tagsList != null) {
tagsList.clear();
- updateTagsTable();
- setPageComplete(isPageComplete());
}
}
+ /*
+ * Update table tags list based on the loaded file.
+ */
+ updateTagsTable(true);
+ /*
+ * Check if the page is complete.
+ */
+ setPageComplete(isPageComplete());
}
});
@@ -150,6 +149,9 @@
if (path != null) {
File file = new File(path);
pathString = file.toString();
+ /*
+ * Then modifyText event will be dispatched.
+ */
pathText.setText(pathString);
}
}
@@ -184,10 +186,34 @@
}
- private void updateTagsTable() {
+ /**
+ * Updates visual table with tags templates.
+ *
+ * @param clearTagsTable clears current tags table
+ */
+ private void updateTagsTable(boolean clearTagsTable) {
+ /*
+ * Return when visual table hasn't been initialized.
+ */
if(tagsTable == null || tagsTable.isDisposed()) {
return;
}
+ /*
+ * Clear current visual table.
+ */
+ if (clearTagsTable) {
+ tagsTable.clearAll();
+ }
+ /*
+ * Return when tags templates list hasn't been initialized.
+ */
+ if (tagsList == null) {
+ return;
+ }
+ /*
+ * Remember current selection index
+ * and restore it at the end.
+ */
int selectionIndex = tagsTable.getSelectionIndex();
TableItem tableItem = null;
for (int i = 0; i < tagsList.size(); i++) {
@@ -198,7 +224,7 @@
tableItem = tagsTable.getItem(i);
} else {
/*
- * Add necessary item
+ * Add new item
*/
tableItem = new TableItem(tagsTable, SWT.BORDER, i);
}
@@ -217,7 +243,6 @@
*/
tableItem.setText(itemColumnsData);
}
-
/*
* Restoring selection index
*/
@@ -225,9 +250,8 @@
try {
tagsTable.setSelection(selectionIndex);
} catch (SWTException e) {
- /*
- * Do nothing
- */
+ VpePlugin.getDefault().logError(
+ VpeUIMessages.COULD_NOT_SET_TABLE_SELECTION, e);
}
}
}
@@ -268,11 +292,11 @@
@Override
public boolean isPageComplete() {
- /*
- * Later page should be complete some tags are selected.
- */
boolean isPageComplete = false;
- if ((pathString != null) && !Constants.EMPTY.equalsIgnoreCase(pathString)) {
+ if ((pathString != null)
+ && !Constants.EMPTY.equalsIgnoreCase(pathString)
+ && (Path.ROOT.isValidPath(pathString))
+ && ((Path.fromOSString(pathString)).toFile().exists())) {
isPageComplete = true;
}
return isPageComplete;
@@ -308,9 +332,9 @@
VpeTemplateManager.getInstance().setAnyTemplates(currentList);
} else {
/*
- * Log error if the operation could not be performed.
+ * Log WARNING if the operation could not be performed.
*/
- VpePlugin.getDefault().logError(VpeUIMessages.ERROR_ON_IMPORT_TAG_TEMPLATES);
+ VpePlugin.getDefault().logWarning(VpeUIMessages.NONE_TEMPLATES_WERE_ADDED);
}
return true;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-01-22 20:40:59 UTC (rev 19893)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-01-23 15:22:57 UTC (rev 19894)
@@ -151,6 +151,7 @@
public static String SELECT_ALL;
public static String DESELECT_ALL;
public static String BROWSE_BUTTON_TEXT;
- public static String ERROR_ON_IMPORT_TAG_TEMPLATES;
+ public static String NONE_TEMPLATES_WERE_ADDED;
+ public static String COULD_NOT_SET_TABLE_SELECTION;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-01-22 20:40:59 UTC (rev 19893)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-01-23 15:22:57 UTC (rev 19894)
@@ -26,7 +26,7 @@
TAG_STYLE=Tag style:
CHILDREN=Allow tag children:
VALUE=Value:
-TAG_NAME_IS_NOT_VALID=Tag name is not valid ({0})
+TAG_NAME_IS_NOT_VALID=Tag name ({0}) is not valid. The pattern is "taglib:tag"
TAG_FOR_DISPLAY_IS_NOT_VALID=Tag for display is not valid ({0}).
VALUE_IS_NOT_VALID=Value is not valid ({0}).
@@ -134,8 +134,9 @@
SELECT_ALL=Select All
DESELECT_ALL=Deselect All
BROWSE_BUTTON_TEXT=Browse...
-EXPORT_UNKNOWN_TAGS_PAGE_TITLE=Export unknown tags templates wizard
+EXPORT_UNKNOWN_TAGS_PAGE_TITLE=Unknown tags templates
EXPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION=Export unknown tags templates to external file
-IMPORT_UNKNOWN_TAGS_PAGE_TITLE=Import unknown tags templates wizard
+IMPORT_UNKNOWN_TAGS_PAGE_TITLE=Unknown tags templates
IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION=Import unknown tags templates from external file
-ERROR_ON_IMPORT_TAG_TEMPLATES=Error while importing unknown tag templates.
\ No newline at end of file
+NONE_TEMPLATES_WERE_ADDED=None of the templates were added.
+COULD_NOT_SET_TABLE_SELECTION=Could not set table selection.
\ No newline at end of file
15 years, 11 months
JBoss Tools SVN: r19893 - in trunk/modeshape/plugins/org.jboss.tools.modeshape.rest: docs and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2010-01-22 15:40:59 -0500 (Fri, 22 Jan 2010)
New Revision: 19893
Added:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapeMessageConsole.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapePreferencesDialog.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapeMessageConsole.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapePreferencesDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/ModeShapePreferencePage.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeContentProvider.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeMessageConsole.java
Removed:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingMessageConsole.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingPreferencesDialog.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingMessageConsole.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingPreferencesDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/PublishingPreferencePage.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingContentProvider.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingMessageConsole.java
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishDialog.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishedLocationsDialog.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ResourceContextMenu.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerDialog.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerView.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/Toc.html
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/helpContexts.xml
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/OperationDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishedLocationsDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ResourceContextMenu.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerDialog.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerView.png
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/toc.xml
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/plugin.xml
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/jobs/PublishJob.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFileExtensionEditor.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFoldersEditor.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
Log:
MODE-580 Rebranding to ModeShape. Mostly Eclipse Help documentation-related changes.
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapeMessageConsole.html (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingMessageConsole.html)
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapeMessageConsole.html (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapeMessageConsole.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -0,0 +1,65 @@
+<!--
+ ~ ModeShape (http://www.modeshape.org)
+ - See the COPYRIGHT.txt file distributed with this work for information
+ - regarding copyright ownership.
+ -
+ - 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.
+ -
+ - See the AUTHORS.txt file in the distribution for a full listing of
+ - individual contributors.
+ -->
+<h2>ModeShape Message Console</h2>
+
+<p>The <i>ModeShape Message Console</i> is shown in the <i>Workbench Console</i> view. Entries show the status and outcome of the publishing or unpublishing operations.</p>
+
+<p>Here is what the <i>ModeShape Message Console</i> looks like:</p>
+
+<img src="images/ModeShapeMessageConsole.png" border="0" alt="">
+
+<p>There are view toolbar buttons to clear the console, scroll lock, pin the console, display a different console, and to open another <i>ModeShape Message Console</i>.</p>
+
+<h3>Console Message Entries</h3>
+
+<p>For each operation there is an entry at the start of the operation that identifies the job number, operation type, number of files involved in the operation, server, repository, and workspace. There is another entry at the end of the operation that identifies the job number, operation type, and how long the operation took. Inbetween these entries are entries for each file involved in the operation. The file entry takes on the form of a job number, message prefix, and message. The message consists of an operation type, eclipse workspace path, and the URL of the repository for that file. The URL is a hyperlink that opens that file in the default or last used editor for that file.</p>
+
+<p>Here are the file entry message prefixes:</p>
+
+<table border="1">
+<tr>
+ <td align="center"><strong>++</strong> </td>
+ <td>if the file was successfully published (uploaded)</td>
+</tr>
+<tr>
+ <td align="center"><strong>--</strong> </td>
+ <td>if the file was successfully unpublished (removed)</td>
+</tr>
+<tr>
+ <td align="center"><strong>ERROR</strong> </td>
+ <td>if there was an error publishing or unpublishing the file</td>
+</tr>
+<tr>
+ <td align="center"><strong>INFO</strong> </td>
+ <td>if there was an informational message publishing or unpublishing the file</td>
+</tr>
+<tr>
+ <td align="center"><strong>WARN</strong> </td>
+ <td>if there is a warning when publishing or unpublishing a file (like trying to unpublish a file that was never unpublished)</td>
+</tr>
+</table>
+
+<h3>Operations</h3>
+
+<p>Each publishing or unpublishing operation can be run "in the background" so you don't have to wait around until an operation is finished. Simply click "Run in Background" on the operation dialog. This dialog identifies the operation type, the job number, and the operations progress. You can also cancel the operation using this dialog.</p>
+
+<p>Here is what the <i>Operation Dialog</i> looks like:</p>
+
+<img src="images/OperationDialog.png" border="0" alt="">
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="PublishDialog.html">Publishing and Unpublishing Dialog</a></li>
+</ul>
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapeMessageConsole.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapePreferencesDialog.html (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingPreferencesDialog.html)
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapePreferencesDialog.html (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapePreferencesDialog.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -0,0 +1,39 @@
+<!--
+ ~ ModeShape (http://www.modeshape.org)
+ - See the COPYRIGHT.txt file distributed with this work for information
+ - regarding copyright ownership.
+ -
+ - 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.
+ -
+ - See the AUTHORS.txt file in the distribution for a full listing of
+ - individual contributors.
+ -->
+<h2>ModeShape Preferences Page</h2>
+
+<p>The <i>ModeShape Preferences Page</i> provides settings that control what files are included in publishing and unpublishing operations. A publishing operation occurs when the selected files in your local workspace are uploaded to a specific ModeShape repository workspace. While an unpublishing operation occurs when the selected files in your local workspace are removed from a specific ModeShape repository workspace. The <i>Filtered File Extensions</i> preference and the <i>Filtered Folder Names</i> preference each provide a way to filter out certain files from these operations.</p>
+
+<p>Here is what the <i>ModeShape Preferences Page</i> looks like:</p>
+
+<img src="images/ModeShapePreferencesDialog.png" border="0" alt="">
+
+<h3>Filtered File Extensions Preference</h3>
+
+The <i>Filtered File Extensions</i> preference provides a way to construct a list of file extensions. If a file has an extension that matches one of these file extensions it will not be involved in either a publishing or unpublishing operation. To add a file extension simply click on the <code>New...</code> button to display the following dialog:
+
+<p><img src="images/NewFilteredFileExtension.png" border="0" alt=""></p>
+
+<h3>Filtered Folder Names Preference</h3>
+
+The <i>Filtered File Names</i> preference provides a way to construct a list of folder names. If a file is contained in a folder, or has an ancestor folder, with a name that matches one of these folder names it will not be involved in either a publishing or unpublishing operation. To add a folder name simply click on the <code>New...</code> button to display the following dialog:
+
+<p><img src="images/NewFilteredFolderName.png" border="0" alt=""></p>
+
+<h3>Related Topics</h3>
+
+<ul>
+<li><a href="PublishDialog.html">Publish/Unpublish Dialog</a></li>
+<li><a href="ResourceContextMenu.html">ModeShape Resource Context Menu</a></li>
+</ul>
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ModeShapePreferencesDialog.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishDialog.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishDialog.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishDialog.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -11,9 +11,9 @@
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
-->
-<h2>Publish/Unpublish Dialog</h2>
+<h2>ModeShape Publish/Unpublish Dialog</h2>
-<p>The <i>ModeShape Publish/Unpublish Dialog</i> is used to publish or unpublish workspace selected files and folders to/from repository workspaces. When publishing, the selected files will be uploaded to the selected repository workspace. When unpublishing, the selected files will be removed from the selected repository workspace (if they exist there). The <a href="PublishingPreferencesDialog.html">Publishing Preferences Page</a> allows you to filter out files contained within the selection based on their file extensions or by the name of the folder, or ancestor folder, they are contained within.</p>
+<p>The <i>ModeShape Publish/Unpublish Dialog</i> is used to publish or unpublish workspace selected files and folders to/from repository workspaces. When publishing, the selected files will be uploaded to the selected repository workspace. When unpublishing, the selected files will be removed from the selected repository workspace (if they exist there). The <a href="ModeShapePreferencesDialog.html">ModeShape Preferences Page</a> allows you to filter out files contained within the selection based on their file extensions or by the name of the folder, or ancestor folder, they are contained within.</p>
<p>Here is what the <i>Publish/Unpublish Dialog</i> looks like:</p>
@@ -24,11 +24,11 @@
<table border="1">
<tr>
<td align="right"><strong>Server Combo</strong> </td>
- <td>allows selection of a registered server</td>
+ <td>allows selection of a registered ModeShape server</td>
</tr>
<tr>
<td align="right"><strong>New Server Button</strong> </td>
- <td>use to create and register a new server that is hosting a ModeShape repository</td>
+ <td>use to create and register a new server that is hosting one or more ModeShape repositories</td>
</tr>
<tr>
<td align="right"><strong>Repository Combo</strong> </td>
@@ -48,12 +48,12 @@
</tr>
</table>
-<p>A server must be selected before a repository can be selected. Likewise, a repository must be selected before a workspace can be selected. The message area at the top of the dialog will indicate the type of operation (publish or unpublish) and if there is any missing information. Once the workspace has been selected the 'Finish' button will be enabled and the operation can be executed. These operations can be run in the background so that multiple operations can be run at the same time. The Publishing Message Console displays output from the operations.</p>
+<p>A server must be selected before a repository can be selected. Likewise, a repository must be selected before a workspace can be selected. The message area at the top of the dialog will indicate the type of operation (publish or unpublish) and if there is any missing information. Once the workspace has been selected the 'Finish' button will be enabled and the operation can be executed. These operations can be run in the background so that multiple operations can be run at the same time. The <a href="ModeShapeMessageConsole.html">ModeShape Message Console</a> displays output from the operations.</p>
<h3>Related Topics</h3>
<ul>
<li><a href="ServerDialog.html">Server Dialog</a></li>
-<li><a href="PublishingMessageConsole.html">Publishing Message Console</a></li>
-<li><a href="PublishingPreferencesDialog.html">Publishing Preferences Page</a></li>
+<li><a href="ModeShapeMessageConsole.html">ModeShape Message Console</a></li>
+<li><a href="ModeShapePreferencesDialog.html">ModeShape Preferences Page</a></li>
</ul>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishedLocationsDialog.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishedLocationsDialog.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishedLocationsDialog.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -11,7 +11,7 @@
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
-->
-<h2>Published Locations Dialog</h2>
+<h2>ModeShape Published Locations Dialog</h2>
<p>The <i>Published Locations Dialog</i> identifies all the ModeShape workspaces the selected file has been published to from this Eclipse workspace.</p>
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingMessageConsole.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingMessageConsole.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingMessageConsole.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -1,65 +0,0 @@
-<!--
- ~ ModeShape (http://www.modeshape.org)
- - See the COPYRIGHT.txt file distributed with this work for information
- - regarding copyright ownership.
- -
- - 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.
- -
- - See the AUTHORS.txt file in the distribution for a full listing of
- - individual contributors.
- -->
-<h2>ModeShape Message Console</h2>
-
-<p>The <i>ModeShape Message Console</i> is shown in the <i>Workbench Console</i> view. Entries show the status and outcome of the publishing or unpublishing operations.</p>
-
-<p>Here is what the <i>ModeShape Message Console</i> looks like:</p>
-
-<img src="images/PublishingMessageConsole.png" border="0" alt="">
-
-<p>There are view toolbar buttons to clear the console, scroll lock, pin the console, display a different console, and to open another <i>Publishing Message Console</i>.</p>
-
-<h3>Console Message Entries</h3>
-
-<p>For each operation there is an entry at the start of the operation that identifies the job number, operation type, number of files involved in the operation, server, repository, and workspace. There is another entry at the end of the operation that identifies the job number, operation type, and how long the operation took. Inbetween these entries are entries for each file involved in the operation. The file entry takes on the form of a job number, message prefix, and message. The message consists of an operation type, eclipse workspace path, and the URL of the repository for that file. The URL is a hyperlink that opens that file in the default or last used editor for that file.</p>
-
-<p>Here are the file entry message prefixes:</p>
-
-<table border="1">
-<tr>
- <td align="center"><strong>++</strong> </td>
- <td>if the file was successfully published (uploaded)</td>
-</tr>
-<tr>
- <td align="center"><strong>--</strong> </td>
- <td>if the file was successfully unpublished (removed)</td>
-</tr>
-<tr>
- <td align="center"><strong>ERROR</strong> </td>
- <td>if there was an error publishing or unpublishing the file</td>
-</tr>
-<tr>
- <td align="center"><strong>INFO</strong> </td>
- <td>if there was an informational message publishing or unpublishing the file</td>
-</tr>
-<tr>
- <td align="center"><strong>WARN</strong> </td>
- <td>if there is a warning when publishing or unpublishing a file (like trying to unpublish a file that was never unpublished)</td>
-</tr>
-</table>
-
-<h3>Operations</h3>
-
-<p>Each publishing or unpublishing operation can be run "in the background" so you don't have to wait around until an operation is finished. Simply click "Run in Background" on the operation dialog. This dialog identifies the operation type, the job number, and the operations progress. You can also cancel the operation using this dialog.</p>
-
-<p>Here is what the <i>Operation Dialog</i> looks like:</p>
-
-<img src="images/OperationDialog.png" border="0" alt="">
-
-<h3>Related Topics</h3>
-
-<ul>
-<li><a href="PublishDialog.html">Publishing and Unpublishing Dialog</a></li>
-</ul>
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingPreferencesDialog.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingPreferencesDialog.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/PublishingPreferencesDialog.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -1,39 +0,0 @@
-<!--
- ~ ModeShape (http://www.modeshape.org)
- - See the COPYRIGHT.txt file distributed with this work for information
- - regarding copyright ownership.
- -
- - 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.
- -
- - See the AUTHORS.txt file in the distribution for a full listing of
- - individual contributors.
- -->
-<h2>Publishing Preferences Page</h2>
-
-<p>The <i>Publishing Preferences Page</i> provides settings that control what files are included in publishing and unpublishing operations. A publishing operation occurs when the selected files in your local workspace are uploaded to a specific ModeShape repository workspace. While an unpublishing operation occurs when the selected files in your local workspace are removed from a specific ModeShape repository workspace. The <i>Filtered File Extensions</i> preference and the <i>Filtered Folder Names</i> preference each provide a way to filter out certain files from these operations.</p>
-
-<p>Here is what the <i>Publishing Preferences Page</i> looks like:</p>
-
-<img src="images/PublishingPreferencesDialog.png" border="0" alt="">
-
-<h3>Filtered File Extensions Preference</h3>
-
-The <i>Filtered File Extensions</i> preference provides a way to construct a list of file extensions. If a file has an extension that matches one of these file extensions it will not be involved in either a publishing or unpublishing operation. To add a file extension simply click on the <code>New...</code> button to display the following dialog:
-
-<p><img src="images/NewFilteredFileExtension.png" border="0" alt=""></p>
-
-<h3>Filtered Folder Names Preference</h3>
-
-The <i>Filtered File Names</i> preference provides a way to construct a list of folder names. If a file is contained in a folder, or has an ancestor folder, with a name that matches one of these folder names it will not be involved in either a publishing or unpublishing operation. To add a folder name simply click on the <code>New...</code> button to display the following dialog:
-
-<p><img src="images/NewFilteredFolderName.png" border="0" alt=""></p>
-
-<h3>Related Topics</h3>
-
-<ul>
-<li><a href="PublishDialog.html">Publish/Unpublish Dialog</a></li>
-<li><a href="ResourceContextMenu.html">ModeShape Resource Context Menu</a></li>
-</ul>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ResourceContextMenu.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ResourceContextMenu.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ResourceContextMenu.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -11,7 +11,7 @@
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
-->
-<h2>Resource Context Menu</h2>
+<h2>ModeShape Resource Context Menu</h2>
<p>The <i>Resource Context Menu</i> consists of these actions: publish, unpublish, and show published locations. The publish and unpublish actions will be enabled when one or more resources (i.e, project, folder, or file) in the workspace are selected. When publishing, the selected resources will be uploaded to a ModeShape repository workspace. When unpublishing, the selected resources will be removed from a selected ModeShape repository workspace (if they exist there). If a resource has already been published using the current Eclipse workspace, the show published locations action will be enabled.</p>
@@ -19,11 +19,11 @@
<img src="images/ResourceContextMenu.png" border="0" alt="">
-<p>Files can be filtered out of publishing and unpublishing operations even though they have been selected. Use the <a href="PublishingPreferencesDialog.html">Publishing Preferences Page</a> to filter out files contained within the selection based on their file extensions or by the name of the folder, or ancestor folder, they are contained within. </p>
+<p>Files can be filtered out of publishing and unpublishing operations even though they have been selected. Use the <a href="ModeShapePreferencesDialog.html">ModeShape Preferences Page</a> to filter out files contained within the selection based on their file extensions or by the name of the folder, or ancestor folder, they are contained within. </p>
<h3>Related Topics</h3>
<ul>
<li><a href="PublishDialog.html">Publishing and Unpublishing Dialog</a></li>
-<li><a href="PublishingPreferenceDialog.html">Publishing Preferences Dialog</a></li>
+<li><a href="ModeShapePreferenceDialog.html">ModeShape Preferences Dialog</a></li>
</ul>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerDialog.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerDialog.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerDialog.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -11,7 +11,7 @@
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
-->
-<h2>Server Dialog</h2>
+<h2>ModeShape Server Dialog</h2>
<p>The <i>Server Dialog</i> is used to create and register new servers that host ModeShape repositories. This dialog is also used to edit an existing server's properties.</p>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerView.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerView.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/ServerView.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -11,7 +11,7 @@
- See the AUTHORS.txt file in the distribution for a full listing of
- individual contributors.
-->
-<h2>Server View</h2>
+<h2>ModeShape Server View</h2>
<p>The <i>Server View</i> displays the registered servers hosting ModeShape repositories. For each server, the repositories and repository workspaces are also displayed. There are view toolbar buttons to create a new server (<img src="images/new_server.gif" border="0" alt="">), edit a selected server's properties (<img src="images/edit_server.gif" border="0" alt="">), discard one or more selected servers (<img src="images/delete_server.gif" border="0" alt="">), reconnect to a selected server (<img src="images/refresh.gif" border="0" alt="">), and collapse all servers so that their repositories and workspaces can't be seen (<img src="images/collapse_all.gif" border="0" alt="">). If a connection to a server cannot be established that server icon will be decorated with an error overlay image.</p>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/Toc.html
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/Toc.html 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/Toc.html 2010-01-22 20:40:59 UTC (rev 19893)
@@ -17,8 +17,8 @@
<li><a href="PublishDialog.html">Publish/Unpublish Dialog</a></li>
<li><a href="ServerDialog.html">Server Dialog</a></li>
<li><a href="ServerView.html">Server View</a></li>
-<li><a href="PublishingMessageConsole.html">Publishing Message Console</a></li>
+<li><a href="ModeShapeMessageConsole.html">ModeShape Message Console</a></li>
<li><a href="PublishedLocationsDialog.html">Published Locations Dialog</a></li>
<li><a href="ResourceContextMenu.html">Resource Context Menu</a></li>
-<li><a href="PublishingPreferencesDialog.html">Publishing Preferences Page</a></li>
+<li><a href="ModeShapePreferencesDialog.html">ModeShape Preferences Page</a></li>
</ul>
\ No newline at end of file
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/helpContexts.xml
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/helpContexts.xml 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/helpContexts.xml 2010-01-22 20:40:59 UTC (rev 19893)
@@ -26,15 +26,15 @@
<description>The Publish/Unpublish Dialog uploads or removes selected resources from the selected server.</description>
<topic href="docs/PublishDialog.html" label="Publish/Unpublish Dialog"/>
<topic href="docs/ServerDialog.html" label="Create a new server"/>
- <topic href="docs/PublishingPreferencesDialog.html" label="Publishing Preferences"/>
+ <topic href="docs/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
</context>
- <context id="preferencesHelpContext" title="Publishing Preferences Dialog Help">
- <description>The Publishing Preferences Dialog allows you to identify file extensions and folder names that should not be involved in publishing operations.</description>
- <topic href="docs/PublishingPreferencesDialog.html" label="Publishing Preferences"/>
+ <context id="preferencesHelpContext" title="ModeShape Preferences Dialog Help">
+ <description>The ModeShape Preferences Dialog allows you to identify file extensions and folder names that should not be involved in publishing operations.</description>
+ <topic href="docs/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
<topic href="docs/PublishDialog.html" label="Publish/Unpublish Dialog"/>
</context>
- <context id="messageConsoleHelpContext" title="Publishing Message Console">
- <description>The ModeShape Publishing Message Console contains the output from the publishing and unpublishing operations.</description>
- <topic href="docs/PublishingMessageConsole.html" label="Publishing Message Console"/>
+ <context id="messageConsoleHelpContext" title="ModeShape Message Console">
+ <description>The ModeShape Message Console contains the output from the publishing and unpublishing operations.</description>
+ <topic href="docs/ModeShapeMessageConsole.html" label="ModeShape Message Console"/>
</context>
</contexts>
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapeMessageConsole.png (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingMessageConsole.png)
===================================================================
(Binary files differ)
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapeMessageConsole.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapePreferencesDialog.png (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingPreferencesDialog.png)
===================================================================
(Binary files differ)
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ModeShapePreferencesDialog.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/OperationDialog.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishDialog.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishedLocationsDialog.png
===================================================================
(Binary files differ)
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingMessageConsole.png
===================================================================
(Binary files differ)
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/PublishingPreferencesDialog.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ResourceContextMenu.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerDialog.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/images/ServerView.png
===================================================================
(Binary files differ)
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/toc.xml
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/toc.xml 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/docs/toc.xml 2010-01-22 20:40:59 UTC (rev 19893)
@@ -15,8 +15,8 @@
<topic label="Publishing/Unpublishing Dialog" href="docs/PublishDialog.html"/>
<topic label="Server View" href="docs/ServerView.html"/>
<topic label="Server Dialog" href="docs/ServerDialog.html"/>
- <topic label="Publishing Message Console" href="docs/PublishingMessageConsole.html"/>
+ <topic label="ModeShape Message Console" href="docs/ModeShapeMessageConsole.html"/>
<topic label="Published Locations Dialog" href="docs/PublishedLocationsDialog.html"/>
<topic label="Resource Context Menu" href="docs/ResourceContextMenu.html"/>
- <topic label="Publishing Preferences Dialog" href="docs/PublishingPreferencesDialog.html"/>
+ <topic label="ModeShape Preferences Dialog" href="docs/ModeShapePreferencesDialog.html"/>
</toc>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/plugin.xml
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/plugin.xml 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/plugin.xml 2010-01-22 20:40:59 UTC (rev 19893)
@@ -116,7 +116,7 @@
adaptable="true"
label="%decorator.label"
state="true"
- class="org.jboss.tools.modeshape.rest.views.PublishingContentProvider"
+ class="org.jboss.tools.modeshape.rest.views.ModeShapeContentProvider"
id="org.jboss.tools.modeshape.rest.decorator">
<description>
%decorator.description
@@ -149,8 +149,8 @@
point="org.eclipse.ui.preferencePages">
<page
name="%modeShapeCategory"
- class="org.jboss.tools.modeshape.rest.preferences.PublishingPreferencePage"
- id="publishingPreferencePage">
+ class="org.jboss.tools.modeshape.rest.preferences.ModeShapePreferencePage"
+ id="modeShapePreferencePage">
</page>
</extension>
</plugin>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -71,11 +71,11 @@
public static I18n publishingConsoleProblemCreatingHyperlinkMsg;
public static I18n publishingConsoleFilePathNotFoundMsg;
- public static I18n publishingPreferencePageDescription;
- public static I18n publishingPreferencePageFilteredFileExtensionsLabel;
- public static I18n publishingPreferencePageFilteredFolderNamesLabel;
- public static I18n publishingPreferencePageMessage;
- public static I18n publishingPreferencePageTitle;
+ public static I18n preferencePageDescription;
+ public static I18n preferencePageFilteredFileExtensionsLabel;
+ public static I18n preferencePageFilteredFolderNamesLabel;
+ public static I18n preferencePageMessage;
+ public static I18n preferencePageTitle;
public static I18n publishJobCanceled;
public static I18n publishJobDurationMsg;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/RestClientI18n.properties 2010-01-22 20:40:59 UTC (rev 19893)
@@ -63,11 +63,11 @@
publishingConsoleProblemCreatingHyperlinkMsg = Unexpected problem creating hyperlink in ModeShape Message Console view
publishingConsoleFilePathNotFoundMsg = A hyperlink could not be created in the ModeShape Message Console because the file path of "{0}" could not be found.
-publishingPreferencePageDescription = Add or remove filtered file extensions and folder names. Files with a matching file extension or files that are contained in a folder with a matching name will NOT be published to or unpublished from repositories.
-publishingPreferencePageFilteredFileExtensionsLabel = Filtered File Extensions:
-publishingPreferencePageFilteredFolderNamesLabel = Filtered Folder Names:
-publishingPreferencePageMessage = ModeShape
-publishingPreferencePageTitle = ModeShape Preferences
+preferencePageDescription = Add or remove file extensions and folder names. Files with a matching file extension or files that are contained in a folder with a matching name will NOT be published to or unpublished from repositories.
+preferencePageFilteredFileExtensionsLabel = Filtered File Extensions:
+preferencePageFilteredFolderNamesLabel = Filtered Folder Names:
+preferencePageMessage = ModeShape
+preferencePageTitle = ModeShape Preferences
publishJobCanceled = Job {0} was canceled. See log for details.
publishJobDurationMsg = {0} hour(s), {1} minute(s), {2} second(s)
@@ -106,7 +106,7 @@
publishPageNoResourcesToPublishStatusMsg = There are no files that can be published
publishPageNoResourcesToUnpublishStatusMsg = There are no files that can be unpublished
publishPagePublishOkStatusMsg = Choose the server, repository, and workspace where the resources will be published. Click "Finish" to execute the publish operation.
-publishPagePublishResourcesLabel = These resources will be uploaded to the specified workspace:
+publishPagePublishResourcesLabel = These resources will be uploaded to the above specified ModeShape workspace:
publishPageRecurseCheckBox = Recurse folders and projects
publishPageRecurseCheckBoxToolTip = Add all files under folders recursively under selected projects and folders
publishPageRecurseProcessingErrorMsg = Unexpected error processing resources. See log for more details.
@@ -149,7 +149,7 @@
serverPageAuthenticationGroupTitle = Authentication
serverPageInvalidServerProperties = Cannot construct a server because all server properties are not valid
-serverPageOkStatusMsg = Define the server information where the repositories are located.
+serverPageOkStatusMsg = Define the server information where the ModeShape repositories are located.
serverPagePasswordLabel = Password:
serverPagePasswordToolTip = The password used to authenticate the user when connecting to the server
serverPageSavePasswordButton = Save password
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/jobs/PublishJob.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/jobs/PublishJob.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/jobs/PublishJob.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -27,8 +27,8 @@
import org.jboss.tools.modeshape.rest.PublishedResourceHelper;
import org.jboss.tools.modeshape.rest.RestClientI18n;
import org.jboss.tools.modeshape.rest.ServerManager;
-import org.jboss.tools.modeshape.rest.views.PublishingContentProvider;
-import org.jboss.tools.modeshape.rest.views.PublishingMessageConsole;
+import org.jboss.tools.modeshape.rest.views.ModeShapeContentProvider;
+import org.jboss.tools.modeshape.rest.views.ModeShapeMessageConsole;
import org.modeshape.common.util.CheckArg;
import org.modeshape.web.jcr.rest.client.Status;
import org.modeshape.web.jcr.rest.client.domain.Workspace;
@@ -185,13 +185,13 @@
// write initial message to console
if (isPublishing()) {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobPublish.text(this.jobId,
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobPublish.text(this.jobId,
serverUrl,
repositoryName,
workspaceName,
fileCount));
} else {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobUnpublish.text(this.jobId,
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobUnpublish.text(this.jobId,
serverUrl,
repositoryName,
workspaceName,
@@ -231,7 +231,7 @@
monitor.worked(1);
// let decorator know publishing state has changed on this file
- PublishingContentProvider decorator = PublishingContentProvider.getDecorator();
+ ModeShapeContentProvider decorator = ModeShapeContentProvider.getDecorator();
if (decorator != null) {
decorator.refresh(eclipseFile);
@@ -279,21 +279,21 @@
if (canceled) {
if (isPublishing()) {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobPublishCanceledMsg.text(this.jobId,
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobPublishCanceledMsg.text(this.jobId,
numProcessed,
this.files.size(),
duration));
} else {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobUnpublishCanceledMsg.text(this.jobId,
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobUnpublishCanceledMsg.text(this.jobId,
numProcessed,
this.files.size(),
duration));
}
} else {
if (isPublishing()) {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobPublishFinishedMsg.text(this.jobId, duration));
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobPublishFinishedMsg.text(this.jobId, duration));
} else {
- PublishingMessageConsole.writeln(RestClientI18n.publishJobUnpublishFinishedMsg.text(this.jobId, duration));
+ ModeShapeMessageConsole.writeln(RestClientI18n.publishJobUnpublishFinishedMsg.text(this.jobId, duration));
}
}
}
@@ -347,7 +347,7 @@
}
// write to console creating a hyperlink
- PublishingMessageConsole.writeln(message, file);
+ ModeShapeMessageConsole.writeln(message, file);
}
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFileExtensionEditor.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFileExtensionEditor.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFileExtensionEditor.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -16,7 +16,7 @@
import static org.jboss.tools.modeshape.rest.IUiConstants.FILTERED_FILE_EXTENSIONS_PREFERENCE;
import static org.jboss.tools.modeshape.rest.RestClientI18n.newFilteredFileExtensionDialogLabel;
import static org.jboss.tools.modeshape.rest.RestClientI18n.newFilteredFileExtensionDialogTitle;
-import static org.jboss.tools.modeshape.rest.RestClientI18n.publishingPreferencePageFilteredFileExtensionsLabel;
+import static org.jboss.tools.modeshape.rest.RestClientI18n.preferencePageFilteredFileExtensionsLabel;
import static org.jboss.tools.modeshape.rest.preferences.PrefUtils.FILE_EXT_DELIMITER;
import static org.jboss.tools.modeshape.rest.preferences.PrefUtils.FILE_EXT_INVALID_CHARS;
import java.util.Arrays;
@@ -51,7 +51,7 @@
* @param parent the parent control
*/
public FilteredFileExtensionEditor( Composite parent ) {
- super(FILTERED_FILE_EXTENSIONS_PREFERENCE, publishingPreferencePageFilteredFileExtensionsLabel.text(), parent);
+ super(FILTERED_FILE_EXTENSIONS_PREFERENCE, preferencePageFilteredFileExtensionsLabel.text(), parent);
this.extensions = new TreeSet<String>();
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFoldersEditor.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFoldersEditor.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/FilteredFoldersEditor.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -16,7 +16,7 @@
import static org.jboss.tools.modeshape.rest.IUiConstants.FILTERED_FOLDER_NAMES_PREFERENCE;
import static org.jboss.tools.modeshape.rest.RestClientI18n.newFilteredFolderNameDialogLabel;
import static org.jboss.tools.modeshape.rest.RestClientI18n.newFilteredFolderNameDialogTitle;
-import static org.jboss.tools.modeshape.rest.RestClientI18n.publishingPreferencePageFilteredFolderNamesLabel;
+import static org.jboss.tools.modeshape.rest.RestClientI18n.preferencePageFilteredFolderNamesLabel;
import static org.jboss.tools.modeshape.rest.preferences.PrefUtils.FOLDER_NAME_DELIMITER;
import static org.jboss.tools.modeshape.rest.preferences.PrefUtils.FOLDER_NAME_INVALID_CHARS;
import java.util.Arrays;
@@ -51,7 +51,7 @@
* @param parent the parent control
*/
public FilteredFoldersEditor( Composite parent ) {
- super(FILTERED_FOLDER_NAMES_PREFERENCE, publishingPreferencePageFilteredFolderNamesLabel.text(), parent);
+ super(FILTERED_FOLDER_NAMES_PREFERENCE, preferencePageFilteredFolderNamesLabel.text(), parent);
this.folderNames = new TreeSet<String>();
}
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/ModeShapePreferencePage.java (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/PublishingPreferencePage.java)
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/ModeShapePreferencePage.java (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/ModeShapePreferencePage.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -0,0 +1,175 @@
+/*
+ * ModeShape (http://www.modeshape.org)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.
+ *
+ * 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.
+ *
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ */
+package org.jboss.tools.modeshape.rest.preferences;
+
+import static org.jboss.tools.modeshape.rest.IUiConstants.ModeShape_IMAGE_16x;
+import static org.jboss.tools.modeshape.rest.IUiConstants.PREFERENCE_PAGE_HELP_CONTEXT;
+import static org.jboss.tools.modeshape.rest.RestClientI18n.preferencePageDescription;
+import static org.jboss.tools.modeshape.rest.RestClientI18n.preferencePageMessage;
+import static org.jboss.tools.modeshape.rest.RestClientI18n.preferencePageTitle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
+import org.jboss.tools.modeshape.rest.Activator;
+
+/**
+ * The <code>ModeShapePreferencePage</code> is the UI for managing all ModeShape-related preferences.
+ */
+public final class ModeShapePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ // ===========================================================================================================================
+ // Fields
+ // ===========================================================================================================================
+
+ /**
+ * The editor used to manage the list of filtered file extensions.
+ */
+ private FilteredFileExtensionEditor extensionsEditor;
+
+ /**
+ * The editor used to manage the list of filtered folder names.
+ */
+ private FilteredFoldersEditor foldersEditor;
+
+ // ===========================================================================================================================
+ // Methods
+ // ===========================================================================================================================
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents( Composite parent ) {
+ Composite panel = new Composite(parent, SWT.NONE);
+ panel.setLayout(new GridLayout(2, false));
+ panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // create the filtered extensions editor
+ this.extensionsEditor = new FilteredFileExtensionEditor(panel);
+ this.extensionsEditor.setPreferenceStore(getPreferenceStore());
+ this.extensionsEditor.getListControl(panel).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // populate the extensions editor
+ this.extensionsEditor.load();
+
+ // create the filtered folders editor
+ this.foldersEditor = new FilteredFoldersEditor(panel);
+ this.foldersEditor.setPreferenceStore(getPreferenceStore());
+ this.foldersEditor.getListControl(panel).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ // populate the folders editor
+ this.foldersEditor.load();
+
+ // register with the help system
+ IWorkbenchHelpSystem helpSystem = Activator.getDefault().getWorkbench().getHelpSystem();
+ helpSystem.setHelp(panel, PREFERENCE_PAGE_HELP_CONTEXT);
+
+ return panel;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#getDescription()
+ */
+ @Override
+ public String getDescription() {
+ return preferencePageDescription.text();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#getImage()
+ */
+ @Override
+ public Image getImage() {
+ return Activator.getDefault().getImage(ModeShape_IMAGE_16x);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#getMessage()
+ */
+ @Override
+ public String getMessage() {
+ return preferencePageMessage.text();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#getPreferenceStore()
+ */
+ @Override
+ public IPreferenceStore getPreferenceStore() {
+ return PrefUtils.getPreferenceStore();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#getTitle()
+ */
+ @Override
+ public String getTitle() {
+ return preferencePageTitle.text();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ @Override
+ public void init( IWorkbench workbench ) {
+ // nothing to do
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+ */
+ @Override
+ protected void performDefaults() {
+ this.extensionsEditor.loadDefault();
+ this.foldersEditor.loadDefault();
+ super.performDefaults();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#performOk()
+ */
+ @Override
+ public boolean performOk() {
+ this.extensionsEditor.store();
+ this.foldersEditor.store();
+ return super.performOk();
+ }
+
+}
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/ModeShapePreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/PublishingPreferencePage.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/PublishingPreferencePage.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/preferences/PublishingPreferencePage.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -1,175 +0,0 @@
-/*
- * ModeShape (http://www.modeshape.org)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.
- *
- * 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.
- *
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- */
-package org.jboss.tools.modeshape.rest.preferences;
-
-import static org.jboss.tools.modeshape.rest.IUiConstants.ModeShape_IMAGE_16x;
-import static org.jboss.tools.modeshape.rest.IUiConstants.PREFERENCE_PAGE_HELP_CONTEXT;
-import static org.jboss.tools.modeshape.rest.RestClientI18n.publishingPreferencePageDescription;
-import static org.jboss.tools.modeshape.rest.RestClientI18n.publishingPreferencePageMessage;
-import static org.jboss.tools.modeshape.rest.RestClientI18n.publishingPreferencePageTitle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.help.IWorkbenchHelpSystem;
-import org.jboss.tools.modeshape.rest.Activator;
-
-/**
- * The <code>PublishingPreferencePage</code> is the UI for managing all ModeShape-related preferences.
- */
-public final class PublishingPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- // ===========================================================================================================================
- // Fields
- // ===========================================================================================================================
-
- /**
- * The editor used to manage the list of filtered file extensions.
- */
- private FilteredFileExtensionEditor extensionsEditor;
-
- /**
- * The editor used to manage the list of filtered folder names.
- */
- private FilteredFoldersEditor foldersEditor;
-
- // ===========================================================================================================================
- // Methods
- // ===========================================================================================================================
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents( Composite parent ) {
- Composite panel = new Composite(parent, SWT.NONE);
- panel.setLayout(new GridLayout(2, false));
- panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- // create the filtered extensions editor
- this.extensionsEditor = new FilteredFileExtensionEditor(panel);
- this.extensionsEditor.setPreferenceStore(getPreferenceStore());
- this.extensionsEditor.getListControl(panel).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- // populate the extensions editor
- this.extensionsEditor.load();
-
- // create the filtered folders editor
- this.foldersEditor = new FilteredFoldersEditor(panel);
- this.foldersEditor.setPreferenceStore(getPreferenceStore());
- this.foldersEditor.getListControl(panel).setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- // populate the folders editor
- this.foldersEditor.load();
-
- // register with the help system
- IWorkbenchHelpSystem helpSystem = Activator.getDefault().getWorkbench().getHelpSystem();
- helpSystem.setHelp(panel, PREFERENCE_PAGE_HELP_CONTEXT);
-
- return panel;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.dialogs.DialogPage#getDescription()
- */
- @Override
- public String getDescription() {
- return publishingPreferencePageDescription.text();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.dialogs.DialogPage#getImage()
- */
- @Override
- public Image getImage() {
- return Activator.getDefault().getImage(ModeShape_IMAGE_16x);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.dialogs.DialogPage#getMessage()
- */
- @Override
- public String getMessage() {
- return publishingPreferencePageMessage.text();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.preference.PreferencePage#getPreferenceStore()
- */
- @Override
- public IPreferenceStore getPreferenceStore() {
- return PrefUtils.getPreferenceStore();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.dialogs.DialogPage#getTitle()
- */
- @Override
- public String getTitle() {
- return publishingPreferencePageTitle.text();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- @Override
- public void init( IWorkbench workbench ) {
- // nothing to do
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- @Override
- protected void performDefaults() {
- this.extensionsEditor.loadDefault();
- this.foldersEditor.loadDefault();
- super.performDefaults();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
- @Override
- public boolean performOk() {
- this.extensionsEditor.store();
- this.foldersEditor.store();
- return super.performOk();
- }
-
-}
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeContentProvider.java (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingContentProvider.java)
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeContentProvider.java (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeContentProvider.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -0,0 +1,415 @@
+/*
+ * ModeShape (http://www.modeshape.org)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.
+ *
+ * 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.
+ *
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ */
+package org.jboss.tools.modeshape.rest.views;
+
+import static org.jboss.tools.modeshape.rest.IUiConstants.PUBLISHED_OVERLAY_IMAGE;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import net.jcip.annotations.GuardedBy;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IDecoratorManager;
+import org.jboss.tools.modeshape.rest.Activator;
+import org.jboss.tools.modeshape.rest.IServerRegistryListener;
+import org.jboss.tools.modeshape.rest.PublishedResourceHelper;
+import org.jboss.tools.modeshape.rest.RestClientI18n;
+import org.jboss.tools.modeshape.rest.ServerManager;
+import org.jboss.tools.modeshape.rest.ServerRegistryEvent;
+import org.jboss.tools.modeshape.rest.Utils;
+import org.modeshape.web.jcr.rest.client.Status;
+import org.modeshape.web.jcr.rest.client.Status.Severity;
+import org.modeshape.web.jcr.rest.client.domain.IModeShapeObject;
+import org.modeshape.web.jcr.rest.client.domain.Repository;
+import org.modeshape.web.jcr.rest.client.domain.Server;
+import org.modeshape.web.jcr.rest.client.domain.Workspace;
+
+/**
+ * The <code>ModeShapeContentProvider</code> is a content and label provider for the repositories. This class
+ * <strong>MUST</strong> be registered, and then unregistered, to receive server registry events.
+ */
+public final class ModeShapeContentProvider extends ColumnLabelProvider
+ implements ILightweightLabelDecorator, IServerRegistryListener, ITreeContentProvider {
+
+ // ===========================================================================================================================
+ // Constants
+ // ===========================================================================================================================
+
+ /**
+ * The decorator ID.
+ */
+ private static final String ID = "org.jboss.tools.modeshape.rest.decorator";
+
+ /**
+ * If a server connection cannot be established, wait this amount of time before trying again.
+ */
+ private static final long RETRY_DURATION = 2000;
+
+ // ===========================================================================================================================
+ // Class Methods
+ // ===========================================================================================================================
+
+ /**
+ * @return the decorator
+ */
+ public static ModeShapeContentProvider getDecorator() {
+ IDecoratorManager decoratorMgr = Activator.getDefault().getWorkbench().getDecoratorManager();
+
+ if (decoratorMgr.getEnabled(ID)) {
+ return (ModeShapeContentProvider)decoratorMgr.getBaseLabelProvider(ID);
+ }
+
+ return null;
+ }
+
+ // ===========================================================================================================================
+ // Fields
+ // ===========================================================================================================================
+
+ /**
+ * Servers that a connection can't be established. Value is the last time a establishing a connection was tried.
+ */
+ @GuardedBy( "offlineServersLock" )
+ private final Map<Server, Long> offlineServerMap = new HashMap<Server, Long>();
+
+ /**
+ * Lock used for when accessing the offline server map. The map will be accessed in different threads as the decorator runs in
+ * its own thread (not the UI thread).
+ */
+ private final ReadWriteLock offlineServersLock = new ReentrantReadWriteLock();
+
+ /**
+ * The server manager where the server registry is managed.
+ */
+ private ServerManager serverManager;
+
+ // ===========================================================================================================================
+ // Methods
+ // ===========================================================================================================================
+
+ /**
+ * @param server the server that is offline
+ */
+ private void addOfflineServer( Server server ) {
+ try {
+ this.offlineServersLock.writeLock().lock();
+ this.offlineServerMap.put(server, System.currentTimeMillis());
+ } finally {
+ this.offlineServersLock.writeLock().unlock();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object, org.eclipse.jface.viewers.IDecoration)
+ */
+ @Override
+ public void decorate( final Object element,
+ IDecoration decoration ) {
+ ImageDescriptor overlay = null;
+ final Display display = Display.getDefault();
+
+ if (display.isDisposed()) {
+ return;
+ }
+
+ if (getServerManager() != null) {
+ if (element instanceof Server) {
+ Server server = (Server)element;
+
+ if (isOkToConnect(server)) {
+ Status status = getServerManager().ping(server);
+ overlay = Utils.getOverlayImage(status);
+
+ if (status.isError()) {
+ addOfflineServer(server);
+ }
+ }
+ } else if ((element instanceof IFile) && new PublishedResourceHelper(getServerManager()).isPublished((IFile)element)) {
+ overlay = Activator.getDefault().getImageDescriptor(PUBLISHED_OVERLAY_IMAGE);
+ }
+
+ if (overlay != null) {
+ decoration.addOverlay(overlay);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ // nothing to do
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ @Override
+ public Object[] getChildren( Object parentElement ) {
+ assert (parentElement instanceof IModeShapeObject);
+
+ if (getServerManager() != null) {
+ if (parentElement instanceof Server) {
+ Server server = (Server)parentElement;
+
+ if (isOkToConnect(server)) {
+ try {
+ return getServerManager().getRepositories(server).toArray();
+ } catch (Exception e) {
+ addOfflineServer(server);
+ String msg = RestClientI18n.serverManagerGetRepositoriesExceptionMsg.text(server.getShortDescription());
+ Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
+ }
+ }
+ } else if (parentElement instanceof Repository) {
+ Repository repository = (Repository)parentElement;
+
+ if (isOkToConnect(repository.getServer())) {
+ try {
+ return getServerManager().getWorkspaces(repository).toArray();
+ } catch (Exception e) {
+ addOfflineServer(repository.getServer());
+ String msg = RestClientI18n.serverManagerGetWorkspacesExceptionMsg.text(repository.getShortDescription());
+ Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
+ }
+ }
+ }
+ }
+
+ return new Object[0];
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public Object[] getElements( Object inputElement ) {
+ return ((getServerManager() == null) ? new Object[0] : getServerManager().getServers().toArray());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage( Object element ) {
+ return Activator.getDefault().getImage(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ @Override
+ public Object getParent( Object element ) {
+ assert (element instanceof IModeShapeObject);
+
+ if (element instanceof Workspace) {
+ return ((Workspace)element).getRepository();
+ }
+
+ if (element instanceof Repository) {
+ return ((Repository)element).getServer();
+ }
+
+ // server
+ return null;
+ }
+
+ /**
+ * @return the server manager (never <code>null</code>)
+ */
+ private ServerManager getServerManager() {
+ if (this.serverManager == null) {
+ this.serverManager = Activator.getDefault().getServerManager();
+ }
+
+ return this.serverManager;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText( Object element ) {
+ assert (element instanceof IModeShapeObject);
+ return ((IModeShapeObject)element).getName();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipImage(java.lang.Object)
+ */
+ @Override
+ public Image getToolTipImage( Object object ) {
+ return getImage(object);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
+ */
+ @Override
+ public String getToolTipText( Object element ) {
+ if (element instanceof IModeShapeObject) {
+ return ((IModeShapeObject)element).getShortDescription();
+ }
+
+ return super.getToolTipText(element);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object)
+ */
+ @Override
+ public int getToolTipTimeDisplayed( Object object ) {
+ return 3000;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ @Override
+ public boolean hasChildren( Object element ) {
+ return getChildren(element).length > 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object,
+ * java.lang.Object)
+ */
+ @Override
+ public void inputChanged( Viewer viewer,
+ Object oldInput,
+ Object newInput ) {
+ // nothing to do
+ }
+
+ public void refresh( final Object element ) {
+ final Display display = Display.getDefault();
+
+ if (display.isDisposed()) {
+ return;
+ }
+
+ display.asyncExec(new Runnable() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Runnable#run()
+ */
+ @SuppressWarnings( "synthetic-access" )
+ @Override
+ public void run() {
+ fireLabelProviderChanged(new LabelProviderChangedEvent(ModeShapeContentProvider.this, element));
+ }
+ });
+ }
+
+ /**
+ * Determines if a try to connect to a server should be done based on the last time a try was done and failed.
+ *
+ * @param server the server being checked
+ * @return <code>true</code> if it is OK to try and connect
+ */
+ private boolean isOkToConnect( Server server ) {
+ boolean check = false; // check map for time
+
+ try {
+ this.offlineServersLock.readLock().lock();
+ check = this.offlineServerMap.containsKey(server);
+ } finally {
+ this.offlineServersLock.readLock().unlock();
+ }
+
+ if (check) {
+ try {
+ this.offlineServersLock.writeLock().lock();
+
+ if (this.offlineServerMap.containsKey(server)) {
+ long checkTime = this.offlineServerMap.get(server);
+
+ // OK to try and connect if last failed attempt was too long ago
+ if ((System.currentTimeMillis() - checkTime) > RETRY_DURATION) {
+ this.offlineServerMap.remove(server);
+ return true;
+ }
+
+ // don't try and connect because we just tried and failed
+ return false;
+ }
+ } finally {
+ this.offlineServersLock.writeLock().unlock();
+ }
+ }
+
+ // OK to try and connect
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.jboss.tools.modeshape.rest.IServerRegistryListener#serverRegistryChanged(org.jboss.tools.modeshape.rest.ServerRegistryEvent)
+ */
+ @Override
+ public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
+ Exception[] errors = null;
+
+ // only care about servers being removed or updated
+ if (event.isRemove() || event.isUpdate()) {
+ try {
+ this.offlineServersLock.writeLock().lock();
+ this.offlineServerMap.remove(event.getServer());
+ } catch (Exception e) {
+ errors = new Exception[] {e};
+ } finally {
+ this.offlineServersLock.writeLock().unlock();
+ }
+ }
+
+ return errors;
+ }
+
+}
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeMessageConsole.java (from rev 19867, trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingMessageConsole.java)
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeMessageConsole.java (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeMessageConsole.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -0,0 +1,332 @@
+/*
+ * ModeShape (http://www.modeshape.org)
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership.
+ *
+ * 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.
+ *
+ * See the AUTHORS.txt file in the distribution for a full listing of
+ * individual contributors.
+ */
+package org.jboss.tools.modeshape.rest.views;
+
+import static org.jboss.tools.modeshape.rest.IUiConstants.ModeShape_IMAGE_16x;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.debug.ui.console.FileLink;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.console.AbstractConsole;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.jboss.tools.modeshape.rest.Activator;
+import org.jboss.tools.modeshape.rest.RestClientI18n;
+import org.modeshape.common.util.CheckArg;
+import org.modeshape.web.jcr.rest.client.Status;
+import org.modeshape.web.jcr.rest.client.Status.Severity;
+
+/**
+ * The <code>ModeShapeMessageConsole</code> is a message console view where status of publishing operations are logged. This class
+ * ensures all writes to the console are done in the UI thread.
+ */
+public final class ModeShapeMessageConsole extends MessageConsole {
+
+ // =======================================================================================================================
+ // Constants
+ // =======================================================================================================================
+
+ /**
+ * Start tag for adding emphasis to a message. Tag will appear in a properties file.
+ */
+ private static final String EMPHASIS_START_TAG = "<em>";
+
+ /**
+ * End tag for adding emphasis to a message. Tag will appear in a properties file.
+ */
+ private static final String EMPHASIS_END_TAG = "</em>";
+
+ /**
+ * The identifier and type of the Message Console.
+ */
+ private static final String ID = "org.jboss.tools.modeshape.rest.views.ModeShapeMessageConsole";
+
+ /**
+ * The message console name.
+ */
+ private static final String NAME = RestClientI18n.publishingConsoleName.text();
+
+ // =======================================================================================================================
+ // Class Methods
+ // =======================================================================================================================
+
+ /**
+ * Note: The <code>ModeShapeMessageConsole</code> should <strong>NOT</strong> be cached as the user can open/close/create instances.
+ *
+ * @return the Message Console if available or a new one (never <code>null</code>)
+ */
+ private static ModeShapeMessageConsole getMessageConsole() {
+ ModeShapeMessageConsole console = null;
+ IConsoleManager consoleMgr = ConsolePlugin.getDefault().getConsoleManager();
+ IConsole[] consoles = consoleMgr.getConsoles();
+
+ // see if console is open
+ for (int i = 0; i < consoles.length; ++i) {
+ if (NAME.equals(consoles[i].getName())) {
+ console = (ModeShapeMessageConsole)consoles[i];
+ break;
+ }
+ }
+
+ // create console if necessary
+ if (console == null) {
+ console = new ModeShapeMessageConsole();
+ consoleMgr.addConsoles(new IConsole[] {console});
+ }
+
+ return console;
+ }
+
+ /**
+ * Adds a line feed to the console after the message is printed.
+ *
+ * @param message the message being written to the console (never <code>null</code>)
+ */
+ public static void writeln( String message ) {
+ CheckArg.isNotNull(message, "message");
+ writeln(message, null);
+ }
+
+ /**
+ * Adds a line feed to the console after the message is printed.
+ *
+ * @param message the message being written to the console (never <code>null</code>)
+ * @param file the file whose full path, which is contained in the message, will be made into a hyperlink (may be
+ * <code>null</code>)
+ */
+ public static void writeln( String message,
+ IFile file ) {
+ CheckArg.isNotNull(message, "message");
+
+ ModeShapeMessageConsole console = getMessageConsole();
+ console.print(message, true, file);
+ }
+
+ // =======================================================================================================================
+ // Constructors
+ // =======================================================================================================================
+
+ /**
+ * Prevent construction.
+ */
+ private ModeShapeMessageConsole() {
+ super(NAME, Activator.getDefault().getImageDescriptor(ModeShape_IMAGE_16x));
+ }
+
+ // =======================================================================================================================
+ // Methods
+ // =======================================================================================================================
+
+ /**
+ * @param message the message being searched for
+ * @param file the file whose full path appears in the message and will become a hyperlink
+ */
+ void addDocumentListener( String message,
+ IFile file ) {
+ getDocument().addDocumentListener(new HyperlinkCreator(message, this, file));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.ui.console.AbstractConsole#getType()
+ */
+ @Override
+ public String getType() {
+ return ID;
+ }
+
+ /**
+ * @param message the message being written to the console (never <code>null</code>)
+ * @param doLineFeedAtEnd a flag indicating if a line feed should be done after writing the message
+ * @param file the file to create a hyperlink for (may be <code>null</code>)
+ */
+ private void print( final String message,
+ final boolean doLineFeedAtEnd,
+ final IFile file ) {
+ assert (message != null);
+ final Display display = Display.getDefault();
+ final AbstractConsole console = this;
+
+ if (!display.isDisposed()) {
+ display.asyncExec(new Runnable() {
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ if (!display.isDisposed()) {
+ // bring focus to this view
+ console.activate();
+
+ // register document listener before writing to console
+ if (file != null) {
+ addDocumentListener(message, file);
+ }
+
+ MessageConsoleStream stream = newMessageStream();
+
+ for (int beginIndex = 0, endIndex = 0, msgLength = message.length(); endIndex < msgLength;) {
+ int startTagIndex = message.indexOf(EMPHASIS_START_TAG, beginIndex);
+ int endTagIndex = ((startTagIndex < 0) ? -1 : message.indexOf(EMPHASIS_END_TAG,
+ startTagIndex
+ + EMPHASIS_START_TAG.length()));
+
+ // ignore tags if both tags are not found
+ if ((endTagIndex < 0) && (startTagIndex >= 0)) {
+ startTagIndex = -1;
+ }
+
+ // determine if in emphasize mode
+ boolean emphasize = (beginIndex == startTagIndex);
+
+ // skip over start tag and set stream to bold font style
+ if (emphasize) {
+ beginIndex += EMPHASIS_START_TAG.length();
+ stream.setFontStyle(SWT.BOLD);
+ endIndex = endTagIndex;
+ } else {
+ stream.setFontStyle(SWT.NORMAL);
+ endIndex = ((startTagIndex < 0) ? msgLength : startTagIndex);
+ }
+
+ // print to console
+ stream.print(message.substring(beginIndex, endIndex));
+
+ // need to construct a new stream as changes to font style seem to only work one time
+ stream = newMessageStream();
+
+ // skip over end tag
+ if (emphasize) {
+ endIndex += EMPHASIS_END_TAG.length();
+ }
+
+ beginIndex = endIndex;
+ }
+
+ if (doLineFeedAtEnd) {
+ stream.println();
+ }
+ }
+ }
+ });
+ }
+ }
+
+ // ===========================================================================================================================
+ // Inner Class
+ // ===========================================================================================================================
+
+ /**
+ * The <code>HyperlinkCreator</code> creates a hyperlink in a Message Console for the first occurrence of the full path of
+ * a specified file.
+ */
+ class HyperlinkCreator implements IDocumentListener {
+
+ // =======================================================================================================================
+ // Fields
+ // =======================================================================================================================
+
+ /**
+ * The console where the message is printed to and the hyperlink will be created.
+ */
+ private final ModeShapeMessageConsole console;
+
+ /**
+ * The file whose full path will become a hyperlink.
+ */
+ private final IFile file;
+
+ /**
+ * The message where the file path is located in.
+ */
+ private final String message;
+
+ // =======================================================================================================================
+ // Constructors
+ // =======================================================================================================================
+
+ /**
+ * @param message the message that contains the full path of the file
+ * @param console the console where the message appears
+ * @param file the file whose full path appears in the message and will become a hyperlink
+ */
+ public HyperlinkCreator( String message,
+ ModeShapeMessageConsole console,
+ IFile file ) {
+ this.message = message.replaceAll("<em>", "").replaceAll("\\Q</em>\\E", "");
+ this.console = console;
+ this.file = file;
+ }
+
+ // =======================================================================================================================
+ // Methods
+ // =======================================================================================================================
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
+ public void documentAboutToBeChanged( DocumentEvent arg0 ) {
+ // nothing to do
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+ */
+ @Override
+ public void documentChanged( DocumentEvent event ) {
+ IDocument document = event.getDocument();
+
+ try {
+ FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(document);
+ IRegion region = finder.find(document.getLength() - 1, this.message, false, true, false, false);
+
+ if (region != null) {
+ String target = this.file.getFullPath().toString();
+ int index = this.message.indexOf(target);
+
+ if (index == -1) {
+ throw new BadLocationException(RestClientI18n.publishingConsoleFilePathNotFoundMsg.text(target));
+ }
+
+ this.console.addHyperlink(new FileLink(file, null, -1, -1, -1), (region.getOffset() + index), target.length());
+
+ // created hyperlink so no need to listen any longer
+ document.removeDocumentListener(this);
+ }
+ } catch (BadLocationException e) {
+ Activator.getDefault().log(new Status(Severity.ERROR,
+ RestClientI18n.publishingConsoleProblemCreatingHyperlinkMsg.text(), e));
+ document.removeDocumentListener(this);
+ }
+ }
+ }
+
+}
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ModeShapeMessageConsole.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingContentProvider.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingContentProvider.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingContentProvider.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -1,415 +0,0 @@
-/*
- * ModeShape (http://www.modeshape.org)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.
- *
- * 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.
- *
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- */
-package org.jboss.tools.modeshape.rest.views;
-
-import static org.jboss.tools.modeshape.rest.IUiConstants.PUBLISHED_OVERLAY_IMAGE;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import net.jcip.annotations.GuardedBy;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.jface.viewers.ILightweightLabelDecorator;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IDecoratorManager;
-import org.jboss.tools.modeshape.rest.Activator;
-import org.jboss.tools.modeshape.rest.IServerRegistryListener;
-import org.jboss.tools.modeshape.rest.PublishedResourceHelper;
-import org.jboss.tools.modeshape.rest.RestClientI18n;
-import org.jboss.tools.modeshape.rest.ServerManager;
-import org.jboss.tools.modeshape.rest.ServerRegistryEvent;
-import org.jboss.tools.modeshape.rest.Utils;
-import org.modeshape.web.jcr.rest.client.Status;
-import org.modeshape.web.jcr.rest.client.Status.Severity;
-import org.modeshape.web.jcr.rest.client.domain.IModeShapeObject;
-import org.modeshape.web.jcr.rest.client.domain.Repository;
-import org.modeshape.web.jcr.rest.client.domain.Server;
-import org.modeshape.web.jcr.rest.client.domain.Workspace;
-
-/**
- * The <code>PublishingContentProvider</code> is a content and label provider for the repositories. This class
- * <strong>MUST</strong> be registered, and then unregistered, to receive server registry events.
- */
-public final class PublishingContentProvider extends ColumnLabelProvider
- implements ILightweightLabelDecorator, IServerRegistryListener, ITreeContentProvider {
-
- // ===========================================================================================================================
- // Constants
- // ===========================================================================================================================
-
- /**
- * The decorator ID.
- */
- private static final String ID = "org.jboss.tools.modeshape.rest.decorator";
-
- /**
- * If a server connection cannot be established, wait this amount of time before trying again.
- */
- private static final long RETRY_DURATION = 2000;
-
- // ===========================================================================================================================
- // Class Methods
- // ===========================================================================================================================
-
- /**
- * @return the decorator
- */
- public static PublishingContentProvider getDecorator() {
- IDecoratorManager decoratorMgr = Activator.getDefault().getWorkbench().getDecoratorManager();
-
- if (decoratorMgr.getEnabled(ID)) {
- return (PublishingContentProvider)decoratorMgr.getBaseLabelProvider(ID);
- }
-
- return null;
- }
-
- // ===========================================================================================================================
- // Fields
- // ===========================================================================================================================
-
- /**
- * Servers that a connection can't be established. Value is the last time a establishing a connection was tried.
- */
- @GuardedBy( "offlineServersLock" )
- private final Map<Server, Long> offlineServerMap = new HashMap<Server, Long>();
-
- /**
- * Lock used for when accessing the offline server map. The map will be accessed in different threads as the decorator runs in
- * its own thread (not the UI thread).
- */
- private final ReadWriteLock offlineServersLock = new ReentrantReadWriteLock();
-
- /**
- * The server manager where the server registry is managed.
- */
- private ServerManager serverManager;
-
- // ===========================================================================================================================
- // Methods
- // ===========================================================================================================================
-
- /**
- * @param server the server that is offline
- */
- private void addOfflineServer( Server server ) {
- try {
- this.offlineServersLock.writeLock().lock();
- this.offlineServerMap.put(server, System.currentTimeMillis());
- } finally {
- this.offlineServersLock.writeLock().unlock();
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object, org.eclipse.jface.viewers.IDecoration)
- */
- @Override
- public void decorate( final Object element,
- IDecoration decoration ) {
- ImageDescriptor overlay = null;
- final Display display = Display.getDefault();
-
- if (display.isDisposed()) {
- return;
- }
-
- if (getServerManager() != null) {
- if (element instanceof Server) {
- Server server = (Server)element;
-
- if (isOkToConnect(server)) {
- Status status = getServerManager().ping(server);
- overlay = Utils.getOverlayImage(status);
-
- if (status.isError()) {
- addOfflineServer(server);
- }
- }
- } else if ((element instanceof IFile) && new PublishedResourceHelper(getServerManager()).isPublished((IFile)element)) {
- overlay = Activator.getDefault().getImageDescriptor(PUBLISHED_OVERLAY_IMAGE);
- }
-
- if (overlay != null) {
- decoration.addOverlay(overlay);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- // nothing to do
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Object[] getChildren( Object parentElement ) {
- assert (parentElement instanceof IModeShapeObject);
-
- if (getServerManager() != null) {
- if (parentElement instanceof Server) {
- Server server = (Server)parentElement;
-
- if (isOkToConnect(server)) {
- try {
- return getServerManager().getRepositories(server).toArray();
- } catch (Exception e) {
- addOfflineServer(server);
- String msg = RestClientI18n.serverManagerGetRepositoriesExceptionMsg.text(server.getShortDescription());
- Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
- }
- }
- } else if (parentElement instanceof Repository) {
- Repository repository = (Repository)parentElement;
-
- if (isOkToConnect(repository.getServer())) {
- try {
- return getServerManager().getWorkspaces(repository).toArray();
- } catch (Exception e) {
- addOfflineServer(repository.getServer());
- String msg = RestClientI18n.serverManagerGetWorkspacesExceptionMsg.text(repository.getShortDescription());
- Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
- }
- }
- }
- }
-
- return new Object[0];
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- @Override
- public Object[] getElements( Object inputElement ) {
- return ((getServerManager() == null) ? new Object[0] : getServerManager().getServers().toArray());
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage( Object element ) {
- return Activator.getDefault().getImage(element);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent( Object element ) {
- assert (element instanceof IModeShapeObject);
-
- if (element instanceof Workspace) {
- return ((Workspace)element).getRepository();
- }
-
- if (element instanceof Repository) {
- return ((Repository)element).getServer();
- }
-
- // server
- return null;
- }
-
- /**
- * @return the server manager (never <code>null</code>)
- */
- private ServerManager getServerManager() {
- if (this.serverManager == null) {
- this.serverManager = Activator.getDefault().getServerManager();
- }
-
- return this.serverManager;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText( Object element ) {
- assert (element instanceof IModeShapeObject);
- return ((IModeShapeObject)element).getName();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipImage(java.lang.Object)
- */
- @Override
- public Image getToolTipImage( Object object ) {
- return getImage(object);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipText(java.lang.Object)
- */
- @Override
- public String getToolTipText( Object element ) {
- if (element instanceof IModeShapeObject) {
- return ((IModeShapeObject)element).getShortDescription();
- }
-
- return super.getToolTipText(element);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.CellLabelProvider#getToolTipTimeDisplayed(java.lang.Object)
- */
- @Override
- public int getToolTipTimeDisplayed( Object object ) {
- return 3000;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren( Object element ) {
- return getChildren(element).length > 0;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object,
- * java.lang.Object)
- */
- @Override
- public void inputChanged( Viewer viewer,
- Object oldInput,
- Object newInput ) {
- // nothing to do
- }
-
- public void refresh( final Object element ) {
- final Display display = Display.getDefault();
-
- if (display.isDisposed()) {
- return;
- }
-
- display.asyncExec(new Runnable() {
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Runnable#run()
- */
- @SuppressWarnings( "synthetic-access" )
- @Override
- public void run() {
- fireLabelProviderChanged(new LabelProviderChangedEvent(PublishingContentProvider.this, element));
- }
- });
- }
-
- /**
- * Determines if a try to connect to a server should be done based on the last time a try was done and failed.
- *
- * @param server the server being checked
- * @return <code>true</code> if it is OK to try and connect
- */
- private boolean isOkToConnect( Server server ) {
- boolean check = false; // check map for time
-
- try {
- this.offlineServersLock.readLock().lock();
- check = this.offlineServerMap.containsKey(server);
- } finally {
- this.offlineServersLock.readLock().unlock();
- }
-
- if (check) {
- try {
- this.offlineServersLock.writeLock().lock();
-
- if (this.offlineServerMap.containsKey(server)) {
- long checkTime = this.offlineServerMap.get(server);
-
- // OK to try and connect if last failed attempt was too long ago
- if ((System.currentTimeMillis() - checkTime) > RETRY_DURATION) {
- this.offlineServerMap.remove(server);
- return true;
- }
-
- // don't try and connect because we just tried and failed
- return false;
- }
- } finally {
- this.offlineServersLock.writeLock().unlock();
- }
- }
-
- // OK to try and connect
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.jboss.tools.modeshape.rest.IServerRegistryListener#serverRegistryChanged(org.jboss.tools.modeshape.rest.ServerRegistryEvent)
- */
- @Override
- public Exception[] serverRegistryChanged( ServerRegistryEvent event ) {
- Exception[] errors = null;
-
- // only care about servers being removed or updated
- if (event.isRemove() || event.isUpdate()) {
- try {
- this.offlineServersLock.writeLock().lock();
- this.offlineServerMap.remove(event.getServer());
- } catch (Exception e) {
- errors = new Exception[] {e};
- } finally {
- this.offlineServersLock.writeLock().unlock();
- }
- }
-
- return errors;
- }
-
-}
Deleted: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingMessageConsole.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingMessageConsole.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/PublishingMessageConsole.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -1,332 +0,0 @@
-/*
- * ModeShape (http://www.modeshape.org)
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership.
- *
- * 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.
- *
- * See the AUTHORS.txt file in the distribution for a full listing of
- * individual contributors.
- */
-package org.jboss.tools.modeshape.rest.views;
-
-import static org.jboss.tools.modeshape.rest.IUiConstants.ModeShape_IMAGE_16x;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.debug.ui.console.FileLink;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.FindReplaceDocumentAdapter;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.console.AbstractConsole;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleManager;
-import org.eclipse.ui.console.MessageConsole;
-import org.eclipse.ui.console.MessageConsoleStream;
-import org.jboss.tools.modeshape.rest.Activator;
-import org.jboss.tools.modeshape.rest.RestClientI18n;
-import org.modeshape.common.util.CheckArg;
-import org.modeshape.web.jcr.rest.client.Status;
-import org.modeshape.web.jcr.rest.client.Status.Severity;
-
-/**
- * The <code>PublishingMessageConsole</code> is a message console view where status of publishing operations are logged. This class
- * ensures all writes to the console are done in the UI thread.
- */
-public final class PublishingMessageConsole extends MessageConsole {
-
- // =======================================================================================================================
- // Constants
- // =======================================================================================================================
-
- /**
- * Start tag for adding emphasis to a message. Tag will appear in a properties file.
- */
- private static final String EMPHASIS_START_TAG = "<em>";
-
- /**
- * End tag for adding emphasis to a message. Tag will appear in a properties file.
- */
- private static final String EMPHASIS_END_TAG = "</em>";
-
- /**
- * The identifier and type of the Message Console.
- */
- private static final String ID = "org.jboss.tools.modeshape.rest.views.PublishingMessageConsole";
-
- /**
- * The message console name.
- */
- private static final String NAME = RestClientI18n.publishingConsoleName.text();
-
- // =======================================================================================================================
- // Class Methods
- // =======================================================================================================================
-
- /**
- * Note: The <code>PublishingMessageConsole</code> should <strong>NOT</strong> be cached as the user can open/close/create instances.
- *
- * @return the Message Console if available or a new one (never <code>null</code>)
- */
- private static PublishingMessageConsole getMessageConsole() {
- PublishingMessageConsole console = null;
- IConsoleManager consoleMgr = ConsolePlugin.getDefault().getConsoleManager();
- IConsole[] consoles = consoleMgr.getConsoles();
-
- // see if console is open
- for (int i = 0; i < consoles.length; ++i) {
- if (NAME.equals(consoles[i].getName())) {
- console = (PublishingMessageConsole)consoles[i];
- break;
- }
- }
-
- // create console if necessary
- if (console == null) {
- console = new PublishingMessageConsole();
- consoleMgr.addConsoles(new IConsole[] {console});
- }
-
- return console;
- }
-
- /**
- * Adds a line feed to the console after the message is printed.
- *
- * @param message the message being written to the console (never <code>null</code>)
- */
- public static void writeln( String message ) {
- CheckArg.isNotNull(message, "message");
- writeln(message, null);
- }
-
- /**
- * Adds a line feed to the console after the message is printed.
- *
- * @param message the message being written to the console (never <code>null</code>)
- * @param file the file whose full path, which is contained in the message, will be made into a hyperlink (may be
- * <code>null</code>)
- */
- public static void writeln( String message,
- IFile file ) {
- CheckArg.isNotNull(message, "message");
-
- PublishingMessageConsole console = getMessageConsole();
- console.print(message, true, file);
- }
-
- // =======================================================================================================================
- // Constructors
- // =======================================================================================================================
-
- /**
- * Prevent construction.
- */
- private PublishingMessageConsole() {
- super(NAME, Activator.getDefault().getImageDescriptor(ModeShape_IMAGE_16x));
- }
-
- // =======================================================================================================================
- // Methods
- // =======================================================================================================================
-
- /**
- * @param message the message being searched for
- * @param file the file whose full path appears in the message and will become a hyperlink
- */
- void addDocumentListener( String message,
- IFile file ) {
- getDocument().addDocumentListener(new HyperlinkCreator(message, this, file));
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.console.AbstractConsole#getType()
- */
- @Override
- public String getType() {
- return ID;
- }
-
- /**
- * @param message the message being written to the console (never <code>null</code>)
- * @param doLineFeedAtEnd a flag indicating if a line feed should be done after writing the message
- * @param file the file to create a hyperlink for (may be <code>null</code>)
- */
- private void print( final String message,
- final boolean doLineFeedAtEnd,
- final IFile file ) {
- assert (message != null);
- final Display display = Display.getDefault();
- final AbstractConsole console = this;
-
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Runnable#run()
- */
- @Override
- public void run() {
- if (!display.isDisposed()) {
- // bring focus to this view
- console.activate();
-
- // register document listener before writing to console
- if (file != null) {
- addDocumentListener(message, file);
- }
-
- MessageConsoleStream stream = newMessageStream();
-
- for (int beginIndex = 0, endIndex = 0, msgLength = message.length(); endIndex < msgLength;) {
- int startTagIndex = message.indexOf(EMPHASIS_START_TAG, beginIndex);
- int endTagIndex = ((startTagIndex < 0) ? -1 : message.indexOf(EMPHASIS_END_TAG,
- startTagIndex
- + EMPHASIS_START_TAG.length()));
-
- // ignore tags if both tags are not found
- if ((endTagIndex < 0) && (startTagIndex >= 0)) {
- startTagIndex = -1;
- }
-
- // determine if in emphasize mode
- boolean emphasize = (beginIndex == startTagIndex);
-
- // skip over start tag and set stream to bold font style
- if (emphasize) {
- beginIndex += EMPHASIS_START_TAG.length();
- stream.setFontStyle(SWT.BOLD);
- endIndex = endTagIndex;
- } else {
- stream.setFontStyle(SWT.NORMAL);
- endIndex = ((startTagIndex < 0) ? msgLength : startTagIndex);
- }
-
- // print to console
- stream.print(message.substring(beginIndex, endIndex));
-
- // need to construct a new stream as changes to font style seem to only work one time
- stream = newMessageStream();
-
- // skip over end tag
- if (emphasize) {
- endIndex += EMPHASIS_END_TAG.length();
- }
-
- beginIndex = endIndex;
- }
-
- if (doLineFeedAtEnd) {
- stream.println();
- }
- }
- }
- });
- }
- }
-
- // ===========================================================================================================================
- // Inner Class
- // ===========================================================================================================================
-
- /**
- * The <code>HyperlinkCreator</code> creates a hyperlink in a Message Console for the first occurrence of the full path of
- * a specified file.
- */
- class HyperlinkCreator implements IDocumentListener {
-
- // =======================================================================================================================
- // Fields
- // =======================================================================================================================
-
- /**
- * The console where the message is printed to and the hyperlink will be created.
- */
- private final PublishingMessageConsole console;
-
- /**
- * The file whose full path will become a hyperlink.
- */
- private final IFile file;
-
- /**
- * The message where the file path is located in.
- */
- private final String message;
-
- // =======================================================================================================================
- // Constructors
- // =======================================================================================================================
-
- /**
- * @param message the message that contains the full path of the file
- * @param console the console where the message appears
- * @param file the file whose full path appears in the message and will become a hyperlink
- */
- public HyperlinkCreator( String message,
- PublishingMessageConsole console,
- IFile file ) {
- this.message = message.replaceAll("<em>", "").replaceAll("\\Q</em>\\E", "");
- this.console = console;
- this.file = file;
- }
-
- // =======================================================================================================================
- // Methods
- // =======================================================================================================================
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
- public void documentAboutToBeChanged( DocumentEvent arg0 ) {
- // nothing to do
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- @Override
- public void documentChanged( DocumentEvent event ) {
- IDocument document = event.getDocument();
-
- try {
- FindReplaceDocumentAdapter finder = new FindReplaceDocumentAdapter(document);
- IRegion region = finder.find(document.getLength() - 1, this.message, false, true, false, false);
-
- if (region != null) {
- String target = this.file.getFullPath().toString();
- int index = this.message.indexOf(target);
-
- if (index == -1) {
- throw new BadLocationException(RestClientI18n.publishingConsoleFilePathNotFoundMsg.text(target));
- }
-
- this.console.addHyperlink(new FileLink(file, null, -1, -1, -1), (region.getOffset() + index), target.length());
-
- // created hyperlink so no need to listen any longer
- document.removeDocumentListener(this);
- }
- } catch (BadLocationException e) {
- Activator.getDefault().log(new Status(Severity.ERROR,
- RestClientI18n.publishingConsoleProblemCreatingHyperlinkMsg.text(), e));
- document.removeDocumentListener(this);
- }
- }
- }
-
-}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-01-22 18:51:55 UTC (rev 19892)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-01-22 20:40:59 UTC (rev 19893)
@@ -82,7 +82,7 @@
/**
* The viewer's content and label provider.
*/
- private PublishingContentProvider provider;
+ private ModeShapeContentProvider provider;
/**
* Refreshes the server connections.
@@ -156,7 +156,7 @@
* @param parent the viewer's parent
*/
private void constructTreeViewer( Composite parent ) {
- this.provider = new PublishingContentProvider();
+ this.provider = new ModeShapeContentProvider();
this.viewer = new TreeViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
this.viewer.setContentProvider(this.provider);
15 years, 11 months
JBoss Tools SVN: r19892 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-01-22 13:51:55 -0500 (Fri, 22 Jan 2010)
New Revision: 19892
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
Log:
JBIDE-3290: sorting/filtering is not updating correctly in code completion of source page in VPE
The proposal replacement text calculation is fixed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2010-01-22 17:46:11 UTC (rev 19891)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2010-01-22 18:51:55 UTC (rev 19892)
@@ -545,7 +545,6 @@
}
String regionType = completionRegion.getType();
-// IStructuredDocumentRegion sdRegion = getStructuredDocumentRegion(documentPosition);
/*
* Jeremy: Add attribute name proposals before empty tag close
@@ -1002,14 +1001,25 @@
* @return
*/
protected TextRegion getELPredicatePrefix(ContentAssistRequest request) {
- if (!DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE.equals(request.getRegion().getType()) &&
- !DOMRegionContext.XML_CONTENT.equals(request.getRegion().getType()) &&
- !DOMRegionContext.BLOCK_TEXT.equals(request.getRegion().getType()))
+ if (request == null || request.getRegion() == null)
return null;
+
+ IStructuredDocumentRegion documentRegion = request.getDocumentRegion();
+ ITextRegion completionRegion = request.getRegion();
+ String regionType = completionRegion.getType();
- String text = request.getDocumentRegion().getFullText(request.getRegion());
- int startOffset = request.getDocumentRegion().getStartOffset() + request.getRegion().getStart();
-
+ if (DOMRegionContext.XML_END_TAG_OPEN.equals(regionType) || DOMRegionContext.XML_TAG_OPEN.equals(regionType)) {
+ documentRegion = documentRegion.getPrevious();
+ completionRegion = getCompletionRegion(request.getDocumentRegion().getStartOffset() + request.getRegion().getStart() - 1, request.getParent());
+ }
+ if (!DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE.equals(completionRegion.getType()) &&
+ !DOMRegionContext.XML_CONTENT.equals(completionRegion.getType()) &&
+ !DOMRegionContext.BLOCK_TEXT.equals(completionRegion.getType())) {
+ return null;
+ }
+ String text = documentRegion.getFullText(completionRegion);
+ int startOffset = documentRegion.getStartOffset() + completionRegion.getStart();
+
boolean isAttributeValue = false;
boolean hasOpenQuote = false;
boolean hasCloseQuote = false;
@@ -1174,7 +1184,7 @@
this(startOffset, offset, length, text, isELStarted, isELClosed, false, false, false, (char)0);
}
- TextRegion(int startOffset, int offset, int length, String text, boolean isELStarted, boolean isELClosed,
+ public TextRegion(int startOffset, int offset, int length, String text, boolean isELStarted, boolean isELClosed,
boolean isAttributeValue, boolean hasOpenQuote, boolean hasCloseQuote, char quoteChar) {
this.startOffset = startOffset;
this.offset = offset;
15 years, 11 months
JBoss Tools SVN: r19891 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-01-22 12:46:11 -0500 (Fri, 22 Jan 2010)
New Revision: 19891
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2010-01-22 17:42:26 UTC (rev 19890)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2010-01-22 17:46:11 UTC (rev 19891)
@@ -38,8 +38,6 @@
protected void doHyperlink(IRegion region) {
IEditorPart part = null;
-
-
if(bean != null && bean.getBeanClass() != null){
try{
part = JavaUI.openInEditor(bean.getBeanClass());
@@ -58,9 +56,10 @@
@Override
public String getHyperlinkText() {
+ String text = "Open Bean ";
if(bean != null)
- return bean.getName();
- return null;
+ text += bean.getBeanClass().getElementName();
+ return text;
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-01-22 17:42:26 UTC (rev 19890)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-01-22 17:46:11 UTC (rev 19891)
@@ -11,9 +11,9 @@
package org.jboss.tools.cdi.text.ext.hyperlink;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.TreeSet;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -37,7 +37,6 @@
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IInjectionPointField;
import org.jboss.tools.cdi.core.IInjectionPointMethod;
@@ -77,7 +76,7 @@
if(file == null)
return null;
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), false);
+ CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
if(cdiNature == null)
return null;
@@ -89,8 +88,6 @@
Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
- System.out.println("beans - "+beans.size());
-
int[] range = new int[]{wordRegion.getOffset(), wordRegion.getOffset() + wordRegion.getLength()};
IJavaElement[] elements = null;
@@ -100,13 +97,9 @@
if (elements == null)
return null;
- System.out.println("elements - "+elements.length);
-
ArrayList<IHyperlink> hyperlinks = new ArrayList<IHyperlink>();
for (IJavaElement element : elements) {
if (element instanceof IAnnotatable) {
- System.out.println("element - "+element.getElementName());
-
IAnnotatable annotatable = (IAnnotatable)element;
IAnnotation annotation = annotatable.getAnnotation("Injected");
@@ -117,7 +110,8 @@
Set<IBean> resultBeanSet = cdiProject.getBeans(injectionPoint);
List<IBean> resultBeanList = sortBeans(resultBeanSet);
for(IBean bean : resultBeanList){
- hyperlinks.add(new InjectedPointHyperlink(wordRegion, bean));
+ if(bean != null)
+ hyperlinks.add(new InjectedPointHyperlink(wordRegion, bean));
}
}
}
@@ -136,17 +130,15 @@
return null;
for(IBean bean : beans){
- if(bean instanceof IClassBean){
- Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
- for(IInjectionPoint iPoint : injectionPoints){
- if(element instanceof IField && iPoint instanceof IInjectionPointField){
- if(((IInjectionPointField)iPoint).getField() != null && ((IInjectionPointField)iPoint).getField().equals(element))
- return iPoint;
- }else if(element instanceof IMethod && iPoint instanceof IInjectionPointMethod){
- if(((IInjectionPointMethod)iPoint).getMethod() != null && ((IInjectionPointMethod)iPoint).getMethod().equals(element))
- return iPoint;
-
- }
+ Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
+ for(IInjectionPoint iPoint : injectionPoints){
+ if(element instanceof IField && iPoint instanceof IInjectionPointField){
+ if(((IInjectionPointField)iPoint).getField() != null && ((IInjectionPointField)iPoint).getField().equals(element))
+ return iPoint;
+ }else if(element instanceof IMethod && iPoint instanceof IInjectionPointMethod){
+ if(((IInjectionPointMethod)iPoint).getMethod() != null && ((IInjectionPointMethod)iPoint).getMethod().equals(element))
+ return iPoint;
+
}
}
}
@@ -154,8 +146,8 @@
}
private List<IBean> sortBeans(Set<IBean> beans){
- TreeSet<IBean> alternativeBeans = new TreeSet<IBean>();
- TreeSet<IBean> nonAlternativeBeans = new TreeSet<IBean>();
+ Set<IBean> alternativeBeans = new HashSet<IBean>();
+ Set<IBean> nonAlternativeBeans = new HashSet<IBean>();
for(IBean bean : beans){
if(bean.isAlternative())
15 years, 11 months
JBoss Tools SVN: r19890 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl: definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-01-22 12:42:26 -0500 (Fri, 22 Jan 2010)
New Revision: 19890
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-01-22 16:59:41 UTC (rev 19889)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2010-01-22 17:42:26 UTC (rev 19890)
@@ -229,8 +229,27 @@
public Set<IParametedType> getLegalTypes() {
Set<IParametedType> result = new HashSet<IParametedType>();
AnnotationDeclaration d = getDefinition().getTypedAnnotation();
+ IType type = getDefinition().getType();
+ if(type != null) {
+ ParametedType p = new ParametedType();
+ p.setType(type);
+ String[] ps = null;
+ try {
+ ps = type.getTypeParameterSignatures();
+ p.setSignature(type.getFullyQualifiedName());
+ } catch (CoreException e) {
+ //TODO
+ }
+ if(ps == null || ps.length == 0) {
+ //type with parameters is not legal
+ result.add(p);
+ }
+ }
+ Set<IParametedType> inh = getDefinition().getAllInheritedTypes();
+ if(inh != null) result.addAll(inh);
if(d != null) {
try {
+ Set<IParametedType> reducedResult = new HashSet<IParametedType>();
IMemberValuePair[] ps = d.getDeclaration().getMemberValuePairs();
if(ps != null) for (IMemberValuePair p: ps) {
Object o = p.getValue();
@@ -240,29 +259,17 @@
String s = os[i].toString();
if(!s.endsWith(";")) s = "Q" + s + ";";
IParametedType t = ParametedTypeFactory.getParametedType(getDefinition().getType(), s);
- result.add(t);
+ if(CDIProject.containsType(result, t)) {
+ reducedResult.add(t);
+ }
}
}
}
+ result = reducedResult;
} catch (CoreException e) {
//TODO
}
}
- IType type = getDefinition().getType();
- if(type != null) {
- ParametedType p = new ParametedType();
- p.setType(type);
- try {
- String[] ps = type.getTypeParameterSignatures();
- //TODO set parameters
- p.setSignature(type.getFullyQualifiedName());
- } catch (CoreException e) {
- //TODO
- }
- result.add(p);
- }
- Set<IParametedType> inh = getDefinition().getInheritedTypes();
- if(inh != null) result.addAll(inh);
return result;
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-01-22 16:59:41 UTC (rev 19889)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2010-01-22 17:42:26 UTC (rev 19890)
@@ -30,6 +30,7 @@
protected IType type;
protected ParametedType superType = null;
protected Set<IParametedType> inheritedTypes = new HashSet<IParametedType>();
+ protected Set<IParametedType> allInheritedTypes = new HashSet<IParametedType>();
public AbstractTypeDefinition() {}
@@ -60,10 +61,36 @@
ParametedType t = ParametedTypeFactory.getParametedType(type, is[i]);
if(t != null) inheritedTypes.add(t);
}
+ buildAllInheritedTypes(new HashSet<String>(), inheritedTypes);
}
+ void buildAllInheritedTypes(Set<String> processed, Set<IParametedType> addition) throws CoreException {
+ for (IParametedType p: addition) {
+ IType t = p.getType();
+ if(t == null) continue;
+ if(processed.contains(t.getFullyQualifiedName())) continue;
+ allInheritedTypes.add(p);
+ Set<IParametedType> add = new HashSet<IParametedType>();
+ if(!t.isInterface() && !t.isAnnotation()) {
+ String sc = t.getSuperclassTypeSignature();
+ IParametedType st = ParametedTypeFactory.getParametedType(t, sc);
+ if(st != null) add.add(st);
+ }
+ String[] is = t.getSuperInterfaceTypeSignatures();
+ if(is != null) for (int i = 0; i < is.length; i++) {
+ ParametedType t1 = ParametedTypeFactory.getParametedType(t, is[i]);
+ if(t1 != null) add.add(t1);
+ }
+ buildAllInheritedTypes(processed, add);
+ }
+ }
+
public Set<IParametedType> getInheritedTypes() {
return inheritedTypes;
}
+ public Set<IParametedType> getAllInheritedTypes() {
+ return allInheritedTypes;
+ }
+
}
15 years, 11 months