JBoss Tools SVN: r11680 - trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-11-11 11:14:33 -0500 (Tue, 11 Nov 2008)
New Revision: 11680
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3167
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-11-11 16:12:11 UTC (rev 11679)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/edit/LinkEditPart.java 2008-11-11 16:14:33 UTC (rev 11680)
@@ -12,6 +12,7 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.util.Properties;
import org.eclipse.draw2d.Connection;
import org.eclipse.draw2d.FreeformViewport;
@@ -37,6 +38,8 @@
import org.jboss.tools.common.gef.edit.GEFRootEditPart;
import org.jboss.tools.common.gef.figures.GEFLabel;
import org.jboss.tools.common.gef.figures.xpl.CustomLocator;
+import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor;
import org.jboss.tools.seam.ui.pages.editor.PagesEditor.ModelSelectionProvider;
import org.jboss.tools.seam.ui.pages.editor.ecore.pages.Link;
@@ -235,6 +238,8 @@
FreeformViewport vp = diagram.getFreeformViewport();
((ModelSelectionProvider)editor.getModelSelectionProvider()).scroll(vp, part.getNodeFigure());
+ }else{
+ XActionInvoker.invoke("Properties/Properties", (XModelObject)getLink().getData(), new Properties());
}
}
}
17 years, 5 months
JBoss Tools SVN: r11679 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-11-11 11:12:11 -0500 (Tue, 11 Nov 2008)
New Revision: 11679
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077 Commented menu action.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-11-11 15:46:29 UTC (rev 11678)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2008-11-11 16:12:11 UTC (rev 11679)
@@ -573,8 +573,14 @@
id="org.jboss.tools.seam.ui.search.SeamQueryParticipant" />
</extension>
+ <extension point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.jboss.tools.seam.ui.marker.MarkerResolutionGenerator"
+ markerType="org.jboss.tools.seam.core.seamProjectProblem"/>
+ </extension>
+
<!-- Refactorng -->
- <extension
+ <!--extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#CompilationUnitEditorContext?after=org.eclipse.jdt.ui.refactoring.menu">
@@ -606,12 +612,6 @@
<handler
commandId="org.jboss.tools.seam.ui.refactoring.component"
class="org.jboss.tools.seam.ui.refactoring.SeamComponentRenameHandler"/>
- </extension>
-
- <extension point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- class="org.jboss.tools.seam.ui.marker.MarkerResolutionGenerator"
- markerType="org.jboss.tools.seam.core.seamProjectProblem"/>
- </extension>
+ </extension-->
</plugin>
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r11678 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: outline/cssdialog and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: izhukov
Date: 2008-11-11 10:46:29 -0500 (Tue, 11 Nov 2008)
New Revision: 11678
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBackgroundControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBoxesControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPropertySheetControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabTextControl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3151 fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/messages/messages.properties 2008-11-11 15:46:29 UTC (rev 11678)
@@ -4,8 +4,8 @@
CSS_STYLE_CLASS_DIALOG_TITLE=CSS Style Class Dialog
-CSS_CLASS_DIALOG_FILE_LABEL=CSS file :
-CSS_CLASS_DIALOG_STYLE_CLASS_LABEL=Style class :
+CSS_CLASS_DIALOG_FILE_LABEL=CSS file:
+CSS_CLASS_DIALOG_STYLE_CLASS_LABEL=Style class:
CSS_BROWSE_BUTTON_TOOLTIP=Browse
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -194,6 +194,7 @@
gridData.horizontalSpan = 2;
classCombo = new Combo(classComposite, SWT.BORDER);
classCombo.setLayoutData(gridData);
+
classCombo.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -52,10 +52,12 @@
private static String NODE_NAME_VALUE = "value";
private static String NODE_NAME_ELEMENT = "element";
private static String NODE_ATTRIBUTE_NAME = "name";
+
private static int TAB_TEXT_FONT_NUMBER = 0;
private static int TAB_QUICK_EDIT_NUMBER = 4;
private static int FIRST_SELECTION = 0;
private static int SIZE_NULL = 0;
+
private String newStyle;
private String oldStyle;
private TabTextControl tabTextControl;
@@ -131,7 +133,6 @@
tabTextControl = new TabTextControl(sc, comboMap, styleAttributes);
sc.setContent(tabTextControl);
-
sc.setMinSize(tabTextControl.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return sc;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBackgroundControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBackgroundControl.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBackgroundControl.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -10,11 +10,15 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.outline.cssdialog.tabs;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-
import org.eclipse.jface.resource.ImageDescriptor;
-
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -31,10 +35,8 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
-
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.outline.cssdialog.ImageSelectionDialog;
@@ -45,13 +47,7 @@
import org.jboss.tools.jst.jsp.outline.cssdialog.events.StyleAttributes;
import org.jboss.tools.jst.jsp.outline.cssdialog.parsers.ColorParser;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
/**
* Class for creating control in Background tab
*
@@ -67,6 +63,12 @@
//TODO Dzmitry Sakovich
//private CSSDialog cssDialog;
+
+ /**
+ * Constructor for creating controls
+ *
+ * @param composite Composite element
+ */
public TabBackgroundControl(final Composite composite, HashMap<String, ArrayList<String>> comboMap,
final StyleAttributes styleAttributes) {
super(composite, SWT.NONE);
@@ -78,6 +80,9 @@
gridLayout.numColumns = numColumns;
setLayout(gridLayout);
+ // =====================================================================================
+ // Add BACKGROUND_COLOR element
+ // =====================================================================================
Label label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.BACKGROUND_COLOR);
@@ -85,14 +90,6 @@
colorCombo = new ImageCombo(this, SWT.BORDER);
colorCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- // ////////////////////////////////////////////////////////////////////////
- Set<Entry<String, String>> set = ColorParser.getInstance().getMap().entrySet();
-
- for (Map.Entry<String, String> me : set) {
- RGB rgb = Util.getColor(me.getKey());
- colorCombo.add(me.getValue(), rgb);
- }
-
colorCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = colorCombo.getText();
@@ -107,6 +104,11 @@
//cssDialog.setStyleForPreview();
}
});
+ Set<Entry<String, String>> set = ColorParser.getInstance().getMap().entrySet();
+ for (Map.Entry<String, String> me : set) {
+ RGB rgb = Util.getColor(me.getKey());
+ colorCombo.add(me.getValue(), rgb);
+ }
Button button = new Button(this, SWT.PUSH);
button.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
@@ -138,6 +140,9 @@
}
});
+ // =====================================================================================
+ // Add BACKGROUND_IMAGE element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.BACKGROUND_IMAGE);
@@ -199,12 +204,17 @@
}
});
+ // =====================================================================================
+ // Add BACKGROUND_REPEAT element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.BACKGROUND_REPEAT);
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
backgroundRepeatCombo = new Combo(this, SWT.BORDER);
- backgroundRepeatCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+ backgroundRepeatCombo.setLayoutData(gridData);
backgroundRepeatCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
@@ -221,14 +231,10 @@
//cssDialog.setStyleForPreview();
}
});
-
ArrayList<String> list = comboMap.get(CSSConstants.BACKGROUND_REPEAT);
for (String str : list) {
backgroundRepeatCombo.add(str);
}
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
}
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBoxesControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBoxesControl.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabBoxesControl.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -91,15 +91,22 @@
Label label = new Label(this, SWT.NONE);
label.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
-
label.setFont(JFaceResources.getFontRegistry().get(JFaceResources.BANNER_FONT));
label.setText(JstUIMessages.DIMENSION_TITLE);
+
+ // =====================================================================================
+ // Add WIDTH element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
- label.setText(JstUIMessages.WIDTH);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+ label.setText(JstUIMessages.WIDTH);
widthText = new Text(this, SWT.BORDER | SWT.SINGLE);
+ widthText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ extWidthCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
+ extWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
widthText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = widthText.getText();
@@ -124,25 +131,16 @@
// cssDialog.setStyleForPreview();
}
});
-
- widthText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- extWidthCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extWidthCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String width = widthText.getText().trim();
-
if (width == null) {
return;
}
-
if (width.equals(Constants.EMPTY)) {
return;
}
-
String tmp = extWidthCombo.getText();
-
if (tmp != null) {
styleAttributes.addAttribute(CSSConstants.WIDTH, width + tmp);
@@ -151,27 +149,29 @@
}
}
});
-
- extWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extWidthCombo.add(Constants.extSizes[i]);
}
+ // =====================================================================================
+ // Add HEIGHT element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
- label.setText(JstUIMessages.HEIGHT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+ label.setText(JstUIMessages.HEIGHT);
heightText = new Text(this, SWT.BORDER | SWT.SINGLE);
+ heightText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ extHeightCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
+ extHeightCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
heightText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = heightText.getText();
-
if (tmp != null) {
if (tmp.trim().length() > 0) {
String extHeight = extHeightCombo.getText().trim();
-
if (extHeight != null) {
styleAttributes.addAttribute(CSSConstants.HEIGHT, tmp + extHeight);
} else {
@@ -188,36 +188,23 @@
// cssDialog.setStyleForPreview();
}
});
-
- heightText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- extHeightCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extHeightCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String height = heightText.getText().trim();
-
if (height == null) {
return;
}
-
if (height.equals(Constants.EMPTY)) {
return;
}
-
String tmp = extHeightCombo.getText();
-
if (tmp != null) {
styleAttributes.addAttribute(CSSConstants.HEIGHT, height + tmp);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
}
}
});
-
- extHeightCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extHeightCombo.add(Constants.extSizes[i]);
}
@@ -227,81 +214,73 @@
label.setFont(JFaceResources.getFontRegistry().get(JFaceResources.BANNER_FONT));
label.setText(JstUIMessages.BORDER_TITLE);
+ // =====================================================================================
+ // Add BORDER_STYLE element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.BORDER_STYLE);
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
borderStyleCombo = new Combo(this, SWT.BORDER);
+ borderStyleCombo.setLayoutData(gridData);
borderStyleCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = borderStyleCombo.getText().trim();
-
if (tmp != null) {
if (!tmp.equals(Constants.EMPTY)) {
styleAttributes.addAttribute(CSSConstants.BORDER_STYLE, tmp);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
return;
}
}
-
styleAttributes.removeAttribute(CSSConstants.BORDER_STYLE);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
}
});
-
- borderStyleCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
list = comboMap.get(CSSConstants.BORDER_STYLE);
-
for (String str : list) {
borderStyleCombo.add(str);
}
+ // =====================================================================================
+ // Add BORDER_COLOR element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
-
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.BORDER_COLOR);
- borderColorCombo = new ImageCombo(this, SWT.BORDER);
+ Composite tmpComposite = getCompositeElement();
+ borderColorCombo = new ImageCombo(tmpComposite, SWT.BORDER);
+ borderColorCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
borderColorCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = borderColorCombo.getText().trim();
-
if (tmp != null) {
if (!tmp.equals(Constants.EMPTY)) {
styleAttributes.addAttribute(CSSConstants.BORDER_COLOR, tmp);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
return;
}
}
-
styleAttributes.removeAttribute(CSSConstants.BORDER_COLOR);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
}
});
-
- borderColorCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
Set<Entry<String, String>> set = ColorParser.getInstance().getMap().entrySet();
-
for (Map.Entry<String, String> me : set) {
RGB rgb = Util.getColor(me.getKey());
borderColorCombo.add(me.getValue(), rgb);
}
- final Button button = new Button(this, SWT.PUSH);
+ final Button button = new Button(tmpComposite, SWT.PUSH);
button.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
button.setToolTipText(JstUIMessages.BORDER_COLOR_TIP);
@@ -317,13 +296,11 @@
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
ColorDialog dlg = new ColorDialog(getShell());
-
dlg.setRGB((Util.getColor((borderColorCombo.getText().trim())) == null)
? Constants.RGB_BLACK : Util.getColor((borderColorCombo.getText().trim())));
dlg.setText(JstUIMessages.COLOR_DIALOG_TITLE);
RGB rgb = dlg.open();
-
if (rgb != null) {
String colorStr = Util.createColorString(rgb);
borderColorCombo.setText(colorStr);
@@ -331,24 +308,28 @@
}
});
+ // =====================================================================================
+ // Add BORDER_WIDTH element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
- label.setText(JstUIMessages.BORDER_WIDTH);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+ label.setText(JstUIMessages.BORDER_WIDTH);
borderWidthCombo = new Combo(this, SWT.BORDER | SWT.SINGLE);
+ borderWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ extBorderWidthCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
+ extBorderWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
borderWidthCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
String currentText = borderWidthCombo.getText();
-
list = comboMap.get(CSSConstants.BORDER_WIDTH);
-
for (String str : list) {
if (currentText.equals(str)) {
extBorderWidthCombo.select(0);
extBorderWidthCombo.setEnabled(false);
styleAttributes.addAttribute(CSSConstants.BORDER_WIDTH, currentText);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
return;
@@ -358,7 +339,6 @@
extBorderWidthCombo.setEnabled(true);
String tmp = borderWidthCombo.getText();
-
if (tmp != null) {
if (tmp.trim().length() > 0) {
String extBorderWidth = extBorderWidthCombo.getText().trim();
@@ -375,81 +355,53 @@
} else {
styleAttributes.removeAttribute(CSSConstants.BORDER_WIDTH);
}
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
}
});
-
- borderWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
list = comboMap.get(CSSConstants.BORDER_WIDTH);
-
for (String str : list) {
borderWidthCombo.add(str);
}
-
- extBorderWidthCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extBorderWidthCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String borderWidth = borderWidthCombo.getText().trim();
-
if (borderWidth == null) {
return;
}
-
if (borderWidth.equals(Constants.EMPTY)) {
return;
}
-
String tmp = extBorderWidthCombo.getText();
-
if (tmp != null) {
styleAttributes.addAttribute(CSSConstants.BORDER_WIDTH, borderWidth + tmp);
-
// TODO Dzmitry Sakovich
// cssDialog.setStyleForPreview();
}
}
});
-
- extBorderWidthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extBorderWidthCombo.add(Constants.extSizes[i]);
}
- borderWidthCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String currentText = borderWidthCombo.getText();
-
- list = comboMap.get(CSSConstants.BORDER_WIDTH);
-
- for (String str : list) {
- if (currentText.equals(str)) {
- extBorderWidthCombo.select(0);
- extBorderWidthCombo.setEnabled(false);
-
- return;
- }
-
- extBorderWidthCombo.setEnabled(true);
- }
- }
- });
-
label = new Label(this, SWT.NONE);
label.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1));
label.setFont(JFaceResources.getFontRegistry().get(JFaceResources.BANNER_FONT));
label.setText(JstUIMessages.MARGIN_PADDING_TITLE);
+ // =====================================================================================
+ // Add MARGIN element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
- label.setText(JstUIMessages.MARGIN);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+ label.setText(JstUIMessages.MARGIN);
marginText = new Text(this, SWT.BORDER | SWT.SINGLE);
+ marginText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ extMarginCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
+ extMarginCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
marginText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = marginText.getText();
@@ -474,11 +426,6 @@
// cssDialog.setStyleForPreview();
}
});
-
- marginText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- extMarginCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extMarginCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String margin = marginText.getText().trim();
@@ -501,19 +448,23 @@
}
}
});
-
- extMarginCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extMarginCombo.add(Constants.extSizes[i]);
}
+ // =====================================================================================
+ // Add PADDING element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
- label.setText(JstUIMessages.PADDING);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
+ label.setText(JstUIMessages.PADDING);
paddingText = new Text(this, SWT.BORDER | SWT.SINGLE);
+ paddingText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ extPaddingCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
+ extPaddingCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
+
paddingText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String tmp = paddingText.getText();
@@ -538,11 +489,6 @@
// cssDialog.setStyleForPreview();
}
});
-
- paddingText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- extPaddingCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extPaddingCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String padding = paddingText.getText().trim();
@@ -565,15 +511,28 @@
}
}
});
-
- extPaddingCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extPaddingCombo.add(Constants.extSizes[i]);
}
}
/**
+ * Create container that take up 2 cells and contains fontSizeCombo and extFontSizeCombo elements.
+ */
+ private Composite getCompositeElement() {
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
+ GridLayout gridLayoutTmp = new GridLayout(2, false);
+ gridLayoutTmp.marginHeight = 0;
+ gridLayoutTmp.marginWidth = 0;
+ Composite classComposite = new Composite(this, SWT.CENTER);
+ classComposite.setLayoutData(gridData);
+ classComposite.setLayout(gridLayoutTmp);
+
+ return classComposite;
+ }
+
+ /**
* Method for get data in controls (if param equal true ), or set data (if
* param equal false).
*
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPropertySheetControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPropertySheetControl.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPropertySheetControl.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -1,191 +1,173 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.jsp.outline.cssdialog.tabs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Set;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
-import org.jboss.tools.jst.jsp.outline.cssdialog.events.StyleAttributes;
-import org.jboss.tools.jst.jsp.outline.cssdialog.events.TabPropertySheetMouseAdapter;
-
-/**
- *
- * Class for creating Property sheet tab
- *
- * @author Evgeny Zheleznyakov
- *
- */
-public class TabPropertySheetControl extends Composite {
-
- private String columns[] = new String[] { "Attribute", "Value" };
-
- private Tree tree;
-
- private StyleAttributes styleAttributes;
-
- /**
- * Constructor for creating controls
- *
- * @param composite
- * The parent composite for tab
- */
- public TabPropertySheetControl(TabFolder tabFolder,
- HashMap<String, ArrayList<String>> elementMap,
- HashMap<String, ArrayList<String>> comboMap,
- StyleAttributes styleAttributes) {
- super(tabFolder, SWT.NONE);
-
- this.styleAttributes = styleAttributes;
-
- setLayout(new FillLayout());
-
- tree = new Tree(this, SWT.NONE);
- tree.setHeaderVisible(true);
- tree.setLinesVisible(true);
-
- // Create NUM columns
- for (int i = 0; i < columns.length; i++) {
- TreeColumn column = new TreeColumn(tree, SWT.LEFT | SWT.COLOR_BLACK);
- column.setText(columns[i]);
- }
-
- Set<String> set = elementMap.keySet();
-
- for (String str : set) {
-
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText(str);
- item.setFont(Constants.FIRST_COLUMN, JFaceResources
- .getFontRegistry().get(JFaceResources.TEXT_FONT));
- ArrayList<String> list = elementMap.get(str);
-
- for (String strList : list) {
-
- TreeItem subItem = new TreeItem(item, SWT.NONE);
- subItem.setText(Constants.FIRST_COLUMN, strList);
- }
- }
- updateData(false);
-
- tree.addMouseListener(new TabPropertySheetMouseAdapter(tree,
- elementMap, comboMap, this));
-
- for (int i = 0; i < tree.getColumnCount(); i++)
- tree.getColumn(i).pack();
- }
-
- /**
- * Method for get data in controls (if param equal true ), or set data (if
- * param equal false).
- *
- * @param update
- */
- public void updateData(boolean update) {
- if (update) {
-
- for (int i = 0; i < tree.getItemCount(); i++) {
- for (int j = 0; j < tree.getItem(i).getItemCount(); j++) {
- if (tree.getItem(i).getItem(j).getText(
- Constants.SECOND_COLUMN) == null) {
- styleAttributes.removeAttribute(tree.getItem(i).getItem(j)
- .getText(Constants.FIRST_COLUMN));
- } else if (tree.getItem(i).getItem(j).getText(
- Constants.SECOND_COLUMN).trim().equals(
- Constants.EMPTY)) {
- styleAttributes.removeAttribute(tree.getItem(i).getItem(j)
- .getText(Constants.FIRST_COLUMN));
- } else {
- styleAttributes.addAttribute(tree.getItem(i).getItem(j).getText(
- Constants.FIRST_COLUMN), tree.getItem(i)
- .getItem(j).getText(Constants.SECOND_COLUMN));
- }
- }
- }
- } else {
-
- for (int i = 0; i < tree.getItemCount(); i++)
- for (int j = 0; j < tree.getItem(i).getItemCount(); j++)
- tree.getItem(i).getItem(j).setText(Constants.SECOND_COLUMN,
- Constants.EMPTY);
-
- Set<String> set = styleAttributes.keySet();
- for (String str : set) {
-
- for (int i = 0; i < tree.getItemCount(); i++)
- for (int j = 0; j < tree.getItem(i).getItemCount(); j++)
- if (tree.getItem(i).getItem(j).getText(
- Constants.FIRST_COLUMN).equals(str))
- tree.getItem(i).getItem(j).setText(
- Constants.SECOND_COLUMN,
- styleAttributes.getAttribute(str));
- }
- setExpanded();
- }
- }
-
- /**
- *
- * Set expanded item for not empty css attributes
- */
- private void setExpanded() {
-
- TreeItem item = null;
-
- for (int i = 0; i < tree.getItemCount(); i++)
- tree.getItem(i).setExpanded(false);
-
- Set<String> set = styleAttributes.keySet();
-
- for (String attr : set)
- if ((item = find(attr)) != null) {
- item.setExpanded(true);
- }
-
- for (int i = 0; i < tree.getColumnCount(); i++)
- tree.getColumn(i).pack();
- }
-
- /**
- *
- * Find tree item for expand
- *
- * @param attr
- * Name of css attributes
- * @return Tree item which will expand
- */
- private TreeItem find(String attr) {
-
- TreeItem item = null;
- TreeItem subItem = null;
-
- for (int i = 0; i < tree.getItemCount(); i++) {
-
- item = tree.getItem(i);
- for (int j = 0; j < item.getItemCount(); j++) {
-
- subItem = item.getItem(j);
- if (subItem.getText().equals(attr))
- return item;
- }
- }
- return null;
- }
-}
\ No newline at end of file
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.jsp.outline.cssdialog.tabs;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Set;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.TreeItem;
+import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
+import org.jboss.tools.jst.jsp.outline.cssdialog.events.StyleAttributes;
+import org.jboss.tools.jst.jsp.outline.cssdialog.events.TabPropertySheetMouseAdapter;
+
+/**
+ * Class for creating Property sheet tab
+ *
+ * @author Evgeny Zheleznyakov
+ */
+public class TabPropertySheetControl extends Composite {
+
+ private String[] columns = new String[] { "Attribute", "Value" };
+ private Tree tree;
+ private StyleAttributes styleAttributes;
+
+ /**
+ * Constructor for creating controls
+ *
+ * @param composite The parent composite for tab
+ */
+ public TabPropertySheetControl(TabFolder tabFolder, HashMap<String, ArrayList<String>> elementMap,
+ HashMap<String, ArrayList<String>> comboMap, StyleAttributes styleAttributes) {
+ super(tabFolder, SWT.NONE);
+ this.styleAttributes = styleAttributes;
+ setLayout(new FillLayout());
+
+ tree = new Tree(this, SWT.NONE);
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ // Create NUM columns
+ for (int i = 0; i < columns.length; i++) {
+ TreeColumn column = new TreeColumn(tree, SWT.LEFT | SWT.COLOR_BLACK);
+ column.setText(columns[i]);
+ }
+
+ Set<String> set = elementMap.keySet();
+ for (String str : set) {
+ TreeItem item = new TreeItem(tree, SWT.NONE);
+ item.setText(str);
+ item.setFont(Constants.FIRST_COLUMN, JFaceResources.getFontRegistry().get(JFaceResources.TEXT_FONT));
+
+ ArrayList<String> list = elementMap.get(str);
+
+ for (String strList : list) {
+ TreeItem subItem = new TreeItem(item, SWT.NONE);
+ subItem.setText(Constants.FIRST_COLUMN, strList);
+ }
+ }
+
+ updateData(false);
+
+ tree.addMouseListener(new TabPropertySheetMouseAdapter(tree, elementMap, comboMap, this));
+
+ for (int i = 0; i < tree.getColumnCount(); i++) {
+ tree.getColumn(i).pack();
+ }
+ }
+
+ /**
+ * Method for get data in controls (if param equal true ), or set data (if param equal false).
+ *
+ * @param update
+ */
+ public void updateData(boolean update) {
+ if (update) {
+ for (int i = 0; i < tree.getItemCount(); i++) {
+ for (int j = 0; j < tree.getItem(i).getItemCount(); j++) {
+ if (tree.getItem(i).getItem(j).getText(Constants.SECOND_COLUMN) == null) {
+ styleAttributes.removeAttribute(tree.getItem(i).getItem(j)
+ .getText(Constants.FIRST_COLUMN));
+ } else if (tree.getItem(i).getItem(j).getText(Constants.SECOND_COLUMN).trim()
+ .equals(Constants.EMPTY)) {
+ styleAttributes.removeAttribute(tree.getItem(i).getItem(j)
+ .getText(Constants.FIRST_COLUMN));
+ } else {
+ styleAttributes.addAttribute(tree.getItem(i).getItem(j)
+ .getText(Constants.FIRST_COLUMN),
+ tree.getItem(i).getItem(j).getText(Constants.SECOND_COLUMN));
+ }
+ }
+ }
+ } else {
+ for (int i = 0; i < tree.getItemCount(); i++)
+ for (int j = 0; j < tree.getItem(i).getItemCount(); j++)
+ tree.getItem(i).getItem(j).setText(Constants.SECOND_COLUMN, Constants.EMPTY);
+
+ Set<String> set = styleAttributes.keySet();
+ for (String str : set) {
+ for (int i = 0; i < tree.getItemCount(); i++) {
+ for (int j = 0; j < tree.getItem(i).getItemCount(); j++) {
+ if (tree.getItem(i).getItem(j).getText(Constants.FIRST_COLUMN).equals(str)) {
+ tree.getItem(i).getItem(j)
+ .setText(Constants.SECOND_COLUMN, styleAttributes.getAttribute(str));
+ }
+ }
+ }
+ }
+ setExpanded();
+ }
+ }
+
+ /**
+ * Set expanded item for not empty css attributes.
+ */
+ private void setExpanded() {
+ TreeItem item = null;
+
+ for (int i = 0; i < tree.getItemCount(); i++) {
+ tree.getItem(i).setExpanded(false);
+ }
+
+ Set<String> set = styleAttributes.keySet();
+ for (String attr : set) {
+ if ((item = find(attr)) != null) {
+ item.setExpanded(true);
+ }
+ }
+
+ for (int i = 0; i < tree.getColumnCount(); i++) {
+ tree.getColumn(i).pack();
+ }
+ }
+
+ /**
+ * Find tree item for expand
+ *
+ * @param attr Name of css attributes
+ * @return Tree item which will expand
+ */
+ private TreeItem find(String attr) {
+ TreeItem item = null;
+ TreeItem subItem = null;
+
+ for (int i = 0; i < tree.getItemCount(); i++) {
+ item = tree.getItem(i);
+
+ for (int j = 0; j < item.getItemCount(); j++) {
+ subItem = item.getItem(j);
+
+ if (subItem.getText().equals(attr)) {
+ return item;
+ }
+ }
+ }
+
+ return null;
+ }
+}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -54,7 +54,6 @@
import java.util.HashMap;
import java.util.StringTokenizer;
-
/**
* Class for creating control in Quick edit tab
*
@@ -73,7 +72,6 @@
//TODO Dzmitry Sakovich
//private CSSDialog dialog;
-
/**
* Constructor for creating controls
*
@@ -93,25 +91,26 @@
setLayout(gridLayout);
ArrayList<String> listKeys = new ArrayList<String>();
-
- for (String key : styleAttributes.keySet())
+ for (String key : styleAttributes.keySet()) {
listKeys.add(key);
-
+ }
Collections.sort(listKeys);
-
for (String key : listKeys) {
label = new Label(this, SWT.LEFT);
label.setText(format(key));
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
if (comboMap.keySet().contains(key)) {
- createCombo(this, key, styleAttributes.getAttribute(key));
+ createCombo(key, styleAttributes.getAttribute(key));
} else {
- createText(this, key, styleAttributes.getAttribute(key));
+ createText(key, styleAttributes.getAttribute(key));
}
}
}
+ /**
+ * Update data method.
+ */
public void updateData() {
Control[] controls = this.getChildren();
@@ -124,21 +123,20 @@
}
ArrayList<String> listKeys = new ArrayList<String>();
-
- for (String key : styleAttributes.keySet())
+ for (String key : styleAttributes.keySet()) {
listKeys.add(key);
+ }
Collections.sort(listKeys);
-
for (String key : listKeys) {
label = new Label(this, SWT.LEFT);
label.setText(format(key));
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
if (comboMap.keySet().contains(key)) {
- createCombo(this, key, styleAttributes.getAttribute(key));
+ createCombo(key, styleAttributes.getAttribute(key));
} else {
- createText(this, key, styleAttributes.getAttribute(key));
+ createText(key, styleAttributes.getAttribute(key));
}
}
@@ -146,25 +144,23 @@
}
/**
- * Method for creating combo controls
+ * Method for creating combo controls.
*
- * @param composite
- * The parent composite for tab
- * @param name
- * Name of css element
- * @param value
- * Value of css element
+ * @param composite The parent composite for tab
+ * @param name Name of css element
+ * @param value Value of css element
*/
- private void createCombo(final Composite composite, final String name, final String value) {
+ private void createCombo(final String name, final String value) {
Button btn = null;
+ // if css attribute with color combo
+ if (name.indexOf(CSSConstants.COLOR) != Constants.DONT_CONTAIN) {
+ Composite tmpComposite = getCompositeElement();
- //if css attribute with color combo
- if (name.indexOf(CSSConstants.COLOR) != Constants.DONT_CONTAIN) {
- final ImageCombo colorCombo = new ImageCombo(composite, SWT.BORDER);
+ final ImageCombo colorCombo = new ImageCombo(tmpComposite, SWT.BORDER);
colorCombo.setText(value);
colorCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- btn = new Button(composite, SWT.NONE);
+ btn = new Button(tmpComposite, SWT.NONE);
btn.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
ImageDescriptor imageDes = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_COLOR_FILE_LOCATION);
@@ -185,7 +181,7 @@
startRgb = Constants.RGB_BLACK;
}
- ColorDialog colorDialog = new ColorDialog(composite.getShell());
+ ColorDialog colorDialog = new ColorDialog(getShell());
colorDialog.setRGB(startRgb);
colorDialog.setText(JstUIMessages.COLOR_DIALOG_TITLE);
@@ -223,16 +219,18 @@
}
if (btn == null) {
- new Label(composite, SWT.NONE);
+ new Label(this, SWT.NONE);
}
colorCombo.setText(value);
//if css attribute contain choose_folder button
} else if (Util.containFolder(name)) {
- final Combo combo = new Combo(composite, SWT.NONE);
+ Composite tmpComposite = getCompositeElement();
+
+ final Combo combo = new Combo(tmpComposite, SWT.NONE);
combo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- btn = new Button(composite, SWT.NONE);
+ btn = new Button(tmpComposite, SWT.NONE);
btn.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
ImageDescriptor imageDes = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_FOLDER_FILE_LOCATION);
@@ -247,14 +245,14 @@
btn.setToolTipText(JstUIMessages.COLOR_DIALOG_TITLE);
ArrayList<String> list = comboMap.get(name);
-
- for (String str : list)
+ for (String str : list) {
combo.add(str);
+ }
btn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
IProject project = Util.getCurrentProject();
- ImageSelectionDialog dialog = new ImageSelectionDialog(composite.getShell(),
+ ImageSelectionDialog dialog = new ImageSelectionDialog(getShell(),
new WorkbenchLabelProvider(), new WorkbenchContentProvider());
String title = JstUIMessages.IMAGE_DIALOG_TITLE;
dialog.setTitle(title);
@@ -286,26 +284,29 @@
}
});
} else {
- final Combo combo = new Combo(composite, SWT.CENTER);
- combo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ final Combo combo = new Combo(this, SWT.CENTER);
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ if (!Util.searchInExtElement(name)) {
+ gridData.horizontalSpan = 2;
+ }
+ combo.setLayoutData(gridData);
ArrayList<String> list = comboMap.get(name);
-
- for (String str : list)
+ for (String str : list) {
combo.add(str);
-
+ }
final Combo extCombo;
String[] values = null;
boolean ext = false;
-
if (Util.searchInExtElement(name)) {
ext = true;
values = Util.convertExtString(value);
- extCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
+ extCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
extCombo.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- for (int i = 0; i < Constants.extSizes.length; i++)
+ for (int i = 0; i < Constants.extSizes.length; i++) {
extCombo.add(Constants.extSizes[i]);
+ }
extCombo.select(extCombo.indexOf(values[EXT_VALUE_NUMBER]));
@@ -351,7 +352,6 @@
extCombo.setEnabled(true);
String tmp = combo.getText().trim();
-
if (tmp != null) {
if (!tmp.equals(Constants.EMPTY)) {
String extTmp = extCombo.getText().trim();
@@ -372,11 +372,9 @@
}
});
} else {
- new Label(composite, SWT.NONE).setLayoutData(new GridData(GridData.END, GridData.CENTER,
- false, false));
+// new Label(this, SWT.NONE).setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
combo.addModifyListener(new ModifyListener() {
String key = name;
-
public void modifyText(ModifyEvent event) {
if (!combo.getText().trim().equals(Constants.EMPTY)) {
styleAttributes.addAttribute(key, combo.getText().trim());
@@ -388,7 +386,6 @@
}
});
}
-
if (ext) {
combo.setText(values[VALUE_NUMBER]);
} else {
@@ -400,21 +397,22 @@
/**
* Method for creating text controls
*
- * @param composite
- * The parent composite for tab
- * @param name
- * Name of css element
- * @param value
- * Value of css element
+ * @param composite The parent composite for tab
+ * @param name Name of css element
+ * @param value Value of css element
*/
- private void createText(final Composite composite, final String name, final String value) {
+ private void createText(final String name, final String value) {
Button btn = null;
- final Text text = new Text(composite, SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ final Text text;
+ // create "button" in case of FONT_FAMILY style property
if (name.equalsIgnoreCase(CSSConstants.FONT_FAMILY)) {
- btn = new Button(composite, SWT.NONE);
+ Composite tmpComposite = getCompositeElement();
+ text = new Text(tmpComposite, SWT.BORDER);
+ text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+
+ btn = new Button(tmpComposite, SWT.NONE);
btn.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
ImageDescriptor imageDes = JspEditorPlugin.getImageDescriptor(Constants.IMAGE_FONT_FILE_LOCATION);
@@ -429,8 +427,7 @@
});
btn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
- FontFamilyDialog dialog = new FontFamilyDialog(composite.getShell(),
- text.getText());
+ FontFamilyDialog dialog = new FontFamilyDialog(getShell(), text.getText());
if (dialog.open() == Window.OK) {
text.setText(dialog.getFontFamily());
@@ -451,21 +448,23 @@
//dialog.setStyleForPreview();
}
});
+ } else {
+ text = new Text(this, SWT.BORDER);
+ text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
}
- final Combo extCombo;
String[] values = null;
boolean ext = false;
-
if (btn == null) {
if (Util.searchInExtElement(name)) {
values = Util.convertExtString(value);
ext = true;
- extCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
+ final Combo extCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
extCombo.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- for (int i = 0; i < Constants.extSizes.length; i++)
+ for (int i = 0; i < Constants.extSizes.length; i++) {
extCombo.add(Constants.extSizes[i]);
+ }
extCombo.select(extCombo.indexOf(values[EXT_VALUE_NUMBER]));
@@ -516,8 +515,7 @@
}
});
} else {
- new Label(composite, SWT.NONE).setLayoutData(new GridData(GridData.END, GridData.CENTER,
- false, false));
+// new Label(this, SWT.NONE).setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
text.addModifyListener(new ModifyListener() {
String key = name;
@@ -543,10 +541,25 @@
}
/**
+ * Create container that take up 2 cells and contains fontSizeCombo and extFontSizeCombo elements.
+ */
+ private Composite getCompositeElement() {
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
+ GridLayout gridLayoutTmp = new GridLayout(2, false);
+ gridLayoutTmp.marginHeight = 0;
+ gridLayoutTmp.marginWidth = 0;
+ Composite classComposite = new Composite(this, SWT.CENTER);
+ classComposite.setLayoutData(gridData);
+ classComposite.setLayout(gridLayoutTmp);
+
+ return classComposite;
+ }
+
+ /**
* Method for format css names (text-decoration : Text Decoration)
*
- * @param str
- * CSS name
+ * @param str CSS name
* @return Format ss name
*/
private String format(String str) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabTextControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabTextControl.java 2008-11-11 15:39:10 UTC (rev 11677)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabTextControl.java 2008-11-11 15:46:29 UTC (rev 11678)
@@ -10,9 +10,14 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.outline.cssdialog.tabs;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.window.Window;
-
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -30,7 +35,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.outline.cssdialog.FontFamilyDialog;
@@ -41,12 +45,6 @@
import org.jboss.tools.jst.jsp.outline.cssdialog.events.StyleAttributes;
import org.jboss.tools.jst.jsp.outline.cssdialog.parsers.ColorParser;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
/**
* Class for creating Text tab controls
*
@@ -73,7 +71,7 @@
/**
* Constructor for creating controls
*
- * @param composite
+ * @param composite Composite element
*/
public TabTextControl(final Composite composite, final HashMap<String, ArrayList<String>> comboMap,
final StyleAttributes styleAttributes) {
@@ -86,9 +84,12 @@
gridLayout.numColumns = numColumns;
setLayout(gridLayout);
+ // =====================================================================================
+ // Add FONT_FAMILY element
+ // =====================================================================================
Label label = new Label(this, SWT.LEFT);
+ label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.FONT_FAMILY);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
fontFamilyText = new Text(this, SWT.BORDER | SWT.SINGLE);
fontFamilyText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
@@ -130,6 +131,10 @@
}
}
});
+
+ // =====================================================================================
+ // Add COLOR element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.COLOR);
@@ -151,18 +156,12 @@
//cssDialog.setStyleForPreview();
}
});
-
- ////////////////////////////////////////////////////////////////////////
- // //
Set<Entry<String, String>> set = ColorParser.getInstance().getMap().entrySet();
-
for (Map.Entry<String, String> me : set) {
RGB rgb = Util.getColor(me.getKey());
colorCombo.add(me.getValue(), rgb);
}
- ////////////////////////////////////////////////////////////////////////
- // /
button = new Button(this, SWT.PUSH);
button.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
button.setToolTipText(JstUIMessages.COLOR_TIP);
@@ -193,23 +192,22 @@
}
});
+ // =====================================================================================
+ // Add FONT_SIZE element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.FONT_SIZE);
- fontSizeCombo = new Combo(this, SWT.BORDER | SWT.SINGLE);
+ // Create container that take up 2 cells and contains fontSizeCombo and extFontSizeCombo elements.
+ // Is created for correct layout.
+ Composite tmpComposite = getCompositeElement();
+ fontSizeCombo = new Combo(tmpComposite, SWT.BORDER | SWT.SINGLE);
+ fontSizeCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- final GridData fontSizeGridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
- fontSizeCombo.setLayoutData(fontSizeGridData);
+ extFontSizeCombo = new Combo(tmpComposite, SWT.BORDER | SWT.READ_ONLY);
+ extFontSizeCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- list = comboMap.get(CSSConstants.FONT_SIZE);
-
- for (String str : list) {
- fontSizeCombo.add(str);
- }
-
- extFontSizeCombo = new Combo(this, SWT.BORDER | SWT.READ_ONLY);
-
extFontSizeCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
String fontSize = fontSizeCombo.getText().trim();
@@ -227,9 +225,6 @@
}
}
});
-
- extFontSizeCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
for (int i = 0; i < Constants.extSizes.length; i++) {
extFontSizeCombo.add(Constants.extSizes[i]);
}
@@ -276,12 +271,22 @@
//cssDialog.setStyleForPreview();
}
});
+ list = comboMap.get(CSSConstants.FONT_SIZE);
+ for (String str : list) {
+ fontSizeCombo.add(str);
+ }
+ // =====================================================================================
+ // Add FONT_STYLE element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.FONT_STYLE);
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
fontStyleCombo = new Combo(this, SWT.BORDER);
+ fontStyleCombo.setLayoutData(gridData);
fontStyleCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
@@ -297,24 +302,22 @@
//cssDialog.setStyleForPreview();
}
});
-
- fontStyleCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
list = comboMap.get(CSSConstants.FONT_STYLE);
-
for (String str : list) {
fontStyleCombo.add(str);
}
+ // =====================================================================================
+ // Add FONT_WEIGHT element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
-
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.FONT_WEIGHT);
+ gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
fontWeigthCombo = new Combo(this, SWT.BORDER);
+ fontWeigthCombo.setLayoutData(gridData);
fontWeigthCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
@@ -330,24 +333,22 @@
//cssDialog.setStyleForPreview();
}
});
-
- fontWeigthCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
list = comboMap.get(CSSConstants.FONT_WEIGHT);
-
for (String str : list) {
fontWeigthCombo.add(str);
}
+ // =====================================================================================
+ // Add TEXT_DECORATION element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
-
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.TEXT_DECORATION);
+ gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
textDecorationCombo = new Combo(this, SWT.BORDER);
+ textDecorationCombo.setLayoutData(gridData);
textDecorationCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
@@ -363,24 +364,22 @@
//cssDialog.setStyleForPreview();
}
});
-
- textDecorationCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
list = comboMap.get(CSSConstants.TEXT_DECORATION);
-
for (String str : list) {
textDecorationCombo.add(str);
}
+ // =====================================================================================
+ // Add TEXT_ALIGN element
+ // =====================================================================================
label = new Label(this, SWT.LEFT);
label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
-
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
label.setText(JstUIMessages.TEXT_ALIGN);
+ gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
textAlignCombo = new Combo(this, SWT.BORDER);
+ textAlignCombo.setLayoutData(gridData);
textAlignCombo.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent event) {
@@ -396,18 +395,26 @@
//cssDialog.setStyleForPreview();
}
});
-
- textAlignCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
-
list = comboMap.get(CSSConstants.TEXT_ALIGN);
-
for (String str : list) {
textAlignCombo.add(str);
}
+ }
- label = new Label(this, SWT.LEFT);
- label.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false));
- label.setText(Constants.EMPTY);
+ /**
+ * Create container that take up 2 cells and contains fontSizeCombo and extFontSizeCombo elements.
+ */
+ private Composite getCompositeElement() {
+ GridData gridData = new GridData(GridData.FILL, GridData.CENTER, true, false);
+ gridData.horizontalSpan = 2;
+ GridLayout gridLayoutTmp = new GridLayout(2, false);
+ gridLayoutTmp.marginHeight = 0;
+ gridLayoutTmp.marginWidth = 0;
+ Composite classComposite = new Composite(this, SWT.CENTER);
+ classComposite.setLayoutData(gridData);
+ classComposite.setLayout(gridLayoutTmp);
+
+ return classComposite;
}
/**
17 years, 5 months
JBoss Tools SVN: r11677 - in trunk/seam/plugins: org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-11-11 10:39:10 -0500 (Tue, 11 Nov 2008)
New Revision: 11677
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntime.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2489 Fixed
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java 2008-11-11 15:39:10 UTC (rev 11677)
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class SeamUtil {
+
+ /**
+ * Returns Seam version from <Seam Runtime>/lib/jboss-seam.jar/META-INF/MANIFEST.MF
+ * from Seam Runtime which is set for the project.
+ * @param project
+ * @return
+ */
+ public static String getSeamVersionFromManifest(IProject project) {
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, false);
+ if(seamProject == null) {
+ SeamCorePlugin.getPluginLog().logWarning("Can't find Seam Project for " + project.getName());
+ return null;
+ }
+ return getSeamVersionFromManifest(seamProject);
+ }
+
+ /**
+ * Returns Seam version from <Seam Runtime>/lib/jboss-seam.jar/META-INF/MANIFEST.MF
+ * from Seam Runtime which is set for the project.
+ * @param project
+ * @return
+ */
+ public static String getSeamVersionFromManifest(ISeamProject project) {
+ SeamRuntime runtime = project.getRuntime();
+ if(runtime==null) {
+ SeamCorePlugin.getPluginLog().logWarning("Seam Runtime for " + project.getProject().getName() + " is null.");
+ return null;
+ }
+ return getSeamVersionFromManifest(runtime);
+ }
+
+ private final static String seamJarName = "jboss-seam.jar";
+ private final static String seamVersionAttributeName = "Seam-Version";
+
+ /**
+ * Returns Seam version from <Seam Runtime>/lib/jboss-seam.jar/META-INF/MANIFEST.MF
+ * from Seam Runtime.
+ * @param runtime
+ * @return
+ */
+ public static String getSeamVersionFromManifest(SeamRuntime runtime) {
+ File jarFile = new File(runtime.getLibDir(), seamJarName);
+ if(!jarFile.isFile()) {
+ jarFile = new File(runtime.getHomeDir(), seamJarName);
+ if(!jarFile.isFile()) {
+ SeamCorePlugin.getPluginLog().logWarning(jarFile.getAbsolutePath() + " as well as " + new File(runtime.getLibDir(), seamJarName).getAbsolutePath() + " don't exist for Seam Runtime " + runtime.getName());
+ return null;
+ }
+ }
+ try {
+ JarFile jar = new JarFile(jarFile);
+ Attributes attributes = jar.getManifest().getMainAttributes();
+ String version = attributes.getValue(seamVersionAttributeName);
+ if(version==null) {
+ SeamCorePlugin.getPluginLog().logWarning("Can't get Seam-Version from " + jar.getName() + " MANIFEST.");
+ }
+ return version;
+ } catch (IOException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ return null;
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntime.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntime.java 2008-11-11 14:58:09 UTC (rev 11676)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntime.java 2008-11-11 15:39:10 UTC (rev 11677)
@@ -133,6 +133,15 @@
}
/**
+ * Calculate path to lib folder
+ *
+ * @return absolute path to lib folder
+ */
+ public String getLibDir() {
+ return getHomeDir() + "/lib"; //$NON-NLS-1$
+ }
+
+ /**
* Calculate path to source templates
*
* @return absolute path to source templates
@@ -176,5 +185,4 @@
public String getTemplatesDir() {
return getSeamGenDir();
}
-
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-11-11 14:58:09 UTC (rev 11676)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-11-11 15:39:10 UTC (rev 11677)
@@ -87,6 +87,8 @@
}
}
+ protected IAdaptable info;
+
/**
* @see AbstractOperation#execute(IProgressMonitor, IAdaptable)
*/
@@ -94,12 +96,11 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
IStatus result = Status.OK_STATUS;
-
-
+ this.info = info;
+
final SeamProjectsSet seamPrjSet = new SeamProjectsSet(getProject(info));
try {
-
Map<String, Object> vars = loadParameters(info, seamPrjSet);
List<FileMapping> fileMapping = getFileMappings(vars);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2008-11-11 14:58:09 UTC (rev 11676)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2008-11-11 15:39:10 UTC (rev 11677)
@@ -20,6 +20,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -58,47 +59,50 @@
super((SeamUIMessages.SEAM_CONVERSATION_WIZARD_ENTITY_CREATING_OPERATION));
}
+ private List<FileMapping> actionMapping;
+
@Override
public List<FileMapping> getFileMappings(Map<String, Object> vars) {
- return ACTION_MAPPING;
- }
+ // initialize war files mapping
+ actionMapping = new ArrayList<FileMapping>();
- public static final List<FileMapping> ACTION_MAPPING = new ArrayList<FileMapping>();
+ // seam-gen uses @interfaceName@ as class name since 2.0.1
+ // but seam-gen 2.0.0 and lower ones use @beanName@ (looks like a bug)
+ String version = SeamUtil.getSeamVersionFromManifest(getProject(info));
+ String interfaceName = IParameter.SEAM_BEAN_NAME;
+ if(version!=null && version.compareTo("2.0.1")>=0) {
+ interfaceName = IParameter.SEAM_LOCAL_INTERFACE_NAME;
+ }
- static {
- // initialize war files mapping
-
- ACTION_MAPPING.add(new FileMapping(
+ actionMapping.add(new FileMapping(
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ConversationJavaBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- // seam-gen uses @interfaceName@ as class name since 2.0.1
- // but seam-gen 2.0.0 and lower uses @beanName@ (looks like a bug)
- // So if we want it works for 2.0.* we should uncomment the following line:
- // "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + interfaceName +"}.java", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FileMapping.TYPE.WAR,
false));
- ACTION_MAPPING.add(new FileMapping(
+ actionMapping.add(new FileMapping(
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/view/conversation.xhtml", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" + IParameter.SEAM_PAGE_NAME +"}.xhtml", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
FileMapping.TYPE.WAR,
false));
// initialize ear files mapping
- ACTION_MAPPING.add(new FileMapping(
+ actionMapping.add(new FileMapping(
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ConversationBean.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FileMapping.TYPE.EAR,
false));
- ACTION_MAPPING.add(new FileMapping(
+ actionMapping.add(new FileMapping(
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/Conversation.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FileMapping.TYPE.EAR,
false));
- ACTION_MAPPING.add(new FileMapping(
+ actionMapping.add(new FileMapping(
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/view/conversation.xhtml", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" + IParameter.SEAM_PAGE_NAME +"}.xhtml", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
FileMapping.TYPE.EAR,
false));
+
+ return actionMapping;
}
/*
17 years, 5 months
JBoss Tools SVN: r11676 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-11 09:58:09 -0500 (Tue, 11 Nov 2008)
New Revision: 11676
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
Log:
JBIDE-2342
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-11-11 14:56:46 UTC (rev 11675)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2008-11-11 14:58:09 UTC (rev 11676)
@@ -149,6 +149,8 @@
//Invalid seam project settings
public static String SeamValidatorConfigurationBlock_section_settings;
public static String SeamValidatorConfigurationBlock_pb_invalidSeamProjectSettings_label;
+ public static String SeamValidatorConfigurationBlock_pb_invalidXMLVersion_label;
+
static {
NLS.initializeMessages(BUNDLE_NAME, SeamPreferencesMessages.class);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-11-11 14:56:46 UTC (rev 11675)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2008-11-11 14:58:09 UTC (rev 11676)
@@ -65,6 +65,7 @@
##Invalid seam project settings
SeamValidatorConfigurationBlock_section_settings=Project Settings
SeamValidatorConfigurationBlock_pb_invalidSeamProjectSettings_label=Invalid seam project settings:
+SeamValidatorConfigurationBlock_pb_invalidXMLVersion_label=Invalid components.xml version:
SEAM_VALIDATOR_CONFIGURATION_BLOCK_SEAM_VALIDATOR_CONFIGURATION_BLOCK=SeamValidatorConfigurationBlock
SEAM_VALIDATOR_CONFIGURATION_BLOCK_ERROR=Error
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2008-11-11 14:56:46 UTC (rev 11675)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2008-11-11 14:58:09 UTC (rev 11676)
@@ -132,7 +132,8 @@
private static SectionDescription SECTION_SETTINGS = new SectionDescription(
SeamPreferencesMessages.SeamValidatorConfigurationBlock_section_settings,
new String[][]{
- {SeamPreferences.INVALID_PROJECT_SETTINGS, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_invalidSeamProjectSettings_label}
+ {SeamPreferences.INVALID_PROJECT_SETTINGS, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_invalidSeamProjectSettings_label},
+ {SeamPreferences.INVALID_XML_VERSION, SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_invalidXMLVersion_label}
}
);
17 years, 5 months
JBoss Tools SVN: r11675 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-11 09:56:46 -0500 (Tue, 11 Nov 2008)
New Revision: 11675
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
JBIDE-2342
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2008-11-11 14:52:03 UTC (rev 11674)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2008-11-11 14:56:46 UTC (rev 11675)
@@ -128,6 +128,7 @@
// Mark seam project if it has any invalid seam setting.
public static final String INVALID_PROJECT_SETTINGS = createSeverityOption("invalidProjectSettings"); //$NON-NLS-1$
+ public static final String INVALID_XML_VERSION = createSeverityOption("invalidXMLVersion"); //$NON-NLS-1$
private static String createSeverityOption(String shortName) {
String name = SeamCorePlugin.PLUGIN_ID + ".validator.problem." + shortName; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2008-11-11 14:52:03 UTC (rev 11674)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2008-11-11 14:56:46 UTC (rev 11675)
@@ -37,6 +37,7 @@
defaultPreferences.put(SeamPreferences.STATEFUL_COMPONENT_DOES_NOT_CONTENT_DESTROY, SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.UNPAIRED_GETTER_OR_SETTER, SeamPreferences.IGNORE);
defaultPreferences.put(SeamPreferences.EL_SYNTAX_ERROR, SeamPreferences.WARNING);
+ defaultPreferences.put(SeamPreferences.INVALID_XML_VERSION, SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.CHECK_VARS, SeamPreferences.ENABLE);
//JBIDE-2958 temporary until JBIDE-2957 solved //TODO solve JBIDE-2957
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-11-11 14:52:03 UTC (rev 11674)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-11-11 14:56:46 UTC (rev 11675)
@@ -10,10 +10,12 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core.validation;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -33,6 +35,7 @@
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.common.el.core.resolver.TypeInfoCollector;
+import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
@@ -55,6 +58,7 @@
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.internal.core.DataModelSelectionAttribute;
import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
import org.jboss.tools.seam.internal.core.SeamJavaComponentDeclaration;
@@ -92,6 +96,8 @@
protected static final String VALIDATING_RESOURCE_MESSAGE_ID = "VALIDATING_RESOURCE";
protected static final String VALIDATING_CLASS_MESSAGE_ID = "VALIDATING_CLASS";
+ protected static final String INVALID_XML_VERSION = "INVALID_XML_VERSION";
+
public SeamCoreValidator(SeamValidatorManager validatorManager,
SeamContextValidationHelper coreHelper, IReporter reporter,
SeamValidationContext validationContext, ISeamProject project) {
@@ -123,6 +129,7 @@
break;
}
if (checkFileExtension(currentFile)) {
+ validateXMLVersion(currentFile);
// Get all variable names which were linked with this resource.
Set<String> oldVariablesNamesOfChangedFile = validationContext.getVariableNamesByCoreResource(currentFile.getFullPath());
if(oldVariablesNamesOfChangedFile!=null) {
@@ -696,6 +703,67 @@
}
}
+ private void validateXMLVersion(IFile file) {
+ String ext = file.getFileExtension();
+ if(!"xml".equals(ext)) return;
+
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+
+ if(o == null) return;
+ if(!o.getModelEntity().getName().startsWith("FileSeamComponent")) return;
+
+ Set<String> vs = getXMLVersions(o);
+
+ SeamRuntime runtime = seamProject.getRuntime();
+ if(runtime == null) return;
+
+ String version = runtime.getVersion().toString();
+ String wrongVersion = null;
+ for (String v: vs) {
+ if(!v.startsWith(version)) {
+ wrongVersion = v;
+ break;
+ }
+ }
+ if(wrongVersion != null) {
+ addError(
+ INVALID_XML_VERSION,
+ SeamPreferences.INVALID_XML_VERSION,
+ new String[]{wrongVersion, version},
+ file);
+ }
+ }
+
+ private Set<String> getXMLVersions(XModelObject o) {
+ Set<String> result = new HashSet<String>();
+ if(o.getModelEntity().getName().endsWith("11")) {
+ result.add("1.1");
+ return result;
+ }
+ String sl = o.getAttributeValue("xsi:schemaLocation");
+ int i = 0;
+ while(i >= 0 && i < sl.length()) {
+ int j = sl.indexOf('-', i);
+ if(j < 0) break;
+ int k = sl.indexOf(".xsd", j);
+ if(k < 0) break;
+ String v = sl.substring(j + 1, k);
+ if(isVersion(v)) result.add(v);
+ i = k;
+ }
+
+ return result;
+ }
+
+ private boolean isVersion(String s) {
+ if(s.length() == 0) return false;
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+ if(c != '.' && !Character.isDigit(c)) return false;
+ }
+ return true;
+ }
+
private final static String[] extns = new String[]{"java", "xml"}; //$NON-NLS-1$ //$NON-NLS-2$
private boolean checkFileExtension(IFile file) {
@@ -707,4 +775,5 @@
}
return false;
}
+
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2008-11-11 14:52:03 UTC (rev 11674)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2008-11-11 14:56:46 UTC (rev 11675)
@@ -60,6 +60,8 @@
INVALID_TEST_PACKAGE_NAME=Test package name "{0}" specified for Seam project "{1}" is not valid. Please correct this property in "Seam settings" page (Project->Properties->Seam Settings).
INVALID_CONNECTION_NAME=Connection profiler "{0}" specified for Seam project "{1}" does not exist.
+INVALID_XML_VERSION=XML schema version "{0}" does not match Seam runtime version "{1}".
+
#Invalid ear application.xml
INVALID_SEAM_JAR_MODULE_IN_APPLICATION_XML=jboss-seam.jar must be declared as <module><ejb>jboss-seam.jar</ejb><module> to work correctly.
INVALID_JAR_MODULE_IN_APPLICATION_XML=Having "{0}" listed as a java module in application.xml can cause publishing errors. It is recommended to remove this module entry from application.xml.
17 years, 5 months
JBoss Tools SVN: r11674 - trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-11 09:52:03 -0500 (Tue, 11 Nov 2008)
New Revision: 11674
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
Log:
JBIDE-2342
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-11-11 13:28:19 UTC (rev 11673)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2008-11-11 14:52:03 UTC (rev 11674)
@@ -54,20 +54,24 @@
}
//Let it work now for all 2.x versions
//If in future releases differences are essential, this should be modified
- int i20 = schemaLocation.indexOf("-2."); //$NON-NLS-1$
- int i21 = schemaLocation.indexOf("-2.1"); //$NON-NLS-1$
- if(i20 >= 0) {
+ int i20 = schemaLocation.indexOf("-2.0"); //$NON-NLS-1$
+ int i21 = schemaLocation.indexOf("-2."); //$NON-NLS-1$
+ if(i21 < 0 && i20 < 0) {
+ //Try the latest known version anyway.
+ i21 = 0;
+ }
+ if(i21 >= 0) {
if(isSingleComponent) {
- if(i21 >= 0) {
- return ENT_SEAM_COMPONENT_FILE_21;
+ if(i20 >= 0) {
+ return ENT_SEAM_COMPONENT_FILE_20;
}
- return ENT_SEAM_COMPONENT_FILE_20;
+ return ENT_SEAM_COMPONENT_FILE_21;
}
if(isMultiComponent(body)) {
- if(i21 >= 0) {
- return ENT_SEAM_COMPONENTS_21;
+ if(i20 >= 0) {
+ return ENT_SEAM_COMPONENTS_20;
}
- return ENT_SEAM_COMPONENTS_20;
+ return ENT_SEAM_COMPONENTS_21;
}
}
17 years, 5 months
JBoss Tools SVN: r11672 - trunk/as/docs/reference/en/images/perspective.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-11 08:27:49 -0500 (Tue, 11 Nov 2008)
New Revision: 11672
Added:
trunk/as/docs/reference/en/images/perspective/perspective_20_a.png
trunk/as/docs/reference/en/images/perspective/perspective_20_b.png
Log:
https://jira.jboss.org/jira/browse/JBDS-481 - adding new screens according to the Port preferences UI improvements;
Added: trunk/as/docs/reference/en/images/perspective/perspective_20_a.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/perspective/perspective_20_a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/perspective/perspective_20_b.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/perspective/perspective_20_b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months
JBoss Tools SVN: r11671 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-11 08:26:26 -0500 (Tue, 11 Nov 2008)
New Revision: 11671
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-481 - making changes in the guide according to the Port preferences UI improvements;
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-11-11 13:21:36 UTC (rev 11670)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-11-11 13:26:26 UTC (rev 11671)
@@ -16,11 +16,11 @@
Perspective</property>.</para>
<para>The <property>JBoss AS Perspective</property> is similar to the <property>Java
- Perspective</property>, but it contains a few additional views. Two of the additional views
- are standard views, specifically the <property>Console View</property> and the
+ Perspective</property>, but it contains a few additional views. Two of the additional
+ views are standard views, specifically the <property>Console View</property> and the
<property>Properties View</property>. The other two views that are added are the
<property>Project Archives View</property> and the <property>JBoss Server
- View</property>.</para>
+ View</property>.</para>
<section id="JBossServerView">
<?dbhtml filename="JBossServerView.html"?>
@@ -69,10 +69,11 @@
<property>Publish to the server</property>
</emphasis> button on the extreme right will republish any modules where it has
determined the workspace is out of sync with the server. It will attempt to do an
- incremental publish if it turns out that the module in question is capable of doing one.</para>
+ incremental publish if it turns out that the module in question is capable of doing
+ one.</para>
<para>Now, let's get to know with both of the <property>JBoss Server
- View</property> parts.</para>
+ View</property> parts.</para>
<section role="updated">
<title>Top Part of the JBoss Server View</title>
@@ -114,7 +115,7 @@
<entry align="center">
<para>The status which allows you to see if changes are
- awaiting</para>
+ awaiting</para>
</entry>
</row>
<row>
@@ -133,7 +134,7 @@
<entry align="center">
<para>The status which allows you to see if changes are
- in-sync</para>
+ in-sync</para>
</entry>
</row>
</tbody>
@@ -144,7 +145,8 @@
edit parts of that server. On the figure you can see that a username/password is
available in the UI when configuring the server. If you get an SecurityException
when trying to launch the server, it is most likely because your server is protected
- and hence you need to fill the username/password fields with appropriate values.</para>
+ and hence you need to fill the username/password fields with appropriate
+ values.</para>
<figure>
<title>Preferences Page for the Chosen Server</title>
@@ -161,19 +163,43 @@
using some custom configuration. For this purposes the <emphasis>
<property>Server Ports</property>
</emphasis> section in the <property>Server editor</property> is provided where the
- port settings are configurable.</para>
+ port settings are configurable. Click the <emphasis>
+ <property>Configure...</property>
+ </emphasis> link to bring up the wizard for adjusting the settings for the
+ Ports.</para>
- <para>The settings relating to <emphasis>
+ <figure>
+ <title>Server Ports Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_20_a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Press <emphasis>
+ <property>Edit XPath</property>
+ </emphasis> button for the chosen Port to configure its XPath's values.</para>
+
+ <figure>
+ <title>XPath Pattern for a Server Port</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_20_b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The settings related to <emphasis>
<property>Publishing</property>
</emphasis>, <emphasis>
<property>Timeouts</property>
</emphasis> or <emphasis>
<property>Server Polling</property>
- </emphasis> can also be adjusted here.</para>
+ </emphasis> can be also adjusted in the <property>Server editor</property>.</para>
- <para id="com_line_arg">In the <property>Server editor</property> it's possible
- to modify the server's launch configuration as well. It's just
- after clicking <emphasis>
+ <para id="com_line_arg"><property>Server editor</property> makes it also possible to
+ modify the server's launch configuration. It's just after clicking <emphasis>
<property>Open launch configuration</property>
</emphasis> link. In the open window there are the tabs for setting command line
arguments and other things that are relevant to launching the server.</para>
@@ -329,13 +355,14 @@
<section>
<title>Bottom Part of the JBoss Server View</title>
- <para>Here, we dwell on the bottom part of the <property>JBoss Server View</property>.</para>
+ <para>Here, we dwell on the bottom part of the <property>JBoss Server
+ View</property>.</para>
<para>First, we should say that the bottom part is meant to provide additional
functionality relevant to the server selected in the top part of the view. If a
standard server element is selected from above, some of the extensions may still
provide the additional information. Others may not. So, let's look at the
currently available extensions to the bottom part of the <property>JBoss Server
- View</property>.</para>
+ View</property>.</para>
<figure>
<title>View Extensions</title>
@@ -574,7 +601,8 @@
needs to be packaged in some way. In Java-related projects, many people use ANT. JBoss
Tools comes with our own Archives tool with a bit easier and less-verbose XML and a
handy user interface. The Project Archives plugin consists primarily of a view, that is
- <property>Project Archives View</property>, to set up each packaging configuration.</para>
+ <property>Project Archives View</property>, to set up each packaging
+ configuration.</para>
<para>So far, let's look through all functionality that the <property>Project
Archives View</property> provides.</para>
@@ -633,9 +661,9 @@
<note>
<title>Note:</title>
<para>If you see only JAR from the list of available archive types, you should
- verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR options are
- contributed by the AS Tools independently from webtools and the virtual
- project model. Thus, without them only JAR will show up.</para>
+ verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR
+ options are contributed by the AS Tools independently from webtools and the
+ virtual project model. Thus, without them only JAR will show up.</para>
</note>
<para><property>JAR</property> is the standard archive type, and does very little
@@ -773,7 +801,7 @@
<entry>
<para>The action means the ability to publish to a declared
- server</para>
+ server</para>
</entry>
</row>
@@ -817,7 +845,7 @@
to find more on how to build your applications with help of Ant.</para>
<para>At this point, you are guessed to be familiar with <property>JBoss AS
- Perspective</property> and your next step now is to explore how to work with
+ Perspective</property> and your next step now is to explore how to work with
different kinds of projects.</para>
</section>
17 years, 5 months