[jboss-svn-commits] JBL Code SVN: r13700 - labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Jul 22 04:59:42 EDT 2007
Author: arhan
Date: 2007-07-22 04:59:40 -0400 (Sun, 22 Jul 2007)
New Revision: 13700
Modified:
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionInsertFactWidget.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldWidget.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddCompositeConstraintOptionDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewActionDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewConditionDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewFactConstraintDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewInsertedFactFieldDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/CompositeFactPatternWidget.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/FactPatternWidget.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleAttributesDialog.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java
Log:
cleanup: Dialogs do not require FormsToolkit reference any more
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionInsertFactWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionInsertFactWidget.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionInsertFactWidget.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -84,7 +84,6 @@
link.addHyperlinkListener( new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
RuleDialog popup = new AddNewInsertedFactFieldDialog( shell,
- toolkit,
getModeller(),
fact );
popup.open();
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -9,7 +9,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* @author Anton Arhipov
@@ -20,16 +19,13 @@
private String[] fieldCompletions;
- private FormToolkit toolkit;
-
private RuleModeller modeller;
private ActionSetField field;
private String variableClass;
- public ActionSetFieldDialog(FormToolkit toolkit,
- Shell parent,
+ public ActionSetFieldDialog(Shell parent,
RuleModeller modeller,
ActionSetField field,
String[] fieldCompletions,
@@ -39,7 +35,6 @@
"Add a field" );
this.fieldCompletions = fieldCompletions;
- this.toolkit = toolkit;
this.modeller = modeller;
this.field = field;
this.variableClass = variableClass;
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldWidget.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/ActionSetFieldWidget.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -115,8 +115,7 @@
link.addHyperlinkListener( new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
- RuleDialog popup = new ActionSetFieldDialog( toolkit,
- parent.getShell(),
+ RuleDialog popup = new ActionSetFieldDialog( parent.getShell(),
getModeller(),
set,
fieldCompletions,
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddCompositeConstraintOptionDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddCompositeConstraintOptionDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddCompositeConstraintOptionDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -12,12 +12,9 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
public class AddCompositeConstraintOptionDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private RuleModeller modeller;
private FactPattern pattern;
@@ -25,7 +22,6 @@
private final CompositeFieldConstraint constraint;
public AddCompositeConstraintOptionDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller,
CompositeFieldConstraint constraint,
FactPattern pattern) {
@@ -33,7 +29,6 @@
"Add fields to this constriant",
"Pick the value from combo." );
- this.toolkit = toolkit;
this.modeller = modeller;
this.constraint = constraint;
this.pattern = pattern;
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewActionDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewActionDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewActionDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -17,7 +17,6 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* This provides a popup for new RHS action selection.
@@ -27,17 +26,13 @@
*/
public class AddNewActionDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private RuleModeller modeller;
public AddNewActionDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller) {
super( parent,
"Add a new action",
"Pick the values from combos and confirm the selection." );
- this.toolkit = toolkit;
this.modeller = modeller;
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewConditionDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewConditionDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewConditionDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -12,7 +12,6 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* This provides a popup for new LHS condition selection. (add new if-condition)
@@ -22,21 +21,17 @@
*/
public class AddNewConditionDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private IPattern pattern;
private RuleModeller modeller;
public AddNewConditionDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller) {
super( parent,
"Add new condition to the rule",
"Pick the values from combos and confirm the selection." );
- this.toolkit = toolkit;
this.modeller = modeller;
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewFactConstraintDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewFactConstraintDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewFactConstraintDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -10,7 +10,6 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* Adds new fact pattern to a composite fact
@@ -20,20 +19,16 @@
*/
public class AddNewFactConstraintDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private RuleModeller modeller;
private CompositeFactPattern pattern;
public AddNewFactConstraintDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller,
CompositeFactPattern pattern) {
super( parent,
"New fact pattern",
"Pick the value from combobox." );
- this.toolkit = toolkit;
this.modeller = modeller;
this.pattern = pattern;
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewInsertedFactFieldDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewInsertedFactFieldDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/AddNewInsertedFactFieldDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -10,7 +10,6 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
/**
*
@@ -20,20 +19,16 @@
*/
public class AddNewInsertedFactFieldDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private RuleModeller modeller;
private final ActionInsertFact fact;
public AddNewInsertedFactFieldDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller,
ActionInsertFact fact) {
super( parent,
"Add new condition to the rule",
"Pick the values from combos and confirm the selection." );
- this.toolkit = toolkit;
this.modeller = modeller;
this.fact = fact;
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/CompositeFactPatternWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/CompositeFactPatternWidget.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/CompositeFactPatternWidget.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -115,7 +115,6 @@
link.addHyperlinkListener( new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
RuleDialog popup = new AddNewFactConstraintDialog( parent.getShell(),
- toolkit,
getModeller(),
pattern );
popup.open();
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/FactPatternWidget.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/FactPatternWidget.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/FactPatternWidget.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -213,7 +213,6 @@
link.addHyperlinkListener( new IHyperlinkListener() {
public void linkActivated(HyperlinkEvent e) {
RuleDialog popup = new AddCompositeConstraintOptionDialog( parent.getShell(),
- toolkit,
getModeller(),
constraint,
pattern );
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleAttributesDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleAttributesDialog.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleAttributesDialog.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -13,22 +13,17 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.widgets.FormToolkit;
public class RuleAttributesDialog extends RuleDialog {
- private final FormToolkit toolkit;
-
private RuleModeller modeller;
public RuleAttributesDialog(Shell parent,
- FormToolkit toolkit,
RuleModeller modeller) {
super( parent,
"Add new option to the rule",
"Pick the value from combo." );
- this.toolkit = toolkit;
this.modeller = modeller;
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java 2007-07-21 22:31:13 UTC (rev 13699)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/rulebuilder/ui/RuleModeller.java 2007-07-22 08:59:40 UTC (rev 13700)
@@ -88,14 +88,11 @@
Shell shell = new Shell( Display.getCurrent() );
Window conditionPopup = new AddNewConditionDialog( shell,
- toolkit,
this );
Window actionPopup = new AddNewActionDialog( shell,
- toolkit,
this );
Window optionsPopup = new RuleAttributesDialog( shell,
- toolkit,
this );
Section ifSection = createMainSection( form,
More information about the jboss-svn-commits
mailing list