Automated merge with http://hg.netbeans.org/main merge_php_to_main
authorphejl@netbeans.org
Thu, 17 Apr 2008 15:50:14 +0200
changeset 308670a7a7550409
parent 3085 6ae8cd6d9920
parent 3084 eee38e31c20f
child 3088 ee68f3ce57a7
child 3089 67e3cc9f7dc2
Automated merge with http://hg.netbeans.org/main
bpel.core/src/org/netbeans/modules/bpel/core/resources/bpel-validation-annotation.xml
bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationAction.java
bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationAnnotation.java
bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationController.java
bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationListener.java
bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/utils/EditorUtil.java
bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/utils/HtmlNameManager.java
soa.ui/src/org/netbeans/modules/soa/ui/SoaUiUtil.java
soa.ui/src/org/netbeans/modules/soa/ui/util/Bundle.properties
soa.ui/src/org/netbeans/modules/soa/ui/util/Duration.java
soa.ui/src/org/netbeans/modules/soa/ui/util/DurationDialog.java
soa.ui/src/org/netbeans/modules/soa/ui/util/DurationUtil.java
soa.ui/src/org/netbeans/modules/soa/ui/util/UI.java
     1.1 --- a/bpel.core/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
     1.2 +++ b/bpel.core/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
     1.3 @@ -104,6 +104,15 @@
     1.4                      </run-dependency>
     1.5                  </dependency>
     1.6                  <dependency>
     1.7 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
     1.8 +                    <build-prerequisite/>
     1.9 +                    <compile-dependency/>
    1.10 +                    <run-dependency>
    1.11 +                        <release-version>1</release-version>
    1.12 +                        <specification-version>1.1</specification-version>
    1.13 +                    </run-dependency>
    1.14 +                </dependency>
    1.15 +                <dependency>
    1.16                      <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
    1.17                      <build-prerequisite/>
    1.18                      <compile-dependency/>
    1.19 @@ -262,13 +271,11 @@
    1.20                  <friend>org.netbeans.modules.bpel.debugger.ui</friend>
    1.21                  <friend>org.netbeans.modules.bpel.editors</friend>
    1.22                  <friend>org.netbeans.modules.bpel.mapper</friend>
    1.23 -                <friend>org.netbeans.modules.bpel.validation</friend>
    1.24                  <package>org.netbeans.modules.bpel.core</package>
    1.25                  <package>org.netbeans.modules.bpel.core.annotations</package>
    1.26 +                <package>org.netbeans.modules.bpel.core.debugger</package>
    1.27                  <package>org.netbeans.modules.bpel.core.helper.api</package>
    1.28                  <package>org.netbeans.modules.bpel.core.multiview.spi</package>
    1.29 -                <package>org.netbeans.modules.bpel.core.util</package>
    1.30 -                <package>org.netbeans.modules.bpel.core.debugger</package>
    1.31              </friend-packages>
    1.32          </data>
    1.33      </configuration>
     2.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataEditorSupport.java	Thu Apr 17 10:51:04 2008 +0200
     2.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataEditorSupport.java	Thu Apr 17 15:50:14 2008 +0200
     2.3 @@ -42,7 +42,8 @@
     2.4  import org.netbeans.core.spi.multiview.CloseOperationState;
     2.5  import org.netbeans.modules.bpel.core.multiview.BPELSourceMultiViewElementDesc;
     2.6  import org.netbeans.modules.bpel.core.multiview.BpelMultiViewSupport;
     2.7 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
     2.8 +import org.netbeans.modules.soa.validation.Controller;
     2.9 +import org.netbeans.modules.soa.validation.LineUtil;
    2.10  import org.netbeans.modules.bpel.model.api.BpelEntity;
    2.11  import org.netbeans.modules.bpel.model.api.BpelModel;
    2.12  import org.netbeans.modules.bpel.model.spi.BpelModelFactory;
    2.13 @@ -75,7 +76,7 @@
    2.14  import org.openide.windows.TopComponent;
    2.15  import org.openide.windows.WindowManager;
    2.16  import org.netbeans.modules.soa.ui.UndoRedoManagerProvider;
    2.17 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    2.18 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    2.19  import org.openide.cookies.SaveCookie;
    2.20  import org.openide.util.UserCancelException;
    2.21  
    2.22 @@ -132,7 +133,7 @@
    2.23      public void initializeCloneableEditor(CloneableEditor editor) {
    2.24          super.initializeCloneableEditor(editor);
    2.25  
    2.26 -        EventQueue.invokeLater(new Runnable() {
    2.27 +        EventQueue.invokeLater(new Runnable(){
    2.28              public void run() {
    2.29                  updateTitles();
    2.30              }
    2.31 @@ -167,12 +168,12 @@
    2.32      }
    2.33  
    2.34      public boolean validateXML(CookieObserver cookieObserver) {
    2.35 -        getValidationController().runValidation();
    2.36 -        return true;
    2.37 +      getValidationController().runValidation();
    2.38 +      return true;
    2.39      }
    2.40  
    2.41 -    public BPELValidationController getValidationController() {
    2.42 -      return (BPELValidationController) getEnv().getBpelDataObject().getLookup().lookup(BPELValidationController.class);
    2.43 +    private Controller getValidationController() {
    2.44 +      return (Controller) getEnv().getBpelDataObject().getLookup().lookup(Controller.class);
    2.45      }
    2.46  
    2.47      @Override
    2.48 @@ -443,7 +444,7 @@
    2.49                  else if (mvp.preferredID().equals(
    2.50                          BPELSourceMultiViewElementDesc.PREFERED_ID))
    2.51                  {
    2.52 -                    Line line = EditorUtil.getLine(resultItem);
    2.53 +                    Line line = LineUtil.getLine(resultItem);
    2.54  
    2.55                      if (line != null) {
    2.56                        line.show(Line.SHOW_GOTO);
     3.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataObject.java	Thu Apr 17 10:51:04 2008 +0200
     3.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataObject.java	Thu Apr 17 15:50:14 2008 +0200
     3.3 @@ -30,10 +30,10 @@
     3.4  import javax.swing.Action;
     3.5  import javax.xml.transform.Source;
     3.6  
     3.7 +import org.netbeans.modules.soa.validation.Controller;
     3.8  import org.netbeans.modules.bpel.core.annotations.impl.AnnotationManagerProvider;
     3.9  import org.netbeans.modules.bpel.core.helper.impl.BusinessProcessHelperImpl;
    3.10  import org.netbeans.modules.bpel.core.multiview.BpelMultiViewSupport;
    3.11 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
    3.12  import org.netbeans.modules.bpel.model.api.BpelModel;
    3.13  import org.netbeans.modules.xml.api.XmlFileEncodingQueryImpl;
    3.14  import org.netbeans.spi.xml.cookies.CheckXMLSupport;
    3.15 @@ -163,15 +163,15 @@
    3.16              
    3.17              // add lazy initialization
    3.18              InstanceContent.Convertor<Class, Object> conv = new InstanceContent.Convertor<Class, Object>() {
    3.19 -                private AtomicReference<BPELValidationController> valControllerRef = new AtomicReference<BPELValidationController>();
    3.20 +                private AtomicReference<Controller> valControllerRef = new AtomicReference<Controller>();
    3.21                  
    3.22                  public Object convert(Class obj) {
    3.23                      if (obj == BpelModel.class) {
    3.24                          return getEditorSupport().getBpelModel();
    3.25                      }
    3.26                      
    3.27 -                    if (obj == BPELValidationController.class) {
    3.28 -                        valControllerRef.compareAndSet(null, new BPELValidationController(getEditorSupport().getBpelModel()));
    3.29 +                    if (obj == Controller.class) {
    3.30 +                        valControllerRef.compareAndSet(null, new Controller(getEditorSupport().getBpelModel()));
    3.31                          return valControllerRef.get();
    3.32                      }
    3.33                      return null;
    3.34 @@ -189,7 +189,7 @@
    3.35                      return obj.getName();
    3.36                  }
    3.37              };
    3.38 -            list.add(Lookups.fixed(new Class[] {BpelModel.class, BPELValidationController.class}, conv));
    3.39 +            list.add(Lookups.fixed(new Class[] {BpelModel.class, Controller.class}, conv));
    3.40              lookup = new ProxyLookup(list.toArray(new Lookup[list.size()]));
    3.41  
    3.42              myLookup.compareAndSet(null, lookup);
     4.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BPELSourceMultiViewElement.java	Thu Apr 17 10:51:04 2008 +0200
     4.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BPELSourceMultiViewElement.java	Thu Apr 17 15:50:14 2008 +0200
     4.3 @@ -36,16 +36,16 @@
     4.4  import javax.swing.text.Document;
     4.5  import javax.swing.text.StyledDocument;
     4.6  
     4.7 +import org.netbeans.modules.soa.validation.Controller;
     4.8  import org.netbeans.core.spi.multiview.CloseOperationState;
     4.9  import org.netbeans.core.spi.multiview.MultiViewElement;
    4.10  import org.netbeans.core.spi.multiview.MultiViewElementCallback;
    4.11  import org.netbeans.core.spi.multiview.MultiViewFactory;
    4.12  import org.netbeans.modules.bpel.core.BPELDataEditorSupport;
    4.13  import org.netbeans.modules.bpel.core.BPELDataObject;
    4.14 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
    4.15  import org.netbeans.modules.bpel.editors.api.nodes.FactoryAccess;
    4.16  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    4.17 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    4.18 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    4.19  import org.netbeans.modules.bpel.model.api.BpelEntity;
    4.20  import org.netbeans.modules.bpel.model.api.BpelModel;
    4.21  import org.netbeans.modules.bpel.model.api.events.ArrayUpdateEvent;
    4.22 @@ -185,11 +185,11 @@
    4.23          setCaretAssocActiveNodes();
    4.24          BPELDataEditorSupport editor = getDataObject().getEditorSupport();
    4.25          editor.addUndoManagerToDocument();
    4.26 -//        getValidationController().triggerValidation();
    4.27 +//      getValidationController().triggerValidation();
    4.28      }
    4.29      
    4.30 -    private BPELValidationController getValidationController() {
    4.31 -      return (BPELValidationController) getDataObject().getLookup().lookup(BPELValidationController.class);
    4.32 +    private Controller getValidationController() {
    4.33 +      return (Controller) getDataObject().getLookup().lookup(Controller.class);
    4.34      }
    4.35      
    4.36      public void componentClosed() {
     5.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/resources/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
     5.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/resources/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
     5.3 @@ -11,9 +11,9 @@
     5.4  # http://www.netbeans.org/cddl-gplv2.html
     5.5  # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
     5.6  # specific language governing permissions and limitations under the
     5.7 -# License.  When distributing the software, include this License Header
     5.8 +# License. When distributing the software, include this License Header
     5.9  # Notice in each file and include the License file at
    5.10 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    5.11 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
    5.12  # particular file as subject to the "Classpath" exception as provided
    5.13  # by Sun in the GPL Version 2 section of the License file that
    5.14  # accompanied this code. If applicable, add the following below the
    5.15 @@ -39,4 +39,3 @@
    5.16  # made subject to such option by the copyright holder.
    5.17  
    5.18  Services/MIMEResolver/org-netbeans-modules-bpel-core-mime-resolver.xml=BPEL Process Definition Files
    5.19 -LBL_bpel_validation_annotation=BPEL Validation
     6.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/resources/bpel-validation-annotation.xml	Thu Apr 17 10:51:04 2008 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,52 +0,0 @@
     6.4 -<?xml version="1.0" encoding="UTF-8"?>
     6.5 -<!--
     6.6 -  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     6.7 -
     6.8 -  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     6.9 -
    6.10 -  The contents of this file are subject to the terms of either the GNU
    6.11 -  General Public License Version 2 only ("GPL") or the Common
    6.12 -  Development and Distribution License("CDDL") (collectively, the
    6.13 -  "License"). You may not use this file except in compliance with the
    6.14 -  License. You can obtain a copy of the License at
    6.15 -  http://www.netbeans.org/cddl-gplv2.html
    6.16 -  or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    6.17 -  specific language governing permissions and limitations under the
    6.18 -  License.  When distributing the software, include this License Header
    6.19 -  Notice in each file and include the License file at
    6.20 -  nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    6.21 -  particular file as subject to the "Classpath" exception as provided
    6.22 -  by Sun in the GPL Version 2 section of the License file that
    6.23 -  accompanied this code. If applicable, add the following below the
    6.24 -  License Header, with the fields enclosed by brackets [] replaced by
    6.25 -  your own identifying information:
    6.26 -  "Portions Copyrighted [year] [name of copyright owner]"
    6.27 -
    6.28 -  Contributor(s):
    6.29 -
    6.30 -  The Original Software is NetBeans. The Initial Developer of the Original
    6.31 -  Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    6.32 -  Microsystems, Inc. All Rights Reserved.
    6.33 -
    6.34 -  If you wish your version of this file to be governed by only the CDDL
    6.35 -  or only the GPL Version 2, indicate your decision by adding
    6.36 -  "[Contributor] elects to include this software in this distribution
    6.37 -  under the [CDDL or GPL Version 2] license." If you do not indicate a
    6.38 -  single choice of license, a recipient has the option to distribute
    6.39 -  your version of this file under either the CDDL, the GPL Version 2 or
    6.40 -  to extend the choice of license to its licensees as provided above.
    6.41 -  However, if you add GPL Version 2 code and therefore, elected the GPL
    6.42 -  Version 2 license, then the option applies only if the new code is
    6.43 -  made subject to such option by the copyright holder.
    6.44 --->
    6.45 -<!DOCTYPE type PUBLIC "-//NetBeans//DTD annotation type 1.0//EN" "http://www.netbeans.org/dtds/annotation-type-1_0.dtd">
    6.46 -
    6.47 -<type
    6.48 -    name="bpel-validation-annotation"
    6.49 -    description_key="LBL_bpel_validation_annotation"
    6.50 -    localizing_bundle="org.netbeans.modules.bpel.core.resources.Bundle"
    6.51 -    glyph="nbresloc:/org/netbeans/modules/bpel/design/decoration/resources/error.png"
    6.52 -    waveunderline="#FF00FF"
    6.53 -    type="linepart"
    6.54 -    visible="true"
    6.55 -/>
     7.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/resources/layer.xml	Thu Apr 17 10:51:04 2008 +0200
     7.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/resources/layer.xml	Thu Apr 17 15:50:14 2008 +0200
     7.3 @@ -12,9 +12,9 @@
     7.4    http://www.netbeans.org/cddl-gplv2.html
     7.5    or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
     7.6    specific language governing permissions and limitations under the
     7.7 -  License.  When distributing the software, include this License Header
     7.8 +  License. When distributing the software, include this License Header
     7.9    Notice in each file and include the License file at
    7.10 -  nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    7.11 +  nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
    7.12    particular file as subject to the "Classpath" exception as provided
    7.13    by Sun in the GPL Version 2 section of the License file that
    7.14    accompanied this code. If applicable, add the following below the
    7.15 @@ -41,12 +41,6 @@
    7.16  -->
    7.17  <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
    7.18  <filesystem>
    7.19 -    <folder name="Editors">
    7.20 -        <folder name="AnnotationTypes">
    7.21 -            <file name="bpel-validation-annotation.xml" url="bpel-validation-annotation.xml"/>
    7.22 -        </folder>
    7.23 -    </folder>    
    7.24 -
    7.25      <folder name="Templates">
    7.26          <folder name="SOA_BPEL">
    7.27              <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.bpel.core.wizard.Bundle"/>
     8.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationAction.java	Thu Apr 17 10:51:04 2008 +0200
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,63 +0,0 @@
     8.4 -/*
     8.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     8.6 - *
     8.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     8.8 - *
     8.9 - * The contents of this file are subject to the terms of either the GNU
    8.10 - * General Public License Version 2 only ("GPL") or the Common
    8.11 - * Development and Distribution License("CDDL") (collectively, the
    8.12 - * "License"). You may not use this file except in compliance with the
    8.13 - * License. You can obtain a copy of the License at
    8.14 - * http://www.netbeans.org/cddl-gplv2.html
    8.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    8.16 - * specific language governing permissions and limitations under the
    8.17 - * License.  When distributing the software, include this License Header
    8.18 - * Notice in each file and include the License file at
    8.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    8.20 - * particular file as subject to the "Classpath" exception as provided
    8.21 - * by Sun in the GPL Version 2 section of the License file that
    8.22 - * accompanied this code. If applicable, add the following below the
    8.23 - * License Header, with the fields enclosed by brackets [] replaced by
    8.24 - * your own identifying information:
    8.25 - * "Portions Copyrighted [year] [name of copyright owner]"
    8.26 - *
    8.27 - * Contributor(s):
    8.28 - *
    8.29 - * The Original Software is NetBeans. The Initial Developer of the Original
    8.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    8.31 - * Microsystems, Inc. All Rights Reserved.
    8.32 - *
    8.33 - * If you wish your version of this file to be governed by only the CDDL
    8.34 - * or only the GPL Version 2, indicate your decision by adding
    8.35 - * "[Contributor] elects to include this software in this distribution
    8.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
    8.37 - * single choice of license, a recipient has the option to distribute
    8.38 - * your version of this file under either the CDDL, the GPL Version 2 or
    8.39 - * to extend the choice of license to its licensees as provided above.
    8.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
    8.41 - * Version 2 license, then the option applies only if the new code is
    8.42 - * made subject to such option by the copyright holder.
    8.43 - */
    8.44 -package org.netbeans.modules.bpel.core.util;
    8.45 -
    8.46 -import java.awt.event.ActionEvent;
    8.47 -import org.netbeans.modules.xml.validation.ValidateAction;
    8.48 -
    8.49 -/**
    8.50 - * @author Vladimir Yaroslavskiy
    8.51 - * @version 2008.04.15
    8.52 - */
    8.53 -public final class BPELValidationAction extends ValidateAction {
    8.54 -        
    8.55 -  public BPELValidationAction(BPELValidationController controller) {
    8.56 -    super(null);
    8.57 -    myController = controller;
    8.58 -  }
    8.59 -
    8.60 -  @Override
    8.61 -  public void actionPerformed(ActionEvent event) {
    8.62 -    myController.startValidation();
    8.63 -  }
    8.64 -
    8.65 -  private BPELValidationController myController;
    8.66 -}
     9.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationAnnotation.java	Thu Apr 17 10:51:04 2008 +0200
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,90 +0,0 @@
     9.4 -/*
     9.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     9.6 - *
     9.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
     9.8 - *
     9.9 - * The contents of this file are subject to the terms of either the GNU
    9.10 - * General Public License Version 2 only ("GPL") or the Common
    9.11 - * Development and Distribution License("CDDL") (collectively, the
    9.12 - * "License"). You may not use this file except in compliance with the
    9.13 - * License. You can obtain a copy of the License at
    9.14 - * http://www.netbeans.org/cddl-gplv2.html
    9.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    9.16 - * specific language governing permissions and limitations under the
    9.17 - * License.  When distributing the software, include this License Header
    9.18 - * Notice in each file and include the License file at
    9.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
    9.20 - * particular file as subject to the "Classpath" exception as provided
    9.21 - * by Sun in the GPL Version 2 section of the License file that
    9.22 - * accompanied this code. If applicable, add the following below the
    9.23 - * License Header, with the fields enclosed by brackets [] replaced by
    9.24 - * your own identifying information:
    9.25 - * "Portions Copyrighted [year] [name of copyright owner]"
    9.26 - *
    9.27 - * Contributor(s):
    9.28 - *
    9.29 - * The Original Software is NetBeans. The Initial Developer of the Original
    9.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
    9.31 - * Microsystems, Inc. All Rights Reserved.
    9.32 - *
    9.33 - * If you wish your version of this file to be governed by only the CDDL
    9.34 - * or only the GPL Version 2, indicate your decision by adding
    9.35 - * "[Contributor] elects to include this software in this distribution
    9.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
    9.37 - * single choice of license, a recipient has the option to distribute
    9.38 - * your version of this file under either the CDDL, the GPL Version 2 or
    9.39 - * to extend the choice of license to its licensees as provided above.
    9.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
    9.41 - * Version 2 license, then the option applies only if the new code is
    9.42 - * made subject to such option by the copyright holder.
    9.43 - */
    9.44 -package org.netbeans.modules.bpel.core.util;
    9.45 -
    9.46 -import java.beans.PropertyChangeEvent;
    9.47 -import java.beans.PropertyChangeListener;
    9.48 -
    9.49 -import org.openide.text.Annotatable;
    9.50 -import org.openide.text.Annotation;
    9.51 -import org.openide.text.Line;
    9.52 -
    9.53 -/**
    9.54 - * @author Vladimir Yaroslavskiy
    9.55 - * @version 2008.02.01
    9.56 - */
    9.57 -final class BPELValidationAnnotation extends Annotation implements PropertyChangeListener {
    9.58 -    
    9.59 -  public BPELValidationAnnotation(Annotatable annotatable, String message) {
    9.60 -    myMessage = message;
    9.61 -
    9.62 -    if (annotatable != null) {
    9.63 -//    if (annotatable instanceof Line.Part) {
    9.64 -//      Line.Part part = (Line.Part) annotatable;
    9.65 -//      System.out.println(" *** attach: " + part.getColumn() + ":" + part.getLength());
    9.66 -//    }
    9.67 -      attach(annotatable);
    9.68 -      annotatable.addPropertyChangeListener(this);
    9.69 -    }
    9.70 -  }
    9.71 -
    9.72 -  public String getAnnotationType() {
    9.73 -    return "bpel-validation-annotation"; // NOI18N
    9.74 -  }
    9.75 -  
    9.76 -  public String getShortDescription() {
    9.77 -    return myMessage;
    9.78 -  }
    9.79 -  
    9.80 -  public void propertyChange( PropertyChangeEvent propertyChangeEvent ) {
    9.81 -    if (Annotatable.PROP_ANNOTATION_COUNT.equals(propertyChangeEvent.getPropertyName())) {
    9.82 -      return;
    9.83 -    }
    9.84 -    Annotatable annotatable = (Annotatable) propertyChangeEvent.getSource();
    9.85 -
    9.86 -    if (annotatable != null) {
    9.87 -      annotatable.removePropertyChangeListener(this);
    9.88 -      detach();
    9.89 -    }
    9.90 -  }
    9.91 -
    9.92 -  private String myMessage;
    9.93 -}
    10.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationController.java	Thu Apr 17 10:51:04 2008 +0200
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,260 +0,0 @@
    10.4 -/*
    10.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    10.6 - *
    10.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    10.8 - *
    10.9 - * The contents of this file are subject to the terms of either the GNU
   10.10 - * General Public License Version 2 only ("GPL") or the Common
   10.11 - * Development and Distribution License("CDDL") (collectively, the
   10.12 - * "License"). You may not use this file except in compliance with the
   10.13 - * License. You can obtain a copy of the License at
   10.14 - * http://www.netbeans.org/cddl-gplv2.html
   10.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   10.16 - * specific language governing permissions and limitations under the
   10.17 - * License.  When distributing the software, include this License Header
   10.18 - * Notice in each file and include the License file at
   10.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   10.20 - * particular file as subject to the "Classpath" exception as provided
   10.21 - * by Sun in the GPL Version 2 section of the License file that
   10.22 - * accompanied this code. If applicable, add the following below the
   10.23 - * License Header, with the fields enclosed by brackets [] replaced by
   10.24 - * your own identifying information:
   10.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   10.26 - *
   10.27 - * Contributor(s):
   10.28 - *
   10.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   10.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
   10.31 - * Microsystems, Inc. All Rights Reserved.
   10.32 - *
   10.33 - * If you wish your version of this file to be governed by only the CDDL
   10.34 - * or only the GPL Version 2, indicate your decision by adding
   10.35 - * "[Contributor] elects to include this software in this distribution
   10.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   10.37 - * single choice of license, a recipient has the option to distribute
   10.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   10.39 - * to extend the choice of license to its licensees as provided above.
   10.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   10.41 - * Version 2 license, then the option applies only if the new code is
   10.42 - * made subject to such option by the copyright holder.
   10.43 - */
   10.44 -package org.netbeans.modules.bpel.core.util;
   10.45 -
   10.46 -import java.util.HashMap;
   10.47 -import java.util.LinkedList;
   10.48 -import java.util.List;
   10.49 -import java.util.Map;
   10.50 -import java.util.Timer;
   10.51 -import java.util.TimerTask;
   10.52 -import java.util.WeakHashMap;
   10.53 -
   10.54 -import org.openide.text.Line;
   10.55 -import org.netbeans.modules.xml.validation.ValidateAction;
   10.56 -import org.netbeans.modules.xml.validation.ValidateAction.RunAction;
   10.57 -import org.netbeans.modules.xml.validation.ValidationOutputWindowController;
   10.58 -import org.netbeans.modules.xml.xam.Model;
   10.59 -import org.netbeans.modules.xml.xam.ComponentEvent;
   10.60 -import org.netbeans.modules.xml.xam.ComponentListener;
   10.61 -
   10.62 -import org.netbeans.modules.xml.xam.spi.Validation;
   10.63 -import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
   10.64 -import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
   10.65 -import org.netbeans.modules.xml.xam.spi.Validator.ResultType;
   10.66 -
   10.67 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   10.68 -import static org.netbeans.modules.soa.ui.util.UI.*;
   10.69 -
   10.70 -/**
   10.71 - * @author Vladimir Yaroslavskiy
   10.72 - * @version 2008.01.17
   10.73 - */
   10.74 -public final class BPELValidationController implements ComponentListener {
   10.75 -    
   10.76 -  public BPELValidationController(Model model) {
   10.77 -    myModel = model;
   10.78 -    myTimer = new Timer();
   10.79 -    myListeners = new WeakHashMap<BPELValidationListener, Object>();
   10.80 -    myAnnotations = new LinkedList<BPELValidationAnnotation>();
   10.81 -    myValidationResult = new LinkedList<ResultItem>();
   10.82 -  }
   10.83 -
   10.84 -  public void attach() {
   10.85 -    myModel.addComponentListener(this);
   10.86 -  }
   10.87 -
   10.88 -  public void detach() {
   10.89 -    myModel.removeComponentListener(this);
   10.90 -  }
   10.91 -
   10.92 -  public void addValidationListener(BPELValidationListener listener) {
   10.93 -    synchronized(myListeners) {
   10.94 -      myListeners.put(listener, null);
   10.95 -    }
   10.96 -  }
   10.97 -  
   10.98 -  public void removeValidationListener(BPELValidationListener listener) {
   10.99 -    synchronized(myListeners) {
  10.100 -      myListeners.remove(listener);
  10.101 -    }
  10.102 -  }
  10.103 -  
  10.104 -  public List<ResultItem> getValidationResult() {
  10.105 -    return myValidationResult;
  10.106 -  }
  10.107 -
  10.108 -  public void startValidation() {
  10.109 -    log();
  10.110 -    log("START ..."); // NOI18N
  10.111 -    doValidation(true, true);
  10.112 -  }
  10.113 -
  10.114 -  public void runValidation() {
  10.115 -    log();
  10.116 -    log("RUN ..."); // NOI18N
  10.117 -    doValidation(true, false);
  10.118 -  }
  10.119 -
  10.120 -  public void triggerValidation() {
  10.121 -//stackTrace();
  10.122 -    log();
  10.123 -    log("TIMER-TRIGGER"); // NOI18N
  10.124 -    log();
  10.125 -
  10.126 -    cancelTimer();
  10.127 -    myTimer.schedule(new TimerTask() {
  10.128 -      public void run() {
  10.129 -        doValidation(false, false);
  10.130 -      }
  10.131 -    },
  10.132 -    DELAY);
  10.133 -  }
  10.134 -
  10.135 -  private synchronized void doValidation(boolean isComplete, boolean isOutput) {
  10.136 -    cancelTimer();
  10.137 -
  10.138 -    List<ResultItem> items;
  10.139 -    ValidationType type;
  10.140 -
  10.141 -    if (isComplete) {
  10.142 -      Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
  10.143 -      type = ValidationType.COMPLETE;
  10.144 -    }
  10.145 -    else {
  10.146 -      Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
  10.147 -      type = ValidationType.PARTIAL;
  10.148 -    }
  10.149 -    log();
  10.150 -    log("VALIDATION: " + type); // NOI18N
  10.151 -    startTimeln();
  10.152 -
  10.153 -    if (isOutput) {
  10.154 -      RunAction action = new ValidateAction(myModel).new RunAction();
  10.155 -      action.run();
  10.156 -      items = action.getValidationResults();
  10.157 -    }
  10.158 -    else {
  10.159 -      if (isComplete) {
  10.160 -        items = new ValidationOutputWindowController().validate(myModel);
  10.161 -      }
  10.162 -      else {
  10.163 -        Validation validation = new Validation();
  10.164 -        validation.validate(myModel, type);
  10.165 -        items = validation.getValidationResult();
  10.166 -      }
  10.167 -    }
  10.168 -    endTime("validation"); // NOI18N
  10.169 -    log("."); // NOI18N
  10.170 -
  10.171 -    notifyListeners(items);
  10.172 -  }
  10.173 -
  10.174 -  private void cancelTimer() {
  10.175 -    myTimer.cancel();
  10.176 -    myTimer = new Timer();
  10.177 -  }
  10.178 -
  10.179 -  private void notifyListeners(List<ResultItem> items) {
  10.180 -    myValidationResult = new LinkedList<ResultItem>();
  10.181 -
  10.182 -    synchronized (items) {
  10.183 -      for (ResultItem item : items) {
  10.184 -        myValidationResult.add(item);
  10.185 -      }
  10.186 -    }
  10.187 -    synchronized (myListeners) {
  10.188 -      for (BPELValidationListener listener : myListeners.keySet()) {
  10.189 -        if (listener != null) {
  10.190 -          listener.validationUpdated(myValidationResult);
  10.191 -        }
  10.192 -      }
  10.193 -    }
  10.194 -    showAnnotations();
  10.195 -  }
  10.196 -  
  10.197 -  private void showAnnotations() {
  10.198 -    synchronized (myAnnotations) {
  10.199 -      for (BPELValidationAnnotation annotation : myAnnotations) {
  10.200 -        annotation.detach();
  10.201 -      }
  10.202 -//out();
  10.203 -//out("SHOW ANNOTATION IN EDITOR");
  10.204 -      myAnnotations.clear();
  10.205 -      Map<Line.Part, List<ResultItem>> map = new HashMap<Line.Part, List<ResultItem>>();
  10.206 -  
  10.207 -      for (ResultItem item : myValidationResult) {
  10.208 -        if (item.getType() != ResultType.ERROR) {
  10.209 -          continue;
  10.210 -        }
  10.211 -        Line.Part part = EditorUtil.getLinePart(item);
  10.212 -
  10.213 -        if (part == null) {
  10.214 -          continue;
  10.215 -        }
  10.216 -        List<ResultItem> list = map.get(part);
  10.217 -
  10.218 -        if (list == null) {
  10.219 -          list = new LinkedList<ResultItem>();
  10.220 -          map.put(part, list);
  10.221 -        }
  10.222 -        list.add(item);
  10.223 -      }
  10.224 -      for (Line.Part part : map.keySet()) {
  10.225 -        StringBuilder description = new StringBuilder();
  10.226 -        List<ResultItem> list = map.get(part);
  10.227 -
  10.228 -        for (int i=0; i < list.size(); i++) {
  10.229 -          description.append(list.get(i).getDescription());
  10.230 -          
  10.231 -          if (i < list.size() - 1) {
  10.232 -            description.append("\n\n"); // NOI18N
  10.233 -          }
  10.234 -        }
  10.235 -        myAnnotations.add(new BPELValidationAnnotation(part, description.toString()));
  10.236 -      }
  10.237 -    }
  10.238 -  }
  10.239 -
  10.240 -  public void valueChanged(ComponentEvent event) {
  10.241 -//out("CHANGED");
  10.242 -    triggerValidation();
  10.243 -  }
  10.244 -  
  10.245 -  public void childrenAdded(ComponentEvent event) {
  10.246 -//out("ADDED");
  10.247 -    triggerValidation();
  10.248 -  }
  10.249 -  
  10.250 -  public void childrenDeleted(ComponentEvent event) {
  10.251 -//out("DELETED");
  10.252 -    triggerValidation();
  10.253 -  }
  10.254 -  
  10.255 -  private Model myModel;
  10.256 -  private Timer myTimer;
  10.257 -  private List<ResultItem> myValidationResult;
  10.258 -  private List<BPELValidationAnnotation> myAnnotations;
  10.259 -  private Map<BPELValidationListener, Object> myListeners;
  10.260 -
  10.261 -  // vlv
  10.262 -  private static final long DELAY = 5432L;
  10.263 -}
    11.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/util/BPELValidationListener.java	Thu Apr 17 10:51:04 2008 +0200
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,27 +0,0 @@
    11.4 -/*
    11.5 - * The contents of this file are subject to the terms of the Common Development
    11.6 - * and Distribution License (the License). You may not use this file except in
    11.7 - * compliance with the License.
    11.8 - * 
    11.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
   11.10 - * or http://www.netbeans.org/cddl.txt.
   11.11 - * 
   11.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
   11.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
   11.14 - * If applicable, add the following below the CDDL Header, with the fields
   11.15 - * enclosed by brackets [] replaced by your own identifying information:
   11.16 - * "Portions Copyrighted [year] [name of copyright owner]"
   11.17 - * 
   11.18 - * The Original Software is NetBeans. The Initial Developer of the Original
   11.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   11.20 - * Microsystems, Inc. All Rights Reserved.
   11.21 - */
   11.22 -package org.netbeans.modules.bpel.core.util;
   11.23 -
   11.24 -import java.util.List;
   11.25 -import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
   11.26 -
   11.27 -public interface BPELValidationListener {
   11.28 -
   11.29 -  void validationUpdated(List<ResultItem> result);
   11.30 -}
    12.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/wizard/NewBpelFileIterator.java	Thu Apr 17 10:51:04 2008 +0200
    12.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/wizard/NewBpelFileIterator.java	Thu Apr 17 15:50:14 2008 +0200
    12.3 @@ -68,7 +68,7 @@
    12.4  import org.netbeans.modules.bpel.model.api.support.Utils;
    12.5  import org.openide.ErrorManager;
    12.6  import org.netbeans.api.queries.FileEncodingQuery;
    12.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    12.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    12.9  
   12.10  /**
   12.11   * A template wizard iterator (sequence of panels).
   12.12 @@ -120,7 +120,7 @@
   12.13        if (data == null) {
   12.14          return Collections.emptySet();
   12.15        }
   12.16 -      SoaUiUtil.fixEncoding(data, dir);
   12.17 +      SoaUtil.fixEncoding(data, dir);
   12.18        
   12.19        return Collections.singleton(data);
   12.20      }
    13.1 --- a/bpel.editors.api/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
    13.2 +++ b/bpel.editors.api/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
    13.3 @@ -178,7 +178,6 @@
    13.4                  <package>org.netbeans.modules.bpel.editors.api.nodes.actions</package>
    13.5                  <package>org.netbeans.modules.bpel.editors.api.nodes.images</package>
    13.6                  <package>org.netbeans.modules.bpel.editors.api.ui.valid</package>
    13.7 -                <package>org.netbeans.modules.bpel.editors.api.utils</package>
    13.8              </friend-packages>
    13.9          </data>
   13.10      </configuration>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/EditorUtil.java	Thu Apr 17 15:50:14 2008 +0200
    14.3 @@ -0,0 +1,1158 @@
    14.4 +/*
    14.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    14.6 + *
    14.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    14.8 + *
    14.9 + * The contents of this file are subject to the terms of either the GNU
   14.10 + * General Public License Version 2 only ("GPL") or the Common
   14.11 + * Development and Distribution License("CDDL") (collectively, the
   14.12 + * "License"). You may not use this file except in compliance with the
   14.13 + * License. You can obtain a copy of the License at
   14.14 + * http://www.netbeans.org/cddl-gplv2.html
   14.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   14.16 + * specific language governing permissions and limitations under the
   14.17 + * License.  When distributing the software, include this License Header
   14.18 + * Notice in each file and include the License file at
   14.19 + * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   14.20 + * particular file as subject to the "Classpath" exception as provided
   14.21 + * by Sun in the GPL Version 2 section of the License file that
   14.22 + * accompanied this code. If applicable, add the following below the
   14.23 + * License Header, with the fields enclosed by brackets [] replaced by
   14.24 + * your own identifying information:
   14.25 + * "Portions Copyrighted [year] [name of copyright owner]"
   14.26 + *
   14.27 + * Contributor(s):
   14.28 + *
   14.29 + * The Original Software is NetBeans. The Initial Developer of the Original
   14.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   14.31 + * Microsystems, Inc. All Rights Reserved.
   14.32 + *
   14.33 + * If you wish your version of this file to be governed by only the CDDL
   14.34 + * or only the GPL Version 2, indicate your decision by adding
   14.35 + * "[Contributor] elects to include this software in this distribution
   14.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   14.37 + * single choice of license, a recipient has the option to distribute
   14.38 + * your version of this file under either the CDDL, the GPL Version 2 or
   14.39 + * to extend the choice of license to its licensees as provided above.
   14.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   14.41 + * Version 2 license, then the option applies only if the new code is
   14.42 + * made subject to such option by the copyright holder.
   14.43 + */
   14.44 +package org.netbeans.modules.bpel.editors.api;
   14.45 +
   14.46 +import java.beans.BeanInfo;
   14.47 +import java.util.ArrayList;
   14.48 +import java.util.HashMap;
   14.49 +import java.util.List;
   14.50 +import java.util.Map;
   14.51 +import java.util.regex.Matcher;
   14.52 +import java.util.regex.Pattern;
   14.53 +import javax.swing.Icon;
   14.54 +import javax.swing.ImageIcon;
   14.55 +import javax.swing.SwingUtilities;
   14.56 +import javax.swing.text.AbstractDocument;
   14.57 +import javax.swing.text.BadLocationException;
   14.58 +import javax.swing.text.StyledDocument;
   14.59 +
   14.60 +import org.w3c.dom.Element;
   14.61 +import org.w3c.dom.NodeList;
   14.62 +
   14.63 +import org.netbeans.core.api.multiview.MultiViewHandler;
   14.64 +import org.netbeans.core.api.multiview.MultiViewPerspective;
   14.65 +import org.netbeans.core.api.multiview.MultiViews;
   14.66 +import org.netbeans.modules.xml.xam.ui.highlight.Highlight;
   14.67 +import org.netbeans.modules.xml.xam.ui.highlight.HighlightGroup;
   14.68 +import org.netbeans.modules.xml.xam.ui.highlight.HighlightManager;
   14.69 +import org.netbeans.modules.xml.schema.ui.basic.SchemaColumnsView;
   14.70 +import org.netbeans.modules.xml.schema.ui.basic.SchemaTreeView;
   14.71 +import org.netbeans.modules.xml.validation.ShowCookie;
   14.72 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
   14.73 +import org.netbeans.modules.bpel.editors.api.BpelEditorConstants;
   14.74 +import org.netbeans.modules.bpel.editors.api.Constants.VariableStereotype;
   14.75 +import org.netbeans.modules.bpel.editors.api.nodes.FactoryAccess;
   14.76 +import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   14.77 +import org.netbeans.modules.bpel.model.api.AbstractVariableDeclaration;
   14.78 +import org.netbeans.modules.bpel.model.api.Assign;
   14.79 +import org.netbeans.modules.bpel.model.api.BooleanExpr;
   14.80 +import org.netbeans.modules.bpel.model.api.BpelEntity;
   14.81 +import org.netbeans.modules.bpel.model.api.Catch;
   14.82 +import org.netbeans.modules.bpel.model.api.CompensatableActivityHolder;
   14.83 +import org.netbeans.modules.bpel.model.api.Compensate;
   14.84 +import org.netbeans.modules.bpel.model.api.CompensateScope;
   14.85 +import org.netbeans.modules.bpel.model.api.CompensationHandler;
   14.86 +import org.netbeans.modules.bpel.model.api.CompletionCondition;
   14.87 +import org.netbeans.modules.bpel.model.api.CompositeActivity;
   14.88 +import org.netbeans.modules.bpel.model.api.Copy;
   14.89 +import org.netbeans.modules.bpel.model.api.Correlation;
   14.90 +import org.netbeans.modules.bpel.model.api.CorrelationSet;
   14.91 +import org.netbeans.modules.bpel.model.api.CorrelationSetContainer;
   14.92 +import org.netbeans.modules.bpel.model.api.Else;
   14.93 +import org.netbeans.modules.bpel.model.api.ElseIf;
   14.94 +import org.netbeans.modules.bpel.model.api.Empty;
   14.95 +import org.netbeans.modules.bpel.model.api.EventHandlers;
   14.96 +import org.netbeans.modules.bpel.model.api.Exit;
   14.97 +import org.netbeans.modules.bpel.model.api.FaultHandlers;
   14.98 +import org.netbeans.modules.bpel.model.api.Flow;
   14.99 +import org.netbeans.modules.bpel.model.api.ForEach;
  14.100 +import org.netbeans.modules.bpel.model.api.From;
  14.101 +import org.netbeans.modules.bpel.model.api.FromPart;
  14.102 +import org.netbeans.modules.bpel.model.api.If;
  14.103 +import org.netbeans.modules.bpel.model.api.Import;
  14.104 +import org.netbeans.modules.bpel.model.api.Invoke;
  14.105 +import org.netbeans.modules.bpel.model.api.MessageExchange;
  14.106 +import org.netbeans.modules.bpel.model.api.MessageExchangeContainer;
  14.107 +import org.netbeans.modules.bpel.model.api.OnAlarmEvent;
  14.108 +import org.netbeans.modules.bpel.model.api.OnAlarmPick;
  14.109 +import org.netbeans.modules.bpel.model.api.OnEvent;
  14.110 +import org.netbeans.modules.bpel.model.api.OnMessage;
  14.111 +import org.netbeans.modules.bpel.model.api.Process;
  14.112 +import org.netbeans.modules.bpel.model.api.PartnerLink;
  14.113 +import org.netbeans.modules.bpel.model.api.PatternedCorrelation;
  14.114 +import org.netbeans.modules.bpel.model.api.Pick;
  14.115 +import org.netbeans.modules.bpel.model.api.Receive;
  14.116 +import org.netbeans.modules.bpel.model.api.RepeatUntil;
  14.117 +import org.netbeans.modules.bpel.model.api.Reply;
  14.118 +import org.netbeans.modules.bpel.model.api.Scope;
  14.119 +import org.netbeans.modules.bpel.model.api.Sequence;
  14.120 +import org.netbeans.modules.bpel.model.api.TerminationHandler;
  14.121 +import org.netbeans.modules.bpel.model.api.Throw;
  14.122 +import org.netbeans.modules.bpel.model.api.To;
  14.123 +import org.netbeans.modules.bpel.model.api.ToPart;
  14.124 +import org.netbeans.modules.bpel.model.api.Variable;
  14.125 +import org.netbeans.modules.bpel.model.api.VariableContainer;
  14.126 +import org.netbeans.modules.bpel.model.api.Wait;
  14.127 +import org.netbeans.modules.bpel.model.api.While;
  14.128 +import org.netbeans.modules.bpel.model.api.BpelModel;
  14.129 +import org.netbeans.modules.bpel.model.api.ReThrow;
  14.130 +import org.netbeans.modules.bpel.model.api.references.SchemaReference;
  14.131 +import org.netbeans.modules.bpel.model.api.references.WSDLReference;
  14.132 +import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
  14.133 +import org.netbeans.modules.xml.schema.model.GlobalElement;
  14.134 +import org.netbeans.modules.xml.schema.model.GlobalType;
  14.135 +import org.netbeans.modules.xml.xam.Component;
  14.136 +import org.netbeans.modules.xml.xam.Model;
  14.137 +import org.netbeans.modules.xml.xam.ModelSource;
  14.138 +import org.netbeans.modules.xml.xam.Named;
  14.139 +import org.netbeans.modules.xml.xam.Reference;
  14.140 +import org.netbeans.modules.xml.xam.Referenceable;
  14.141 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
  14.142 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
  14.143 +import org.netbeans.modules.xml.xam.dom.DocumentComponent;
  14.144 +import org.netbeans.modules.xml.schema.ui.nodes.categorized.CategorizedSchemaNodeFactory;
  14.145 +import org.netbeans.modules.xml.wsdl.ui.view.treeeditor.NodesFactory;
  14.146 +import org.openide.ErrorManager;
  14.147 +import org.openide.cookies.EditCookie;
  14.148 +import org.openide.cookies.LineCookie;
  14.149 +import org.openide.filesystems.FileObject;
  14.150 +import org.openide.loaders.DataObject;
  14.151 +import org.openide.loaders.DataObjectNotFoundException;
  14.152 +import org.openide.nodes.Node;
  14.153 +import org.openide.text.CloneableEditorSupport;
  14.154 +import org.openide.text.Line;
  14.155 +import org.openide.text.NbDocument;
  14.156 +import org.openide.util.Lookup;
  14.157 +import org.openide.util.lookup.Lookups;
  14.158 +import org.openide.windows.TopComponent;
  14.159 +import org.openide.windows.WindowManager;
  14.160 +import org.netbeans.modules.xml.schema.model.SchemaComponent;
  14.161 +import org.netbeans.modules.xml.schema.model.SchemaModel;
  14.162 +import org.netbeans.modules.xml.wsdl.model.Message;
  14.163 +import org.netbeans.modules.xml.wsdl.model.Part;
  14.164 +import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  14.165 +import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
  14.166 +import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
  14.167 +import org.netbeans.modules.soa.ui.SoaUtil;
  14.168 +
  14.169 +/**
  14.170 + * @author Vitaly Bychkov
  14.171 + * @version 1.0
  14.172 + */
  14.173 +public class EditorUtil {
  14.174 +
  14.175 +    private EditorUtil() {}
  14.176 +    
  14.177 +    public static BpelModel getBpelModel(DataObject data) {
  14.178 +      if ( !(data instanceof Lookup.Provider)) {
  14.179 +        return null;
  14.180 +      }
  14.181 +      Lookup.Provider provider = (Lookup.Provider) data;
  14.182 +
  14.183 +      // # 100277
  14.184 +      try {
  14.185 +        return (BpelModel) provider.getLookup().lookup(BpelModel.class);
  14.186 +      }
  14.187 +      catch (IllegalStateException e) {
  14.188 +        return null;
  14.189 +      }
  14.190 +    }
  14.191 +
  14.192 +    public static String getName(Component component) {
  14.193 +        String name = null;
  14.194 +
  14.195 +        if (component instanceof Named) {
  14.196 +            name = ((Named)component).getName();
  14.197 +        } else if (component instanceof BooleanExpr) {
  14.198 +            name = ((BooleanExpr)component).getContent();
  14.199 +            name = name == null ? null : name.trim();
  14.200 +            if (name != null && name.length() > MAX_SIMPLE_NAME_LENGTH) {
  14.201 +                name = name.substring(0, MAX_SIMPLE_NAME_LENGTH);
  14.202 +            }
  14.203 +        } else if (component instanceof BpelEntity) {
  14.204 +            org.netbeans.modules.bpel.editors.api.nodes.NodeType
  14.205 +                    bpelNodeType = getBasicNodeType((BpelEntity)component);
  14.206 +            
  14.207 +            if (bpelNodeType != null 
  14.208 +                    && ! NodeType.UNKNOWN_TYPE.equals(bpelNodeType))
  14.209 +            {
  14.210 +                name = bpelNodeType.getDisplayName();
  14.211 +            }
  14.212 +        }
  14.213 +        
  14.214 +        if (name == null && component instanceof DocumentComponent) {
  14.215 +            name = getTagName((DocumentComponent)component);
  14.216 +        }
  14.217 +        return name == null ? "" : name;
  14.218 +    }
  14.219 +    
  14.220 +    public static String getHtmlName(Component component) {
  14.221 +        String htmlName = null;
  14.222 +        NodeType nodeType = getBpelNodeType(component);
  14.223 +        
  14.224 +        HtmlNameManager[] nameManagers =  HtmlNameManager.HTML_NAME_MANAGERS;
  14.225 +        for (HtmlNameManager htmlNameManager : nameManagers) {
  14.226 +            if (htmlNameManager.accept(nodeType, component)) {
  14.227 +                htmlName = htmlNameManager.getHtmlName(nodeType, component);
  14.228 +            }
  14.229 +        }
  14.230 +
  14.231 +        htmlName = htmlName == null ? "" : htmlName;
  14.232 +        
  14.233 +        return removeHtmlHeader(htmlName);
  14.234 +    }
  14.235 +    
  14.236 +    public static Icon getIcon(Component component) {
  14.237 +        Node node = getNode(component);
  14.238 +
  14.239 +        if (node  != null) {
  14.240 +          return new ImageIcon(node.getIcon(BeanInfo.ICON_COLOR_16x16));
  14.241 +        }
  14.242 +        Icon icon = null;
  14.243 +
  14.244 +        if (component instanceof BpelEntity) {
  14.245 +            org.netbeans.modules.bpel.editors.api.nodes.NodeType
  14.246 +                bpelNodeType = getBasicNodeType((BpelEntity)component);
  14.247 +            if (bpelNodeType != null 
  14.248 +                    && ! org.netbeans.modules.bpel.editors.api.nodes.NodeType.UNKNOWN_TYPE.equals(bpelNodeType)) 
  14.249 +            {
  14.250 +                icon = bpelNodeType.getIcon();
  14.251 +            }
  14.252 +        }
  14.253 +        
  14.254 +        icon = icon != null 
  14.255 +                ? icon 
  14.256 +                : org.netbeans.modules.bpel.editors.api.nodes.NodeType.
  14.257 +                                            DEFAULT_BPEL_ENTITY_NODE.getIcon();
  14.258 +        
  14.259 +        return icon;
  14.260 +    }
  14.261 +                        
  14.262 +    // vlv
  14.263 +    public static String getToolTip(Component component) {
  14.264 +      String type = getType(component);
  14.265 +
  14.266 +      if (type != null) {
  14.267 +        return "<html>" + type + " <b>" + getName(component) + "</b></html>";
  14.268 +      }
  14.269 +      return getName(component);
  14.270 +    }
  14.271 +
  14.272 +    // vlv
  14.273 +    public static String getType(Component component) {
  14.274 +      String type = null;
  14.275 +      
  14.276 +      if (component instanceof BpelEntity) {
  14.277 +        type = ((BpelEntity) component).getElementType().getName();
  14.278 +      }
  14.279 +      else if (component instanceof SchemaComponent) {
  14.280 +        type = ((SchemaComponent) component).getComponentType().getName();
  14.281 +      }
  14.282 +      else {
  14.283 +        type = component.getClass().getName();
  14.284 +      }
  14.285 +      int k = type.lastIndexOf("."); // NOI18N
  14.286 +
  14.287 +      if (k == -1) {
  14.288 +        return type;
  14.289 +      }
  14.290 +      return type.substring(k + 1);
  14.291 +    }
  14.292 +
  14.293 +    // vlv
  14.294 +    private static Node getNode(Component component) {
  14.295 +      if (component instanceof SchemaComponent) {
  14.296 +        SchemaComponent schemaComponent = (SchemaComponent) component;
  14.297 +        CategorizedSchemaNodeFactory factory = new CategorizedSchemaNodeFactory(schemaComponent.getModel(), Lookups.singleton(schemaComponent));
  14.298 +        return factory.createNode(schemaComponent);
  14.299 +      }
  14.300 +      if (component instanceof WSDLComponent) {
  14.301 +        return NodesFactory.getInstance().create(component);
  14.302 +      }
  14.303 +      return null;
  14.304 +    }
  14.305 +    
  14.306 +    private static String removeHtmlHeader(String htmlString) {
  14.307 +        if (htmlString == null) {
  14.308 +            return htmlString;
  14.309 +        }
  14.310 +        
  14.311 +        String htmlStart = "<html>"; // NOI18N
  14.312 +        String htmlEnd = "</html>"; // NOI18N
  14.313 +        
  14.314 +        if (htmlString.matches(htmlStart+".*"+htmlEnd)) {
  14.315 +            htmlString = htmlString.substring(htmlStart.length() -1,
  14.316 +                    htmlString.length() - htmlEnd.length() + 1);
  14.317 +        }
  14.318 +        
  14.319 +        return htmlString;
  14.320 +    }
  14.321 +    
  14.322 +    private static NodeType getBpelNodeType(Component component) {
  14.323 +        if (!(component instanceof BpelEntity)) {
  14.324 +            return null;
  14.325 +        }
  14.326 +        return getBasicNodeType((BpelEntity)component);
  14.327 +    }
  14.328 +
  14.329 +
  14.330 +    public static String getUsageContextPath(String suffix, BpelEntity entity, Class<? extends BpelEntity> filter) {
  14.331 +        String resultStr = getUsageContextPath(entity, filter);
  14.332 +        if (resultStr != null) {
  14.333 +            suffix = suffix == null ? "" : ENTITY_SEPARATOR+suffix; // NOI18N
  14.334 +            resultStr += suffix;
  14.335 +        } else {
  14.336 +            resultStr = suffix;
  14.337 +        }
  14.338 +        return resultStr;
  14.339 +    }
  14.340 +    
  14.341 +    public static String getUsageContextPath(BpelEntity entity, Class<? extends BpelEntity> filter) {
  14.342 +        assert entity != null;
  14.343 +        StringBuffer path = new StringBuffer(getName(entity));
  14.344 +        BpelEntity tmpEntity = entity;
  14.345 +        while((tmpEntity = tmpEntity.getParent()) != null) {
  14.346 +            if (tmpEntity.getElementType() == filter) {
  14.347 +                continue;
  14.348 +            }
  14.349 +            
  14.350 +            String tmpEntityName = getName(tmpEntity);
  14.351 +            if (tmpEntityName != null && tmpEntityName.length() > 0) {
  14.352 +                path.insert(0,ENTITY_SEPARATOR).insert(0,tmpEntityName);
  14.353 +            }
  14.354 +        }
  14.355 +        
  14.356 +        return path.toString();
  14.357 +    }
  14.358 +    private static Map<Class<? extends Component>, NodeType> ENTITY_NODETYPE_MAP;
  14.359 +
  14.360 +    static {
  14.361 +        ENTITY_NODETYPE_MAP = new HashMap<Class<? extends Component>, NodeType>();
  14.362 +
  14.363 +        ENTITY_NODETYPE_MAP.put(Assign.class, NodeType.ASSIGN);
  14.364 +
  14.365 +        ENTITY_NODETYPE_MAP.put(BooleanExpr.class, NodeType.BOOLEAN_EXPR);
  14.366 +
  14.367 +        ENTITY_NODETYPE_MAP.put(Catch.class, NodeType.CATCH);
  14.368 +        ENTITY_NODETYPE_MAP.put(CompensatableActivityHolder.class, NodeType.CATCH_ALL);
  14.369 +        ENTITY_NODETYPE_MAP.put(CompensationHandler.class, NodeType.COMPENSATION_HANDLER);
  14.370 +        ENTITY_NODETYPE_MAP.put(Compensate.class, NodeType.COMPENSATE);
  14.371 +        ENTITY_NODETYPE_MAP.put(CompensateScope.class, NodeType.COMPENSATE_SCOPE);
  14.372 +        ENTITY_NODETYPE_MAP.put(CompletionCondition.class
  14.373 +                , NodeType.COMPLETION_CONDITION);
  14.374 +        ENTITY_NODETYPE_MAP.put(Copy.class, NodeType.COPY);
  14.375 +        ENTITY_NODETYPE_MAP.put(Correlation.class, NodeType.CORRELATION);
  14.376 +        ENTITY_NODETYPE_MAP.put(CorrelationSet.class, NodeType.CORRELATION_SET);
  14.377 +        ENTITY_NODETYPE_MAP.put(CorrelationSetContainer.class
  14.378 +                , NodeType.CORRELATION_SET_CONTAINER);
  14.379 +
  14.380 +        ENTITY_NODETYPE_MAP.put(Else.class, NodeType.ELSE);
  14.381 +        ENTITY_NODETYPE_MAP.put(ElseIf.class, NodeType.ELSE_IF);
  14.382 +        ENTITY_NODETYPE_MAP.put(Empty.class, NodeType.EMPTY);
  14.383 +        ENTITY_NODETYPE_MAP.put(EventHandlers.class, NodeType.EVENT_HANDLERS);
  14.384 +        ENTITY_NODETYPE_MAP.put(Exit.class, NodeType.EXIT);
  14.385 +
  14.386 +        ENTITY_NODETYPE_MAP.put(FaultHandlers.class, NodeType.FAULT_HANDLERS);
  14.387 +        ENTITY_NODETYPE_MAP.put(Flow.class, NodeType.FLOW);
  14.388 +        ENTITY_NODETYPE_MAP.put(ForEach.class, NodeType.FOR_EACH);
  14.389 +        ENTITY_NODETYPE_MAP.put(From.class, NodeType.FROM);
  14.390 +        ENTITY_NODETYPE_MAP.put(FromPart.class, NodeType.FROM_PART);
  14.391 +
  14.392 +        ENTITY_NODETYPE_MAP.put(If.class, NodeType.IF);
  14.393 +        ENTITY_NODETYPE_MAP.put(Import.class, NodeType.IMPORT);
  14.394 +        ENTITY_NODETYPE_MAP.put(Invoke.class, NodeType.INVOKE);
  14.395 +
  14.396 +        ENTITY_NODETYPE_MAP.put(MessageExchange.class
  14.397 +                , NodeType.MESSAGE_EXCHANGE);
  14.398 +        ENTITY_NODETYPE_MAP.put(MessageExchangeContainer.class
  14.399 +                , NodeType.MESSAGE_EXCHANGE_CONTAINER);
  14.400 +
  14.401 +        ENTITY_NODETYPE_MAP.put(OnAlarmEvent.class, NodeType.ALARM_EVENT_HANDLER);
  14.402 +        ENTITY_NODETYPE_MAP.put(OnAlarmPick.class, NodeType.ALARM_HANDLER);
  14.403 +        ENTITY_NODETYPE_MAP.put(OnEvent.class, NodeType.ON_EVENT);
  14.404 +        ENTITY_NODETYPE_MAP.put(OnMessage.class, NodeType.MESSAGE_HANDLER);
  14.405 +
  14.406 +        ENTITY_NODETYPE_MAP.put(PartnerLink.class, NodeType.PARTNER_LINK);
  14.407 +        ENTITY_NODETYPE_MAP.put(PatternedCorrelation.class, NodeType.CORRELATION_P);
  14.408 +        ENTITY_NODETYPE_MAP.put(Pick.class, NodeType.PICK);
  14.409 +        ENTITY_NODETYPE_MAP.put(Process.class, NodeType.PROCESS);
  14.410 +
  14.411 +        ENTITY_NODETYPE_MAP.put(Receive.class, NodeType.RECEIVE);
  14.412 +        ENTITY_NODETYPE_MAP.put(RepeatUntil.class, NodeType.REPEAT_UNTIL);
  14.413 +        ENTITY_NODETYPE_MAP.put(Reply.class, NodeType.REPLY);
  14.414 +
  14.415 +        ENTITY_NODETYPE_MAP.put(Scope.class, NodeType.SCOPE);
  14.416 +        ENTITY_NODETYPE_MAP.put(Sequence.class, NodeType.SEQUENCE);
  14.417 +
  14.418 +        ENTITY_NODETYPE_MAP.put(TerminationHandler.class, NodeType.TERMINATION_HANDLER);
  14.419 +        ENTITY_NODETYPE_MAP.put(Throw.class, NodeType.THROW);
  14.420 +        ENTITY_NODETYPE_MAP.put(ReThrow.class, NodeType.RETHROW);
  14.421 +        ENTITY_NODETYPE_MAP.put(To.class, NodeType.TO);
  14.422 +        ENTITY_NODETYPE_MAP.put(ToPart.class, NodeType.TO_PART);
  14.423 +
  14.424 +        ENTITY_NODETYPE_MAP.put(Wait.class, NodeType.WAIT);
  14.425 +        ENTITY_NODETYPE_MAP.put(While.class, NodeType.WHILE);
  14.426 +
  14.427 +        ENTITY_NODETYPE_MAP.put(Variable.class, NodeType.VARIABLE);
  14.428 +        ENTITY_NODETYPE_MAP.put(VariableContainer.class, NodeType.VARIABLE_CONTAINER);
  14.429 +    }
  14.430 +
  14.431 +    /**
  14.432 +     *
  14.433 +     * @param entityClass class which represents primary entity interface
  14.434 +     * @return generally used NodeType
  14.435 +     */
  14.436 +    public static NodeType getBasicNodeType(Class<? extends Component> entityClass) {
  14.437 +        NodeType entityType = ENTITY_NODETYPE_MAP.get(entityClass);
  14.438 +        return entityType == null ? NodeType.UNKNOWN_TYPE : entityType;
  14.439 +    }
  14.440 +
  14.441 +    public static boolean isNavigatorShowableNodeType(NodeType nodeType) {
  14.442 +        if (nodeType == null) {
  14.443 +            return false;
  14.444 +        }
  14.445 +        boolean isShowable = true;
  14.446 +        switch (nodeType) {
  14.447 +        case UNKNOWN_TYPE:
  14.448 +        case DEFAULT_BPEL_ENTITY_NODE:
  14.449 +        case FROM:
  14.450 +        case TO:
  14.451 +        case BOOLEAN_EXPR:
  14.452 +            isShowable = false;
  14.453 +            break;
  14.454 +        default:
  14.455 +            isShowable = true;
  14.456 +        }
  14.457 +
  14.458 +        return isShowable;
  14.459 +    }
  14.460 +
  14.461 +    /**
  14.462 +     *
  14.463 +     * @param entity
  14.464 +     * @param lookup
  14.465 +     * @return the closest node
  14.466 +     */
  14.467 +    public static Node getClosestNavigatorNode(
  14.468 +            BpelEntity entity,
  14.469 +            Lookup lookup)
  14.470 +    {
  14.471 +        if (entity == null || entity.getElementType() == null) {
  14.472 +            return null;
  14.473 +        }
  14.474 +        Node basicNode = null;
  14.475 +        BpelEntity curEntity = entity;
  14.476 +        NodeType basicNodeType = getBasicNodeType(entity);
  14.477 +
  14.478 +        while (!isNavigatorShowableNodeType(basicNodeType)
  14.479 +
  14.480 +                && curEntity != null )
  14.481 +        {
  14.482 +            curEntity = curEntity.getParent();
  14.483 +            basicNodeType = getBasicNodeType(curEntity);
  14.484 +        }
  14.485 +
  14.486 +        if (curEntity != null
  14.487 +                && !(NodeType.UNKNOWN_TYPE.equals(basicNodeType)))
  14.488 +        {
  14.489 +            basicNode = FactoryAccess.getPropertyNodeFactory().
  14.490 +                    createNode(basicNodeType, curEntity, lookup);
  14.491 +        }
  14.492 +        return basicNode;
  14.493 +    }
  14.494 +
  14.495 +    // vlv
  14.496 +    public static Component getRoot(Model model) {
  14.497 +      if (model instanceof BpelModel) {
  14.498 +        return ((BpelModel) model).getProcess();
  14.499 +      }
  14.500 +      if (model instanceof SchemaModel) {
  14.501 +        return ((SchemaModel) model).getSchema();
  14.502 +      }
  14.503 +      if (model instanceof WSDLModel) {
  14.504 +        return ((WSDLModel) model).getDefinitions();
  14.505 +      }
  14.506 +      return null;
  14.507 +    }
  14.508 +
  14.509 +    /**
  14.510 +     * This method don't aware about bpelModel lock
  14.511 +     * @param component Component
  14.512 +     * @return generally used NodeType, if entity or
  14.513 +     *  enity#getElementType is null then return null
  14.514 +     */
  14.515 +    public static NodeType getBasicNodeType(Component component) {
  14.516 +        if ( !(component instanceof BpelEntity)) {
  14.517 +            // todo m
  14.518 +            return null;
  14.519 +        }
  14.520 +        BpelEntity bpelEntity = (BpelEntity) component;
  14.521 +
  14.522 +        if (bpelEntity == null || bpelEntity.getElementType() == null) {
  14.523 +            return null;
  14.524 +        }
  14.525 +        return getBasicNodeType(bpelEntity.getElementType());
  14.526 +    }
  14.527 +
  14.528 +    public static void goToSource(Component component) {
  14.529 +        if ( !(component instanceof DocumentComponent)) {
  14.530 +            return;
  14.531 +        }
  14.532 +        DocumentComponent document = (DocumentComponent) component;
  14.533 +        FileObject fo = SoaUtil.getFileObjectByModel(component.getModel());
  14.534 +
  14.535 +        if (fo == null) {
  14.536 +            return;
  14.537 +        }
  14.538 +        try {
  14.539 +            DataObject d = DataObject.find(fo);
  14.540 +            LineCookie lc = d.getCookie(LineCookie.class);
  14.541 +            if (lc == null) {
  14.542 +                return;
  14.543 +            }
  14.544 +            int lineNum = getLineNum(document);
  14.545 +            if (lineNum < 0) {
  14.546 +                return;
  14.547 +            }
  14.548 +
  14.549 +            final Line l = lc.getLineSet().getCurrent(lineNum);
  14.550 +            final int column = getColumnNum(document);
  14.551 +            if (column < 0) {
  14.552 +                return;
  14.553 +            }
  14.554 +
  14.555 +            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  14.556 +                public void run() {
  14.557 +                    l.show(Line.SHOW_GOTO, column);
  14.558 +                    openActiveSourceEditor();
  14.559 +                }
  14.560 +            });
  14.561 +        } catch (DataObjectNotFoundException ex) {
  14.562 +          return;
  14.563 +        }
  14.564 +    }
  14.565 +
  14.566 +    public static void goToLoggingAlerting(Component component) {
  14.567 +        assert component instanceof BpelEntity ;
  14.568 +
  14.569 +        final BpelEntity bpelEntity = (BpelEntity) component;
  14.570 +        FileObject fo = SoaUtil.getFileObjectByModel(bpelEntity.getBpelModel());
  14.571 +
  14.572 +        if (fo == null) {
  14.573 +            return;                                                        }
  14.574 +        try {
  14.575 +            DataObject d = DataObject.find(fo);
  14.576 +            final Lookup lookup = d.getLookup();
  14.577 +
  14.578 +            final EditCookie ec = d.getCookie(EditCookie.class);
  14.579 +            if (ec == null) {
  14.580 +                return;
  14.581 +            }
  14.582 +
  14.583 +            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  14.584 +                public void run() {
  14.585 +                    ec.edit();
  14.586 +                    openActiveLoggingEditor();
  14.587 +                }
  14.588 +            });
  14.589 +        } catch (DataObjectNotFoundException ex) {
  14.590 +            ErrorManager.getDefault().notify(ex);
  14.591 +        }
  14.592 +    }
  14.593 +
  14.594 +    public static void goToBusinessRules(Component component) {
  14.595 +        assert component instanceof BpelEntity ;
  14.596 +
  14.597 +        final BpelEntity bpelEntity = (BpelEntity) component;
  14.598 +        FileObject fo = SoaUtil.getFileObjectByModel(bpelEntity.getBpelModel());
  14.599 +
  14.600 +        if (fo == null) {
  14.601 +            return;                                                        }
  14.602 +        try {
  14.603 +            DataObject d = DataObject.find(fo);
  14.604 +            final Lookup lookup = d.getLookup();
  14.605 +
  14.606 +            final EditCookie ec = d.getCookie(EditCookie.class);
  14.607 +            if (ec == null) {
  14.608 +                return;
  14.609 +            }
  14.610 +
  14.611 +            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  14.612 +                public void run() {
  14.613 +                    ec.edit();
  14.614 +                    openActiveMapperEditor();
  14.615 +                    if (lookup != null || bpelEntity != null) {
  14.616 +                        NodeType nodeType = getBasicNodeType(bpelEntity);
  14.617 +                        if (nodeType == null || NodeType.UNKNOWN_TYPE.equals(nodeType)) {
  14.618 +                            return;
  14.619 +                        }
  14.620 +                        Node bpelNode = FactoryAccess.getPropertyNodeFactory()
  14.621 +                        .createNode(nodeType,bpelEntity, lookup);
  14.622 +                        //TODO m
  14.623 +                        TopComponent mapperTc = WindowManager.getDefault().getRegistry().getActivated();
  14.624 +                        if (mapperTc != null) {
  14.625 +                            mapperTc.setActivatedNodes(new Node[0]);
  14.626 +                            mapperTc.setActivatedNodes(new Node[] {bpelNode});
  14.627 +                        }
  14.628 +                    }
  14.629 +                }
  14.630 +            });
  14.631 +        } catch (DataObjectNotFoundException ex) {
  14.632 +            ErrorManager.getDefault().notify(ex);
  14.633 +        }
  14.634 +    }
  14.635 +
  14.636 +    public static void goToDesign(Component component) {
  14.637 +        goToDesign(component, null, null);
  14.638 +    }
  14.639 +
  14.640 +    public static void goToDesign(final Component component, Object cookie, Object view) {
  14.641 +        // vlv
  14.642 +        if ( !(component instanceof BpelEntity)) {
  14.643 +          HighlightManager manager = HighlightManager.getDefault();
  14.644 +          List<HighlightGroup> groups = manager.getHighlightGroups(HighlightGroup.SEARCH);
  14.645 +
  14.646 +          if (groups != null) {
  14.647 +            for (HighlightGroup group : groups) {
  14.648 +              manager.removeHighlightGroup(group);
  14.649 +            }
  14.650 +          }
  14.651 +          HighlightGroup group = new HighlightGroup(HighlightGroup.SEARCH);
  14.652 +          Highlight highlight = new Highlight(component, Highlight.SEARCH_RESULT);
  14.653 +          group.addHighlight(highlight);
  14.654 +          manager.addHighlightGroup(group);
  14.655 +
  14.656 +          if (view instanceof SchemaTreeView && component instanceof SchemaComponent) {
  14.657 +            ((SchemaTreeView) view).showComponent((SchemaComponent) component);
  14.658 +            return;
  14.659 +          }
  14.660 +          if (view instanceof SchemaColumnsView && component instanceof SchemaComponent) {
  14.661 +            ((SchemaColumnsView) view).showComponent((SchemaComponent) component);
  14.662 +            return;
  14.663 +          }
  14.664 +          if (cookie instanceof ShowCookie) {
  14.665 +//System.out.println();
  14.666 +//System.out.println("========: " + cookie.getClass().getName());
  14.667 +//System.out.println();
  14.668 +            ((ShowCookie) cookie).show(new ResultItem(null, null, component, null));
  14.669 +            return;
  14.670 +          }
  14.671 +          return;
  14.672 +        }
  14.673 +        final BpelEntity bpelEntity = (BpelEntity) component;
  14.674 +        FileObject fo = SoaUtil.getFileObjectByModel(bpelEntity.getBpelModel());
  14.675 +
  14.676 +        if (fo == null) {
  14.677 +            return;                                                        }
  14.678 +        try {
  14.679 +            DataObject d = DataObject.find(fo);
  14.680 +            final Lookup lookup = d != null ? d.getLookup() : null;
  14.681 +
  14.682 +            final EditCookie ec = d.getCookie(EditCookie.class);
  14.683 +            if (ec == null) {
  14.684 +                return;
  14.685 +            }
  14.686 +
  14.687 +            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  14.688 +                public void run() {
  14.689 +                    ec.edit();
  14.690 +                    openActiveDesignEditor();
  14.691 +                    if (lookup != null || bpelEntity != null) {
  14.692 +                        NodeType nodeType = getBasicNodeType(bpelEntity);
  14.693 +                        if (nodeType == null) {
  14.694 +                            return;
  14.695 +                        } else if (NodeType.UNKNOWN_TYPE.equals(nodeType)) {
  14.696 +                            nodeType = NodeType.DEFAULT_BPEL_ENTITY_NODE;
  14.697 +                        }
  14.698 +                        Node bpelNode = FactoryAccess.getPropertyNodeFactory()
  14.699 +                        .createNode(nodeType,bpelEntity, lookup);
  14.700 +                        //TODO m
  14.701 +                        TopComponent designTc = WindowManager.getDefault().getRegistry().getActivated();
  14.702 +                        if (designTc != null) {
  14.703 +                            designTc.setActivatedNodes(new Node[0]);
  14.704 +                            designTc.setActivatedNodes(new Node[] {bpelNode});
  14.705 +                        }
  14.706 +                    }
  14.707 +                }
  14.708 +            });
  14.709 +        } catch (DataObjectNotFoundException ex) {
  14.710 +          return;
  14.711 +        }
  14.712 +    }
  14.713 +
  14.714 +    public static String getTextForBpelEntity(final Component comp){
  14.715 +        BpelEntity entity = null;
  14.716 +        if (comp instanceof BpelEntity){
  14.717 +            entity = BpelEntity.class.cast(comp);
  14.718 +        }
  14.719 +        if (entity == null) {
  14.720 +            return ""; // NOI18N
  14.721 +        }
  14.722 +
  14.723 +        FileObject fo = SoaUtil.getFileObjectByModel(entity.getBpelModel());
  14.724 +        if (fo == null) {
  14.725 +            return ""; // NOI18N
  14.726 +        }
  14.727 +
  14.728 +        // TODO - if the line doesn't contain the target (query component name) string, keep searcing subsequent lines
  14.729 +
  14.730 +
  14.731 +        DataObject dobj = null;
  14.732 +        try {
  14.733 +            dobj = DataObject.find(fo);
  14.734 +        } catch (DataObjectNotFoundException ex) {
  14.735 +            return null;
  14.736 +        }
  14.737 +        int line = getLineNum(entity);
  14.738 +        int col = getColumnNum(entity);
  14.739 +        ModelSource modelSource = entity.getBpelModel().getModelSource();
  14.740 +        assert modelSource != null;
  14.741 +        Lookup lookup = modelSource.getLookup();
  14.742 +
  14.743 +        StyledDocument document = lookup.lookup(StyledDocument.class);
  14.744 +        if (document == null) {
  14.745 +            return ""; // NOI18N
  14.746 +        }
  14.747 +
  14.748 +        CloneableEditorSupport editor = (CloneableEditorSupport)dobj.getCookie(org.openide.cookies.EditorCookie.class);
  14.749 +        Line.Set s =editor.getLineSet();
  14.750 +
  14.751 +        Line xmlLine = s.getCurrent(line);
  14.752 +        String nodeLabel =   xmlLine.getText().trim();
  14.753 +        // substitute xml angle brackets <> for &lt; and &gt;
  14.754 +        Pattern lt = Pattern.compile("<"); //NOI18N
  14.755 +        Matcher mlt = lt.matcher(nodeLabel);
  14.756 +        nodeLabel = mlt.replaceAll("&lt;");  //NOI18N
  14.757 +        Pattern gt = Pattern.compile(">"); //NOI18N
  14.758 +        Matcher mgt = gt.matcher(nodeLabel);
  14.759 +        nodeLabel = mgt.replaceAll("&gt;");  //NOI18N
  14.760 +        return boldenRefOrType(nodeLabel);
  14.761 +    }
  14.762 +
  14.763 +    private static int getLineNum(DocumentComponent entity) {
  14.764 +        int position = entity.findPosition();
  14.765 +        ModelSource modelSource = entity.getModel().getModelSource();
  14.766 +        assert modelSource != null;
  14.767 +        Lookup lookup = modelSource.getLookup();
  14.768 +
  14.769 +        StyledDocument document = lookup.lookup(StyledDocument.class);
  14.770 +        if (document == null) {
  14.771 +            return -1;
  14.772 +        }
  14.773 +        return NbDocument.findLineNumber(document,position);
  14.774 +    }
  14.775 +
  14.776 +    private static int getColumnNum(DocumentComponent entity) {
  14.777 +        int position = entity.findPosition();
  14.778 +        ModelSource modelSource = entity.getModel().getModelSource();
  14.779 +        assert modelSource != null;
  14.780 +        Lookup lookup = modelSource.getLookup();
  14.781 +
  14.782 +        StyledDocument document = lookup.lookup(StyledDocument.class);
  14.783 +        if (document == null) {
  14.784 +            return -1;
  14.785 +        }
  14.786 +        return NbDocument.findLineColumn(document,position);
  14.787 +    }
  14.788 +
  14.789 +    private static void openActiveDesignEditor() {
  14.790 +        openActiveMVEditor(BpelEditorConstants.BPEL_DESIGNMV_PREFFERED_ID);
  14.791 +    }
  14.792 +
  14.793 +    private static void openActiveMapperEditor() {
  14.794 +        openActiveMVEditor(BpelEditorConstants.BPEL_MAPPERMV_PREFFERED_ID);
  14.795 +    }
  14.796 +
  14.797 +    private static void openActiveLoggingEditor() {
  14.798 +        openActiveMVEditor(BpelEditorConstants.BPEL_LOGGINGMV_PREFFERED_ID);
  14.799 +    }
  14.800 +
  14.801 +    private static void openActiveSourceEditor() {
  14.802 +        openActiveMVEditor(BpelEditorConstants.BPEL_SOURCEMV_PREFFERED_ID);
  14.803 +    }
  14.804 +
  14.805 +    private static void openActiveMVEditor(String mvPreferedID) {
  14.806 +        if (mvPreferedID == null) {
  14.807 +            return;
  14.808 +        }
  14.809 +
  14.810 +        TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();
  14.811 +
  14.812 +        MultiViewHandler mvh = MultiViews.findMultiViewHandler(tc);
  14.813 +        if (mvh == null) {
  14.814 +            return;
  14.815 +        }
  14.816 +
  14.817 +        MultiViewPerspective[] mvps = mvh.getPerspectives();
  14.818 +        if (mvps != null && mvps.length >0) {
  14.819 +            for (MultiViewPerspective mvp : mvps) {
  14.820 +                if (mvp.preferredID().equals(mvPreferedID)) {  // NOI18N
  14.821 +                    mvh.requestVisible(mvp);
  14.822 +                    mvh.requestActive(mvp);
  14.823 +                }
  14.824 +            }
  14.825 +        }
  14.826 +    }
  14.827 +
  14.828 +    // TODO get xml snippet for line that contains the
  14.829 +    //  query component name
  14.830 +    /**
  14.831 +     * If the label contains ref= or type=
  14.832 +     * the substring containing the named portion of the attribute
  14.833 +     * will be surrounded with html bold tags
  14.834 +     * e.g.,
  14.835 +     * input param <xsd:element ref="comment" minOccurs="0"/>
  14.836 +     * return <xsd:element ref="<b>comment</b>" minOccurs="0"/>
  14.837 +     *
  14.838 +     *
  14.839 +     */
  14.840 +    private static String boldenRefOrType(String label){
  14.841 +        // find index of type or ref
  14.842 +        // find 1st occurence of " from index
  14.843 +        // find 1st occurence of : after ", if any
  14.844 +        // insert <b>
  14.845 +        // find closing "
  14.846 +        // insert </b>
  14.847 +        int it = label.indexOf(" type"); //NOI18N
  14.848 +        if (it < 0){
  14.849 +            it = label.indexOf(" ref"); //NOI18N
  14.850 +        }
  14.851 +        if (it < 0){
  14.852 +            // no type or ref found
  14.853 +            return label;
  14.854 +        }
  14.855 +        int iq1 = label.indexOf('"',it);
  14.856 +        if (iq1 < it){
  14.857 +            // no begin quote
  14.858 +            return label;
  14.859 +        }
  14.860 +        int ic = label.indexOf(':',iq1);
  14.861 +        if (ic < iq1){
  14.862 +            // no colon
  14.863 +        }
  14.864 +        int iq2 = label.indexOf('"', iq1+1);
  14.865 +        if (iq2 < iq1 || ic > iq2){
  14.866 +            // couldn't find closing quote for tag
  14.867 +            return label;
  14.868 +        }
  14.869 +        int ib1 = -1;
  14.870 +        if (ic > -1){
  14.871 +            ib1 = ic+1;
  14.872 +        } else {
  14.873 +            ib1 = iq1+1;
  14.874 +        }
  14.875 +        StringBuffer l = new StringBuffer(label);
  14.876 +        l.insert(ib1,"<b>");
  14.877 +        // the close quote has now been pushed right 3 spaces
  14.878 +        l.insert(iq2+3,"</b>");
  14.879 +        return l.toString();
  14.880 +
  14.881 +    }
  14.882 +
  14.883 +    public static void goToReferenceSource(Reference<Referenceable> reference) {
  14.884 +        Referenceable referenceable = reference.get();
  14.885 +        if (referenceable == null) return;
  14.886 +        if (!(referenceable instanceof DocumentComponent)) return;
  14.887 +        goToDocumentComponentSource((DocumentComponent<DocumentComponent>) referenceable);
  14.888 +    }
  14.889 +
  14.890 +    public static boolean canGoToDocumentComponentSource(
  14.891 +            DocumentComponent<DocumentComponent> component)
  14.892 +    {
  14.893 +        if (component == null) return false;
  14.894 +
  14.895 +        Model model = component.getModel();
  14.896 +        if (model == null) return false;
  14.897 +
  14.898 +        ModelSource modelSource = model.getModelSource();
  14.899 +        if (modelSource == null) return false;
  14.900 +
  14.901 +        Lookup lookup = modelSource.getLookup();
  14.902 +        if (lookup == null) return false;
  14.903 +
  14.904 +        FileObject fileObject = lookup.lookup(FileObject.class);
  14.905 +        if (fileObject == null) return false;
  14.906 +
  14.907 +        DataObject dataObject = null;
  14.908 +        try {
  14.909 +            dataObject = DataObject.find(fileObject);
  14.910 +        } catch (DataObjectNotFoundException e) {}
  14.911 +        if (dataObject == null) return false;
  14.912 +
  14.913 +        LineCookie lineCookie = dataObject.getCookie(LineCookie.class);
  14.914 +        if (lineCookie == null) return false;
  14.915 +
  14.916 +        Line.Set lineSet = lineCookie.getLineSet();
  14.917 +        if (lineSet == null) return false;
  14.918 +
  14.919 +        StyledDocument document = lookup.lookup(StyledDocument.class);
  14.920 +        if (document == null) return false;
  14.921 +
  14.922 +        Line line = null;
  14.923 +        int column = 0;
  14.924 +
  14.925 +        try {
  14.926 +            int pos = component.findPosition();
  14.927 +            line = lineSet.getCurrent(NbDocument.findLineNumber(document, pos));
  14.928 +            column = NbDocument.findLineColumn(document, pos);
  14.929 +        } catch (IndexOutOfBoundsException e) {}
  14.930 +
  14.931 +        if (line == null) {
  14.932 +            try {
  14.933 +                line = lineCookie.getLineSet().getCurrent(0);
  14.934 +            } catch (IndexOutOfBoundsException e) {}
  14.935 +        }
  14.936 +        if (line == null) return false;
  14.937 +
  14.938 +        return true;
  14.939 +    }
  14.940 +
  14.941 +    public static void goToDocumentComponentSource(
  14.942 +            DocumentComponent<DocumentComponent> component)
  14.943 +    {
  14.944 +        if (component == null) return;
  14.945 +
  14.946 +        Model model = component.getModel();
  14.947 +        if (model == null) return;
  14.948 +
  14.949 +        ModelSource modelSource = model.getModelSource();
  14.950 +        if (modelSource == null) return;
  14.951 +
  14.952 +        Lookup lookup = modelSource.getLookup();
  14.953 +        if (lookup == null) return;
  14.954 +
  14.955 +        FileObject fileObject = lookup.lookup(FileObject.class);
  14.956 +        if (fileObject == null) return;
  14.957 +
  14.958 +        DataObject dataObject = null;
  14.959 +        try {
  14.960 +            dataObject = DataObject.find(fileObject);
  14.961 +        } catch (DataObjectNotFoundException e) {}
  14.962 +        if (dataObject == null) return;
  14.963 +
  14.964 +        LineCookie lineCookie = dataObject.getCookie(LineCookie.class);
  14.965 +        if (lineCookie == null) return;
  14.966 +
  14.967 +        Line.Set lineSet = lineCookie.getLineSet();
  14.968 +        if (lineSet == null) return;
  14.969 +
  14.970 +        StyledDocument document = lookup.lookup(StyledDocument.class);
  14.971 +        if (document == null) return;
  14.972 +
  14.973 +        Line line = null;
  14.974 +        int column = 0;
  14.975 +
  14.976 +        try {
  14.977 +            int pos = component.findPosition();
  14.978 +            line = lineSet.getCurrent(NbDocument.findLineNumber(document, pos));
  14.979 +            column = NbDocument.findLineColumn(document, pos);
  14.980 +        } catch (IndexOutOfBoundsException e) {}
  14.981 +
  14.982 +        if (line == null) {
  14.983 +            try {
  14.984 +                line = lineCookie.getLineSet().getCurrent(0);
  14.985 +            } catch (IndexOutOfBoundsException e) {}
  14.986 +        }
  14.987 +        if (line == null) return;
  14.988 +
  14.989 +        final Line fLine = line;
  14.990 +        final int fColumn = column;
  14.991 +
  14.992 +        SwingUtilities.invokeLater(new Runnable() {
  14.993 +            public void run() {
  14.994 +                fLine.show(Line.SHOW_GOTO, fColumn);
  14.995 +            }
  14.996 +        });
  14.997 +    }
  14.998 +
  14.999 +    public static int getChildIndex(BpelEntity child, CompositeActivity parent) {
 14.1000 +        assert child != null && parent != null;
 14.1001 +        int childIndex = -1;
 14.1002 +        for (int i = 0; i < parent.sizeOfActivities(); i++) {
 14.1003 +            if (child.equals(parent.getActivity(i))) {
 14.1004 +                childIndex = i;
 14.1005 +                break;
 14.1006 +            }
 14.1007 +        }
 14.1008 +        return childIndex;
 14.1009 +    }
 14.1010 +
 14.1011 +    public static final String getCorrectedHtmlRenderedString(String htmlString) {
 14.1012 +        if (htmlString == null) {
 14.1013 +            return null;
 14.1014 +        }
 14.1015 +        htmlString = htmlString.replaceAll("&amp;","&"); // NOI18n
 14.1016 +        htmlString = htmlString.replaceAll("&gt;",">;"); // NOI18n
 14.1017 +        htmlString = htmlString.replaceAll("&lt;","<"); // NOI18n
 14.1018 +
 14.1019 +        htmlString = htmlString.replaceAll("&","&amp;"); // NOI18n
 14.1020 +        htmlString = htmlString.replaceAll(">","&gt;"); // NOI18n
 14.1021 +        htmlString = htmlString.replaceAll("<","&lt;"); // NOI18n
 14.1022 +        return htmlString;
 14.1023 +    }
 14.1024 +
 14.1025 +    public static String getTagName(DocumentComponent component ) {
 14.1026 +        if (component == null) {
 14.1027 +            return null;
 14.1028 +        }
 14.1029 +
 14.1030 +        Element enEl = component.getPeer();
 14.1031 +        return enEl == null ? null : enEl.getTagName();
 14.1032 +    }
 14.1033 +
 14.1034 +    public static VariableStereotype
 14.1035 +            getVariableStereotype(AbstractVariableDeclaration var) {
 14.1036 +        if (var == null) {
 14.1037 +            return null;
 14.1038 +        }
 14.1039 +        // if (currentStereotype != null) return currentStereotype;
 14.1040 +        VariableStereotype currentStereotype = null;
 14.1041 +        //
 14.1042 +        SchemaReference<GlobalType> typeRef = var.getType();
 14.1043 +        if (typeRef != null) {
 14.1044 +            GlobalType type = typeRef.get();
 14.1045 +            if (type != null) {
 14.1046 +                currentStereotype = VariableStereotype.recognizeStereotype(type);
 14.1047 +            } else {
 14.1048 +                currentStereotype = VariableStereotype.GLOBAL_TYPE;
 14.1049 +            }
 14.1050 +        } else if (var.getMessageType() != null) {
 14.1051 +            currentStereotype = VariableStereotype.MESSAGE;
 14.1052 +        } else if (var.getElement() != null) {
 14.1053 +            currentStereotype = VariableStereotype.GLOBAL_ELEMENT;
 14.1054 +        } else {
 14.1055 +            currentStereotype = VariableStereotype.MESSAGE;
 14.1056 +        }
 14.1057 +        return currentStereotype;
 14.1058 +    }
 14.1059 +
 14.1060 +    public static Reference getVariableType(AbstractVariableDeclaration variable) {
 14.1061 +        NamedComponentReference<GlobalElement> elemRef = variable.getElement();
 14.1062 +        if (elemRef != null) {
 14.1063 +            return elemRef;
 14.1064 +        }
 14.1065 +        //
 14.1066 +        NamedComponentReference<GlobalType> typeRef = variable.getType();
 14.1067 +        if (typeRef != null) {
 14.1068 +            return typeRef;
 14.1069 +        }
 14.1070 +        //
 14.1071 +        WSDLReference<Message> msgRef = variable.getMessageType();
 14.1072 +        if (msgRef != null) {
 14.1073 +            return msgRef;
 14.1074 +        }
 14.1075 +        //
 14.1076 +        return null;
 14.1077 +    }
 14.1078 +
 14.1079 +    public static SchemaComponent getVariableSchemaType(
 14.1080 +            AbstractVariableDeclaration variable) {
 14.1081 +        NamedComponentReference<GlobalElement> elemRef = variable.getElement();
 14.1082 +        if (elemRef != null) {
 14.1083 +            GlobalElement gElem = elemRef.get();
 14.1084 +            if (gElem != null) {
 14.1085 +                return gElem;
 14.1086 +            }
 14.1087 +        }
 14.1088 +        //
 14.1089 +        NamedComponentReference<GlobalType> typeRef = variable.getType();
 14.1090 +        if (typeRef != null) {
 14.1091 +            GlobalType gType = typeRef.get();
 14.1092 +            if (gType != null) {
 14.1093 +                return gType;
 14.1094 +            }
 14.1095 +        }
 14.1096 +        return null;
 14.1097 +    }
 14.1098 +
 14.1099 +    public static SchemaComponent getPartType(Part part) {
 14.1100 +        NamedComponentReference<GlobalElement> elemRef = part.getElement();
 14.1101 +        if (elemRef != null) {
 14.1102 +            GlobalElement gElem = elemRef.get();
 14.1103 +            if (gElem != null) {
 14.1104 +                return gElem;
 14.1105 +            }
 14.1106 +        }
 14.1107 +        //
 14.1108 +        NamedComponentReference<GlobalType> typeRef = part.getType();
 14.1109 +        if (typeRef != null) {
 14.1110 +            GlobalType gType = typeRef.get();
 14.1111 +            if (gType != null) {
 14.1112 +                return gType;
 14.1113 +            }
 14.1114 +        }
 14.1115 +        //
 14.1116 +        return null;
 14.1117 +    }
 14.1118 +
 14.1119 +    public static List<ResultItem> filterBpelResultItems(List<ResultItem> validationResults) {
 14.1120 +        List<ResultItem> bpelResultItems = new ArrayList<ResultItem>();
 14.1121 +        
 14.1122 +        for(ResultItem resultItem: validationResults) {
 14.1123 +            Component component = resultItem.getComponents();
 14.1124 +
 14.1125 +            if(component instanceof BpelEntity) {
 14.1126 +                ResultItem bpelResultItem = 
 14.1127 +                    new ResultItem(resultItem.getValidator(),
 14.1128 +                        resultItem.getType(), component, 
 14.1129 +                        resultItem.getDescription());
 14.1130 +                bpelResultItems.add(bpelResultItem);
 14.1131 +            }
 14.1132 +        }
 14.1133 +        return bpelResultItems;
 14.1134 +    }
 14.1135 +    
 14.1136 +    public static boolean equals(ResultItem item1, ResultItem item2){
 14.1137 +        if (item1 == item2){
 14.1138 +            return true;
 14.1139 +        }
 14.1140 +        if ( !item1.getDescription().equals(item2.getDescription())) {
 14.1141 +            return false;
 14.1142 +        }
 14.1143 +        
 14.1144 +        if ( !item1.getType().equals(item2.getType())) {
 14.1145 +            return false;
 14.1146 +        }
 14.1147 +        return item1.getComponents() == item2.getComponents();
 14.1148 +    }
 14.1149 +
 14.1150 +    private static boolean contains(List<ResultItem> list, ResultItem resultItem) {
 14.1151 +        for (ResultItem item: list) {
 14.1152 +            if (equals(item, resultItem)){
 14.1153 +                return true;
 14.1154 +            }
 14.1155 +        }
 14.1156 +        return false;
 14.1157 +    }
 14.1158 +
 14.1159 +    private static final int MAX_SIMPLE_NAME_LENGTH = 50;
 14.1160 +    public static final String ENTITY_SEPARATOR = "."; // NOI18N
 14.1161 +}
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/HtmlNameManager.java	Thu Apr 17 15:50:14 2008 +0200
    15.3 @@ -0,0 +1,67 @@
    15.4 +/*
    15.5 + * The contents of this file are subject to the terms of the Common Development
    15.6 + * and Distribution License (the License). You may not use this file except in
    15.7 + * compliance with the License.
    15.8 + *
    15.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
   15.10 + * or http://www.netbeans.org/cddl.txt.
   15.11 + *
   15.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
   15.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
   15.14 + * If applicable, add the following below the CDDL Header, with the fields
   15.15 + * enclosed by brackets [] replaced by your own identifying information:
   15.16 + * "Portions Copyrighted [year] [name of copyright owner]"
   15.17 + *
   15.18 + * The Original Software is NetBeans. The Initial Developer of the Original
   15.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   15.20 + * Microsystems, Inc. All Rights Reserved.
   15.21 + */
   15.22 +package org.netbeans.modules.bpel.editors.api;
   15.23 +
   15.24 +import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   15.25 +import org.netbeans.modules.xml.xam.Component;
   15.26 +import org.netbeans.modules.xml.xam.Named;
   15.27 +import org.netbeans.modules.xml.xam.dom.DocumentComponent;
   15.28 +
   15.29 +/**
   15.30 + * @author Vitaly
   15.31 + * @version 1.0
   15.32 + */
   15.33 +public interface HtmlNameManager {
   15.34 +    boolean accept(NodeType nodeType, Object reference);
   15.35 +    String getHtmlName(NodeType nodeType, Object reference);
   15.36 +    
   15.37 +    final HtmlNameManager[] HTML_NAME_MANAGERS
   15.38 +            = new HtmlNameManager[] {new ShortHtmlNameManager()};
   15.39 +    
   15.40 +    class ShortHtmlNameManager implements HtmlNameManager {
   15.41 +        public boolean accept(NodeType nodeType, Object reference) {
   15.42 +            return reference instanceof Component;
   15.43 +        }
   15.44 +        
   15.45 +        public String getHtmlName(NodeType nodeType, Object reference) {
   15.46 +            if (!accept(nodeType, reference)) {
   15.47 +                return null;
   15.48 +            }
   15.49 +            
   15.50 +            String refName = null;
   15.51 +            if (reference instanceof Named) {
   15.52 +                refName = ((Named)reference).getName();
   15.53 +            }
   15.54 +            
   15.55 +            if (refName == null
   15.56 +                    && nodeType != null
   15.57 +                    && ! NodeType.UNKNOWN_TYPE.equals(nodeType)) {
   15.58 +                refName = nodeType.getDisplayName();
   15.59 +            }
   15.60 +            
   15.61 +            if (refName == null && reference instanceof DocumentComponent) {
   15.62 +                refName = EditorUtil.getTagName((DocumentComponent)reference);
   15.63 +            }
   15.64 +            
   15.65 +            refName = refName == null ? "" : refName;
   15.66 +            
   15.67 +            return EditorUtil.getCorrectedHtmlRenderedString(refName);
   15.68 +        }
   15.69 +    }
   15.70 +}
    16.1 --- a/bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/utils/EditorUtil.java	Thu Apr 17 10:51:04 2008 +0200
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,1380 +0,0 @@
    16.4 -/*
    16.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    16.6 - *
    16.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    16.8 - *
    16.9 - * The contents of this file are subject to the terms of either the GNU
   16.10 - * General Public License Version 2 only ("GPL") or the Common
   16.11 - * Development and Distribution License("CDDL") (collectively, the
   16.12 - * "License"). You may not use this file except in compliance with the
   16.13 - * License. You can obtain a copy of the License at
   16.14 - * http://www.netbeans.org/cddl-gplv2.html
   16.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   16.16 - * specific language governing permissions and limitations under the
   16.17 - * License.  When distributing the software, include this License Header
   16.18 - * Notice in each file and include the License file at
   16.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   16.20 - * particular file as subject to the "Classpath" exception as provided
   16.21 - * by Sun in the GPL Version 2 section of the License file that
   16.22 - * accompanied this code. If applicable, add the following below the
   16.23 - * License Header, with the fields enclosed by brackets [] replaced by
   16.24 - * your own identifying information:
   16.25 - * "Portions Copyrighted [year] [name of copyright owner]"
   16.26 - *
   16.27 - * Contributor(s):
   16.28 - *
   16.29 - * The Original Software is NetBeans. The Initial Developer of the Original
   16.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   16.31 - * Microsystems, Inc. All Rights Reserved.
   16.32 - *
   16.33 - * If you wish your version of this file to be governed by only the CDDL
   16.34 - * or only the GPL Version 2, indicate your decision by adding
   16.35 - * "[Contributor] elects to include this software in this distribution
   16.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
   16.37 - * single choice of license, a recipient has the option to distribute
   16.38 - * your version of this file under either the CDDL, the GPL Version 2 or
   16.39 - * to extend the choice of license to its licensees as provided above.
   16.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
   16.41 - * Version 2 license, then the option applies only if the new code is
   16.42 - * made subject to such option by the copyright holder.
   16.43 - */
   16.44 -package org.netbeans.modules.bpel.editors.api.utils;
   16.45 -
   16.46 -import java.beans.BeanInfo;
   16.47 -import java.util.ArrayList;
   16.48 -import java.util.HashMap;
   16.49 -import java.util.List;
   16.50 -import java.util.Map;
   16.51 -import java.util.regex.Matcher;
   16.52 -import java.util.regex.Pattern;
   16.53 -import javax.swing.Icon;
   16.54 -import javax.swing.ImageIcon;
   16.55 -import javax.swing.SwingUtilities;
   16.56 -import javax.swing.text.AbstractDocument;
   16.57 -import javax.swing.text.BadLocationException;
   16.58 -import javax.swing.text.StyledDocument;
   16.59 -
   16.60 -import org.w3c.dom.Element;
   16.61 -import org.w3c.dom.NodeList;
   16.62 -
   16.63 -import org.netbeans.core.api.multiview.MultiViewHandler;
   16.64 -import org.netbeans.core.api.multiview.MultiViewPerspective;
   16.65 -import org.netbeans.core.api.multiview.MultiViews;
   16.66 -import org.netbeans.modules.xml.xam.ui.highlight.Highlight;
   16.67 -import org.netbeans.modules.xml.xam.ui.highlight.HighlightGroup;
   16.68 -import org.netbeans.modules.xml.xam.ui.highlight.HighlightManager;
   16.69 -import org.netbeans.modules.xml.schema.ui.basic.SchemaColumnsView;
   16.70 -import org.netbeans.modules.xml.schema.ui.basic.SchemaTreeView;
   16.71 -import org.netbeans.modules.xml.validation.ShowCookie;
   16.72 -import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
   16.73 -import org.netbeans.modules.bpel.editors.api.BpelEditorConstants;
   16.74 -import org.netbeans.modules.bpel.editors.api.Constants.VariableStereotype;
   16.75 -import org.netbeans.modules.bpel.editors.api.nodes.FactoryAccess;
   16.76 -import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   16.77 -import org.netbeans.modules.bpel.model.api.AbstractVariableDeclaration;
   16.78 -import org.netbeans.modules.bpel.model.api.Assign;
   16.79 -import org.netbeans.modules.bpel.model.api.BooleanExpr;
   16.80 -import org.netbeans.modules.bpel.model.api.BpelEntity;
   16.81 -import org.netbeans.modules.bpel.model.api.Catch;
   16.82 -import org.netbeans.modules.bpel.model.api.CompensatableActivityHolder;
   16.83 -import org.netbeans.modules.bpel.model.api.Compensate;
   16.84 -import org.netbeans.modules.bpel.model.api.CompensateScope;
   16.85 -import org.netbeans.modules.bpel.model.api.CompensationHandler;
   16.86 -import org.netbeans.modules.bpel.model.api.CompletionCondition;
   16.87 -import org.netbeans.modules.bpel.model.api.CompositeActivity;
   16.88 -import org.netbeans.modules.bpel.model.api.Copy;
   16.89 -import org.netbeans.modules.bpel.model.api.Correlation;
   16.90 -import org.netbeans.modules.bpel.model.api.CorrelationSet;
   16.91 -import org.netbeans.modules.bpel.model.api.CorrelationSetContainer;
   16.92 -import org.netbeans.modules.bpel.model.api.Else;
   16.93 -import org.netbeans.modules.bpel.model.api.ElseIf;
   16.94 -import org.netbeans.modules.bpel.model.api.Empty;
   16.95 -import org.netbeans.modules.bpel.model.api.EventHandlers;
   16.96 -import org.netbeans.modules.bpel.model.api.Exit;
   16.97 -import org.netbeans.modules.bpel.model.api.FaultHandlers;
   16.98 -import org.netbeans.modules.bpel.model.api.Flow;
   16.99 -import org.netbeans.modules.bpel.model.api.ForEach;
  16.100 -import org.netbeans.modules.bpel.model.api.From;
  16.101 -import org.netbeans.modules.bpel.model.api.FromPart;
  16.102 -import org.netbeans.modules.bpel.model.api.If;
  16.103 -import org.netbeans.modules.bpel.model.api.Import;
  16.104 -import org.netbeans.modules.bpel.model.api.Invoke;
  16.105 -import org.netbeans.modules.bpel.model.api.MessageExchange;
  16.106 -import org.netbeans.modules.bpel.model.api.MessageExchangeContainer;
  16.107 -import org.netbeans.modules.bpel.model.api.OnAlarmEvent;
  16.108 -import org.netbeans.modules.bpel.model.api.OnAlarmPick;
  16.109 -import org.netbeans.modules.bpel.model.api.OnEvent;
  16.110 -import org.netbeans.modules.bpel.model.api.OnMessage;
  16.111 -import org.netbeans.modules.bpel.model.api.Process;
  16.112 -import org.netbeans.modules.bpel.model.api.PartnerLink;
  16.113 -import org.netbeans.modules.bpel.model.api.PatternedCorrelation;
  16.114 -import org.netbeans.modules.bpel.model.api.Pick;
  16.115 -import org.netbeans.modules.bpel.model.api.Receive;
  16.116 -import org.netbeans.modules.bpel.model.api.RepeatUntil;
  16.117 -import org.netbeans.modules.bpel.model.api.Reply;
  16.118 -import org.netbeans.modules.bpel.model.api.Scope;
  16.119 -import org.netbeans.modules.bpel.model.api.Sequence;
  16.120 -import org.netbeans.modules.bpel.model.api.TerminationHandler;
  16.121 -import org.netbeans.modules.bpel.model.api.Throw;
  16.122 -import org.netbeans.modules.bpel.model.api.To;
  16.123 -import org.netbeans.modules.bpel.model.api.ToPart;
  16.124 -import org.netbeans.modules.bpel.model.api.Variable;
  16.125 -import org.netbeans.modules.bpel.model.api.VariableContainer;
  16.126 -import org.netbeans.modules.bpel.model.api.Wait;
  16.127 -import org.netbeans.modules.bpel.model.api.While;
  16.128 -import org.netbeans.modules.bpel.model.api.BpelModel;
  16.129 -import org.netbeans.modules.bpel.model.api.ReThrow;
  16.130 -import org.netbeans.modules.bpel.model.api.references.SchemaReference;
  16.131 -import org.netbeans.modules.bpel.model.api.references.WSDLReference;
  16.132 -import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
  16.133 -import org.netbeans.modules.xml.schema.model.GlobalElement;
  16.134 -import org.netbeans.modules.xml.schema.model.GlobalType;
  16.135 -import org.netbeans.modules.xml.xam.Component;
  16.136 -import org.netbeans.modules.xml.xam.Model;
  16.137 -import org.netbeans.modules.xml.xam.ModelSource;
  16.138 -import org.netbeans.modules.xml.xam.Named;
  16.139 -import org.netbeans.modules.xml.xam.Reference;
  16.140 -import org.netbeans.modules.xml.xam.Referenceable;
  16.141 -import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
  16.142 -import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
  16.143 -import org.netbeans.modules.xml.xam.dom.DocumentComponent;
  16.144 -import org.netbeans.modules.xml.schema.ui.nodes.categorized.CategorizedSchemaNodeFactory;
  16.145 -import org.netbeans.modules.xml.wsdl.ui.view.treeeditor.NodesFactory;
  16.146 -import org.openide.ErrorManager;
  16.147 -import org.openide.cookies.EditCookie;
  16.148 -import org.openide.cookies.LineCookie;
  16.149 -import org.openide.filesystems.FileObject;
  16.150 -import org.openide.loaders.DataObject;
  16.151 -import org.openide.loaders.DataObjectNotFoundException;
  16.152 -import org.openide.nodes.Node;
  16.153 -import org.openide.text.CloneableEditorSupport;
  16.154 -import org.openide.text.Line;
  16.155 -import org.openide.text.NbDocument;
  16.156 -import org.openide.util.Lookup;
  16.157 -import org.openide.util.lookup.Lookups;
  16.158 -import org.openide.windows.TopComponent;
  16.159 -import org.openide.windows.WindowManager;
  16.160 -import org.netbeans.modules.xml.schema.model.SchemaComponent;
  16.161 -import org.netbeans.modules.xml.schema.model.SchemaModel;
  16.162 -import org.netbeans.modules.xml.wsdl.model.Message;
  16.163 -import org.netbeans.modules.xml.wsdl.model.Part;
  16.164 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  16.165 -import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
  16.166 -
  16.167 -/**
  16.168 - * @author Vitaly Bychkov
  16.169 - * @version 1.0
  16.170 - */
  16.171 -public class EditorUtil {
  16.172 -
  16.173 -    private EditorUtil() {}
  16.174 -    
  16.175 -    public static BpelModel getBpelModel(DataObject data) {
  16.176 -      if ( !(data instanceof Lookup.Provider)) {
  16.177 -        return null;
  16.178 -      }
  16.179 -      Lookup.Provider provider = (Lookup.Provider) data;
  16.180 -
  16.181 -      // # 100277
  16.182 -      try {
  16.183 -        return (BpelModel) provider.getLookup().lookup(BpelModel.class);
  16.184 -      }
  16.185 -      catch (IllegalStateException e) {
  16.186 -        return null;
  16.187 -      }
  16.188 -    }
  16.189 -
  16.190 -    public static String getName(Component component) {
  16.191 -        String name = null;
  16.192 -
  16.193 -        if (component instanceof Named) {
  16.194 -            name = ((Named)component).getName();
  16.195 -        } else if (component instanceof BooleanExpr) {
  16.196 -            name = ((BooleanExpr)component).getContent();
  16.197 -            name = name == null ? null : name.trim();
  16.198 -            if (name != null && name.length() > MAX_SIMPLE_NAME_LENGTH) {
  16.199 -                name = name.substring(0, MAX_SIMPLE_NAME_LENGTH);
  16.200 -            }
  16.201 -        } else if (component instanceof BpelEntity) {
  16.202 -            org.netbeans.modules.bpel.editors.api.nodes.NodeType
  16.203 -                    bpelNodeType = getBasicNodeType((BpelEntity)component);
  16.204 -            
  16.205 -            if (bpelNodeType != null 
  16.206 -                    && ! NodeType.UNKNOWN_TYPE.equals(bpelNodeType))
  16.207 -            {
  16.208 -                name = bpelNodeType.getDisplayName();
  16.209 -            }
  16.210 -        }
  16.211 -        
  16.212 -        if (name == null && component instanceof DocumentComponent) {
  16.213 -            name = getTagName((DocumentComponent)component);
  16.214 -        }
  16.215 -        return name == null ? "" : name;
  16.216 -    }
  16.217 -    
  16.218 -    public static String getHtmlName(Component component) {
  16.219 -        String htmlName = null;
  16.220 -        NodeType nodeType = getBpelNodeType(component);
  16.221 -        
  16.222 -        HtmlNameManager[] nameManagers =  HtmlNameManager.HTML_NAME_MANAGERS;
  16.223 -        for (HtmlNameManager htmlNameManager : nameManagers) {
  16.224 -            if (htmlNameManager.accept(nodeType, component)) {
  16.225 -                htmlName = htmlNameManager.getHtmlName(nodeType, component);
  16.226 -            }
  16.227 -        }
  16.228 -
  16.229 -        htmlName = htmlName == null ? "" : htmlName;
  16.230 -        
  16.231 -        return removeHtmlHeader(htmlName);
  16.232 -    }
  16.233 -    
  16.234 -    public static Icon getIcon(Component component) {
  16.235 -        // vlv
  16.236 -        Node node = getNode(component);
  16.237 -
  16.238 -        if (node  != null) {
  16.239 -          return new ImageIcon(node.getIcon(BeanInfo.ICON_COLOR_16x16));
  16.240 -        }
  16.241 -        Icon icon = null;
  16.242 -
  16.243 -        if (component instanceof BpelEntity) {
  16.244 -            org.netbeans.modules.bpel.editors.api.nodes.NodeType
  16.245 -                bpelNodeType = getBasicNodeType((BpelEntity)component);
  16.246 -            if (bpelNodeType != null 
  16.247 -                    && ! org.netbeans.modules.bpel.editors.api.nodes.NodeType.UNKNOWN_TYPE.equals(bpelNodeType)) 
  16.248 -            {
  16.249 -                icon = bpelNodeType.getIcon();
  16.250 -            }
  16.251 -        }
  16.252 -        
  16.253 -        icon = icon != null 
  16.254 -                ? icon 
  16.255 -                : org.netbeans.modules.bpel.editors.api.nodes.NodeType.
  16.256 -                                            DEFAULT_BPEL_ENTITY_NODE.getIcon();
  16.257 -        
  16.258 -        return icon;
  16.259 -    }
  16.260 -                        
  16.261 -    // vlv
  16.262 -    public static String getToolTip(Component component) {
  16.263 -      String type = getType(component);
  16.264 -
  16.265 -      if (type != null) {
  16.266 -        return "<html>" + type + " <b>" + getName(component) + "</b></html>";
  16.267 -      }
  16.268 -      return getName(component);
  16.269 -    }
  16.270 -
  16.271 -    // vlv
  16.272 -    public static String getType(Component component) {
  16.273 -      String type = null;
  16.274 -      
  16.275 -      if (component instanceof BpelEntity) {
  16.276 -        type = ((BpelEntity) component).getElementType().getName();
  16.277 -      }
  16.278 -      else if (component instanceof SchemaComponent) {
  16.279 -        type = ((SchemaComponent) component).getComponentType().getName();
  16.280 -      }
  16.281 -      else {
  16.282 -        type = component.getClass().getName();
  16.283 -      }
  16.284 -      int k = type.lastIndexOf("."); // NOI18N
  16.285 -
  16.286 -      if (k == -1) {
  16.287 -        return type;
  16.288 -      }
  16.289 -      return type.substring(k + 1);
  16.290 -    }
  16.291 -
  16.292 -    // vlv
  16.293 -    private static Node getNode(Component component) {
  16.294 -      if (component instanceof SchemaComponent) {
  16.295 -        SchemaComponent schemaComponent = (SchemaComponent) component;
  16.296 -        CategorizedSchemaNodeFactory factory = new CategorizedSchemaNodeFactory(schemaComponent.getModel(), Lookups.singleton(schemaComponent));
  16.297 -        return factory.createNode(schemaComponent);
  16.298 -      }
  16.299 -      if (component instanceof WSDLComponent) {
  16.300 -        return NodesFactory.getInstance().create(component);
  16.301 -      }
  16.302 -      return null;
  16.303 -    }
  16.304 -    
  16.305 -    private static String removeHtmlHeader(String htmlString) {
  16.306 -        if (htmlString == null) {
  16.307 -            return htmlString;
  16.308 -        }
  16.309 -        
  16.310 -        String htmlStart = "<html>"; // NOI18N
  16.311 -        String htmlEnd = "</html>"; // NOI18N
  16.312 -        
  16.313 -        if (htmlString.matches(htmlStart+".*"+htmlEnd)) {
  16.314 -            htmlString = htmlString.substring(htmlStart.length() -1,
  16.315 -                    htmlString.length() - htmlEnd.length() + 1);
  16.316 -        }
  16.317 -        
  16.318 -        return htmlString;
  16.319 -    }
  16.320 -    
  16.321 -    private static NodeType getBpelNodeType(Component component) {
  16.322 -        if (!(component instanceof BpelEntity)) {
  16.323 -            return null;
  16.324 -        }
  16.325 -        return getBasicNodeType((BpelEntity)component);
  16.326 -    }
  16.327 -
  16.328 -
  16.329 -    public static String getUsageContextPath(String suffix, BpelEntity entity, Class<? extends BpelEntity> filter) {
  16.330 -        String resultStr = getUsageContextPath(entity, filter);
  16.331 -        if (resultStr != null) {
  16.332 -            suffix = suffix == null ? "" : ENTITY_SEPARATOR+suffix; // NOI18N
  16.333 -            resultStr += suffix;
  16.334 -        } else {
  16.335 -            resultStr = suffix;
  16.336 -        }
  16.337 -        return resultStr;
  16.338 -    }
  16.339 -    
  16.340 -    public static String getUsageContextPath(BpelEntity entity, Class<? extends BpelEntity> filter) {
  16.341 -        assert entity != null;
  16.342 -        StringBuffer path = new StringBuffer(getName(entity));
  16.343 -        BpelEntity tmpEntity = entity;
  16.344 -        while((tmpEntity = tmpEntity.getParent()) != null) {
  16.345 -            if (tmpEntity.getElementType() == filter) {
  16.346 -                continue;
  16.347 -            }
  16.348 -            
  16.349 -            String tmpEntityName = getName(tmpEntity);
  16.350 -            if (tmpEntityName != null && tmpEntityName.length() > 0) {
  16.351 -                path.insert(0,ENTITY_SEPARATOR).insert(0,tmpEntityName);
  16.352 -            }
  16.353 -        }
  16.354 -        
  16.355 -        return path.toString();
  16.356 -    }
  16.357 -    private static Map<Class<? extends Component>, NodeType> ENTITY_NODETYPE_MAP;
  16.358 -
  16.359 -    static {
  16.360 -        ENTITY_NODETYPE_MAP = new HashMap<Class<? extends Component>, NodeType>();
  16.361 -
  16.362 -        ENTITY_NODETYPE_MAP.put(Assign.class, NodeType.ASSIGN);
  16.363 -
  16.364 -        ENTITY_NODETYPE_MAP.put(BooleanExpr.class, NodeType.BOOLEAN_EXPR);
  16.365 -
  16.366 -        ENTITY_NODETYPE_MAP.put(Catch.class, NodeType.CATCH);
  16.367 -        ENTITY_NODETYPE_MAP.put(CompensatableActivityHolder.class, NodeType.CATCH_ALL);
  16.368 -        ENTITY_NODETYPE_MAP.put(CompensationHandler.class, NodeType.COMPENSATION_HANDLER);
  16.369 -        ENTITY_NODETYPE_MAP.put(Compensate.class, NodeType.COMPENSATE);
  16.370 -        ENTITY_NODETYPE_MAP.put(CompensateScope.class, NodeType.COMPENSATE_SCOPE);
  16.371 -        ENTITY_NODETYPE_MAP.put(CompletionCondition.class
  16.372 -                , NodeType.COMPLETION_CONDITION);
  16.373 -        ENTITY_NODETYPE_MAP.put(Copy.class, NodeType.COPY);
  16.374 -        ENTITY_NODETYPE_MAP.put(Correlation.class, NodeType.CORRELATION);
  16.375 -        ENTITY_NODETYPE_MAP.put(CorrelationSet.class, NodeType.CORRELATION_SET);
  16.376 -        ENTITY_NODETYPE_MAP.put(CorrelationSetContainer.class
  16.377 -                , NodeType.CORRELATION_SET_CONTAINER);
  16.378 -
  16.379 -        ENTITY_NODETYPE_MAP.put(Else.class, NodeType.ELSE);
  16.380 -        ENTITY_NODETYPE_MAP.put(ElseIf.class, NodeType.ELSE_IF);
  16.381 -        ENTITY_NODETYPE_MAP.put(Empty.class, NodeType.EMPTY);
  16.382 -        ENTITY_NODETYPE_MAP.put(EventHandlers.class, NodeType.EVENT_HANDLERS);
  16.383 -        ENTITY_NODETYPE_MAP.put(Exit.class, NodeType.EXIT);
  16.384 -
  16.385 -        ENTITY_NODETYPE_MAP.put(FaultHandlers.class, NodeType.FAULT_HANDLERS);
  16.386 -        ENTITY_NODETYPE_MAP.put(Flow.class, NodeType.FLOW);
  16.387 -        ENTITY_NODETYPE_MAP.put(ForEach.class, NodeType.FOR_EACH);
  16.388 -        ENTITY_NODETYPE_MAP.put(From.class, NodeType.FROM);
  16.389 -        ENTITY_NODETYPE_MAP.put(FromPart.class, NodeType.FROM_PART);
  16.390 -
  16.391 -        ENTITY_NODETYPE_MAP.put(If.class, NodeType.IF);
  16.392 -        ENTITY_NODETYPE_MAP.put(Import.class, NodeType.IMPORT);
  16.393 -        ENTITY_NODETYPE_MAP.put(Invoke.class, NodeType.INVOKE);
  16.394 -
  16.395 -        ENTITY_NODETYPE_MAP.put(MessageExchange.class
  16.396 -                , NodeType.MESSAGE_EXCHANGE);
  16.397 -        ENTITY_NODETYPE_MAP.put(MessageExchangeContainer.class
  16.398 -                , NodeType.MESSAGE_EXCHANGE_CONTAINER);
  16.399 -
  16.400 -        ENTITY_NODETYPE_MAP.put(OnAlarmEvent.class, NodeType.ALARM_EVENT_HANDLER);
  16.401 -        ENTITY_NODETYPE_MAP.put(OnAlarmPick.class, NodeType.ALARM_HANDLER);
  16.402 -        ENTITY_NODETYPE_MAP.put(OnEvent.class, NodeType.ON_EVENT);
  16.403 -        ENTITY_NODETYPE_MAP.put(OnMessage.class, NodeType.MESSAGE_HANDLER);
  16.404 -
  16.405 -        ENTITY_NODETYPE_MAP.put(PartnerLink.class, NodeType.PARTNER_LINK);
  16.406 -        ENTITY_NODETYPE_MAP.put(PatternedCorrelation.class, NodeType.CORRELATION_P);
  16.407 -        ENTITY_NODETYPE_MAP.put(Pick.class, NodeType.PICK);
  16.408 -        ENTITY_NODETYPE_MAP.put(Process.class, NodeType.PROCESS);
  16.409 -
  16.410 -        ENTITY_NODETYPE_MAP.put(Receive.class, NodeType.RECEIVE);
  16.411 -        ENTITY_NODETYPE_MAP.put(RepeatUntil.class, NodeType.REPEAT_UNTIL);
  16.412 -        ENTITY_NODETYPE_MAP.put(Reply.class, NodeType.REPLY);
  16.413 -
  16.414 -        ENTITY_NODETYPE_MAP.put(Scope.class, NodeType.SCOPE);
  16.415 -        ENTITY_NODETYPE_MAP.put(Sequence.class, NodeType.SEQUENCE);
  16.416 -
  16.417 -        ENTITY_NODETYPE_MAP.put(TerminationHandler.class, NodeType.TERMINATION_HANDLER);
  16.418 -        ENTITY_NODETYPE_MAP.put(Throw.class, NodeType.THROW);
  16.419 -        ENTITY_NODETYPE_MAP.put(ReThrow.class, NodeType.RETHROW);
  16.420 -        ENTITY_NODETYPE_MAP.put(To.class, NodeType.TO);
  16.421 -        ENTITY_NODETYPE_MAP.put(ToPart.class, NodeType.TO_PART);
  16.422 -
  16.423 -        ENTITY_NODETYPE_MAP.put(Wait.class, NodeType.WAIT);
  16.424 -        ENTITY_NODETYPE_MAP.put(While.class, NodeType.WHILE);
  16.425 -
  16.426 -        ENTITY_NODETYPE_MAP.put(Variable.class, NodeType.VARIABLE);
  16.427 -        ENTITY_NODETYPE_MAP.put(VariableContainer.class, NodeType.VARIABLE_CONTAINER);
  16.428 -    }
  16.429 -
  16.430 -    /**
  16.431 -     *
  16.432 -     * @param entityClass class which represents primary entity interface
  16.433 -     * @return generally used NodeType
  16.434 -     */
  16.435 -    public static NodeType getBasicNodeType(Class<? extends Component> entityClass) {
  16.436 -        NodeType entityType = ENTITY_NODETYPE_MAP.get(entityClass);
  16.437 -        return entityType == null ? NodeType.UNKNOWN_TYPE : entityType;
  16.438 -    }
  16.439 -
  16.440 -    public static boolean isNavigatorShowableNodeType(NodeType nodeType) {
  16.441 -        if (nodeType == null) {
  16.442 -            return false;
  16.443 -        }
  16.444 -        boolean isShowable = true;
  16.445 -        switch (nodeType) {
  16.446 -        case UNKNOWN_TYPE:
  16.447 -        case DEFAULT_BPEL_ENTITY_NODE:
  16.448 -        case FROM:
  16.449 -        case TO:
  16.450 -        case BOOLEAN_EXPR:
  16.451 -            isShowable = false;
  16.452 -            break;
  16.453 -        default:
  16.454 -            isShowable = true;
  16.455 -        }
  16.456 -
  16.457 -        return isShowable;
  16.458 -    }
  16.459 -
  16.460 -    /**
  16.461 -     *
  16.462 -     * @param entity
  16.463 -     * @param lookup
  16.464 -     * @return the closest node
  16.465 -     */
  16.466 -    public static Node getClosestNavigatorNode(
  16.467 -            BpelEntity entity,
  16.468 -            Lookup lookup)
  16.469 -    {
  16.470 -        if (entity == null || entity.getElementType() == null) {
  16.471 -            return null;
  16.472 -        }
  16.473 -        Node basicNode = null;
  16.474 -        BpelEntity curEntity = entity;
  16.475 -        NodeType basicNodeType = getBasicNodeType(entity);
  16.476 -
  16.477 -        while (!isNavigatorShowableNodeType(basicNodeType)
  16.478 -
  16.479 -                && curEntity != null )
  16.480 -        {
  16.481 -            curEntity = curEntity.getParent();
  16.482 -            basicNodeType = getBasicNodeType(curEntity);
  16.483 -        }
  16.484 -
  16.485 -        if (curEntity != null
  16.486 -                && !(NodeType.UNKNOWN_TYPE.equals(basicNodeType)))
  16.487 -        {
  16.488 -            basicNode = FactoryAccess.getPropertyNodeFactory().
  16.489 -                    createNode(basicNodeType, curEntity, lookup);
  16.490 -        }
  16.491 -        return basicNode;
  16.492 -    }
  16.493 -
  16.494 -    // vlv
  16.495 -    public static Component getRoot(Model model) {
  16.496 -      if (model instanceof BpelModel) {
  16.497 -        return ((BpelModel) model).getProcess();
  16.498 -      }
  16.499 -      if (model instanceof SchemaModel) {
  16.500 -        return ((SchemaModel) model).getSchema();
  16.501 -      }
  16.502 -      if (model instanceof WSDLModel) {
  16.503 -        return ((WSDLModel) model).getDefinitions();
  16.504 -      }
  16.505 -      return null;
  16.506 -    }
  16.507 -
  16.508 -    /**
  16.509 -     * This method don't aware about bpelModel lock
  16.510 -     * @param component Component
  16.511 -     * @return generally used NodeType, if entity or
  16.512 -     *  enity#getElementType is null then return null
  16.513 -     */
  16.514 -    public static NodeType getBasicNodeType(Component component) {
  16.515 -        if ( !(component instanceof BpelEntity)) {
  16.516 -            // todo m
  16.517 -            return null;
  16.518 -        }
  16.519 -        BpelEntity bpelEntity = (BpelEntity) component;
  16.520 -
  16.521 -        if (bpelEntity == null || bpelEntity.getElementType() == null) {
  16.522 -            return null;
  16.523 -        }
  16.524 -        return getBasicNodeType(bpelEntity.getElementType());
  16.525 -    }
  16.526 -
  16.527 -    public static void goToSource(Component component) {
  16.528 -        if ( !(component instanceof DocumentComponent)) {
  16.529 -            return;
  16.530 -        }
  16.531 -        DocumentComponent document = (DocumentComponent) component;
  16.532 -        FileObject fo = getFileObjectByModel(component.getModel());
  16.533 -
  16.534 -        if (fo == null) {
  16.535 -            return;
  16.536 -        }
  16.537 -        try {
  16.538 -            DataObject d = DataObject.find(fo);
  16.539 -            LineCookie lc = d.getCookie(LineCookie.class);
  16.540 -            if (lc == null) {
  16.541 -                return;
  16.542 -            }
  16.543 -            int lineNum = getLineNum(document);
  16.544 -            if (lineNum < 0) {
  16.545 -                return;
  16.546 -            }
  16.547 -
  16.548 -            final Line l = lc.getLineSet().getCurrent(lineNum);
  16.549 -            final int column = getColumnNum(document);
  16.550 -            if (column < 0) {
  16.551 -                return;
  16.552 -            }
  16.553 -
  16.554 -            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  16.555 -                public void run() {
  16.556 -                    l.show(Line.SHOW_GOTO, column);
  16.557 -                    openActiveSourceEditor();
  16.558 -                }
  16.559 -            });
  16.560 -        } catch (DataObjectNotFoundException ex) {
  16.561 -          return;
  16.562 -        }
  16.563 -    }
  16.564 -
  16.565 -    public static void goToLoggingAlerting(Component component) {
  16.566 -        assert component instanceof BpelEntity ;
  16.567 -
  16.568 -        final BpelEntity bpelEntity = (BpelEntity) component;
  16.569 -        FileObject fo = getFileObjectByModel(bpelEntity.getBpelModel());
  16.570 -
  16.571 -        if (fo == null) {
  16.572 -            return;                                                        }
  16.573 -        try {
  16.574 -            DataObject d = DataObject.find(fo);
  16.575 -            final Lookup lookup = d.getLookup();
  16.576 -
  16.577 -            final EditCookie ec = d.getCookie(EditCookie.class);
  16.578 -            if (ec == null) {
  16.579 -                return;
  16.580 -            }
  16.581 -
  16.582 -            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  16.583 -                public void run() {
  16.584 -                    ec.edit();
  16.585 -                    openActiveLoggingEditor();
  16.586 -                }
  16.587 -            });
  16.588 -        } catch (DataObjectNotFoundException ex) {
  16.589 -            ErrorManager.getDefault().notify(ex);
  16.590 -        }
  16.591 -    }
  16.592 -
  16.593 -    public static void goToBusinessRules(Component component) {
  16.594 -        assert component instanceof BpelEntity ;
  16.595 -
  16.596 -        final BpelEntity bpelEntity = (BpelEntity) component;
  16.597 -        FileObject fo = getFileObjectByModel(bpelEntity.getBpelModel());
  16.598 -
  16.599 -        if (fo == null) {
  16.600 -            return;                                                        }
  16.601 -        try {
  16.602 -            DataObject d = DataObject.find(fo);
  16.603 -            final Lookup lookup = d.getLookup();
  16.604 -
  16.605 -            final EditCookie ec = d.getCookie(EditCookie.class);
  16.606 -            if (ec == null) {
  16.607 -                return;
  16.608 -            }
  16.609 -
  16.610 -            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  16.611 -                public void run() {
  16.612 -                    ec.edit();
  16.613 -                    openActiveMapperEditor();
  16.614 -                    if (lookup != null || bpelEntity != null) {
  16.615 -                        NodeType nodeType = getBasicNodeType(bpelEntity);
  16.616 -                        if (nodeType == null || NodeType.UNKNOWN_TYPE.equals(nodeType)) {
  16.617 -                            return;
  16.618 -                        }
  16.619 -                        Node bpelNode = FactoryAccess.getPropertyNodeFactory()
  16.620 -                        .createNode(nodeType,bpelEntity, lookup);
  16.621 -                        //TODO m
  16.622 -                        TopComponent mapperTc = WindowManager.getDefault().getRegistry().getActivated();
  16.623 -                        if (mapperTc != null) {
  16.624 -                            mapperTc.setActivatedNodes(new Node[0]);
  16.625 -                            mapperTc.setActivatedNodes(new Node[] {bpelNode});
  16.626 -                        }
  16.627 -                    }
  16.628 -                }
  16.629 -            });
  16.630 -        } catch (DataObjectNotFoundException ex) {
  16.631 -            ErrorManager.getDefault().notify(ex);
  16.632 -        }
  16.633 -    }
  16.634 -
  16.635 -    public static void goToDesign(Component component) {
  16.636 -        goToDesign(component, null, null);
  16.637 -    }
  16.638 -
  16.639 -    public static void goToDesign(final Component component, Object cookie, Object view) {
  16.640 -        // vlv
  16.641 -        if ( !(component instanceof BpelEntity)) {
  16.642 -          HighlightManager manager = HighlightManager.getDefault();
  16.643 -          List<HighlightGroup> groups = manager.getHighlightGroups(HighlightGroup.SEARCH);
  16.644 -
  16.645 -          if (groups != null) {
  16.646 -            for (HighlightGroup group : groups) {
  16.647 -              manager.removeHighlightGroup(group);
  16.648 -            }
  16.649 -          }
  16.650 -          HighlightGroup group = new HighlightGroup(HighlightGroup.SEARCH);
  16.651 -          Highlight highlight = new Highlight(component, Highlight.SEARCH_RESULT);
  16.652 -          group.addHighlight(highlight);
  16.653 -          manager.addHighlightGroup(group);
  16.654 -
  16.655 -          if (view instanceof SchemaTreeView && component instanceof SchemaComponent) {
  16.656 -            ((SchemaTreeView) view).showComponent((SchemaComponent) component);
  16.657 -            return;
  16.658 -          }
  16.659 -          if (view instanceof SchemaColumnsView && component instanceof SchemaComponent) {
  16.660 -            ((SchemaColumnsView) view).showComponent((SchemaComponent) component);
  16.661 -            return;
  16.662 -          }
  16.663 -          if (cookie instanceof ShowCookie) {
  16.664 -//System.out.println();
  16.665 -//System.out.println("========: " + cookie.getClass().getName());
  16.666 -//System.out.println();
  16.667 -            ((ShowCookie) cookie).show(new ResultItem(null, null, component, null));
  16.668 -            return;
  16.669 -          }
  16.670 -          return;
  16.671 -        }
  16.672 -        final BpelEntity bpelEntity = (BpelEntity) component;
  16.673 -        FileObject fo = getFileObjectByModel(bpelEntity.getBpelModel());
  16.674 -
  16.675 -        if (fo == null) {
  16.676 -            return;                                                        }
  16.677 -        try {
  16.678 -            DataObject d = DataObject.find(fo);
  16.679 -            final Lookup lookup = d != null ? d.getLookup() : null;
  16.680 -
  16.681 -            final EditCookie ec = d.getCookie(EditCookie.class);
  16.682 -            if (ec == null) {
  16.683 -                return;
  16.684 -            }
  16.685 -
  16.686 -            javax.swing.SwingUtilities.invokeLater(new Runnable() {
  16.687 -                public void run() {
  16.688 -                    ec.edit();
  16.689 -                    openActiveDesignEditor();
  16.690 -                    if (lookup != null || bpelEntity != null) {
  16.691 -                        NodeType nodeType = getBasicNodeType(bpelEntity);
  16.692 -                        if (nodeType == null) {
  16.693 -                            return;
  16.694 -                        } else if (NodeType.UNKNOWN_TYPE.equals(nodeType)) {
  16.695 -                            nodeType = NodeType.DEFAULT_BPEL_ENTITY_NODE;
  16.696 -                        }
  16.697 -                        Node bpelNode = FactoryAccess.getPropertyNodeFactory()
  16.698 -                        .createNode(nodeType,bpelEntity, lookup);
  16.699 -                        //TODO m
  16.700 -                        TopComponent designTc = WindowManager.getDefault().getRegistry().getActivated();
  16.701 -                        if (designTc != null) {
  16.702 -                            designTc.setActivatedNodes(new Node[0]);
  16.703 -                            designTc.setActivatedNodes(new Node[] {bpelNode});
  16.704 -                        }
  16.705 -                    }
  16.706 -                }
  16.707 -            });
  16.708 -        } catch (DataObjectNotFoundException ex) {
  16.709 -          return;
  16.710 -        }
  16.711 -    }
  16.712 -
  16.713 -    public static FileObject getFileObjectByModel(Model model) {
  16.714 -      if (model == null) {
  16.715 -        return null;
  16.716 -      }
  16.717 -      ModelSource src = model.getModelSource();
  16.718 -
  16.719 -      if (src == null) {
  16.720 -       return null;
  16.721 -      }
  16.722 -      Lookup lookup = src.getLookup();
  16.723 -
  16.724 -      if (lookup == null) {
  16.725 -        return null;
  16.726 -      }
  16.727 -      return lookup.lookup(FileObject.class);
  16.728 -    }
  16.729 -
  16.730 -    // TODO r|m
  16.731 -    public static String getTextForBpelEntity(final Component comp){
  16.732 -        BpelEntity entity = null;
  16.733 -        if (comp instanceof BpelEntity){
  16.734 -            entity = BpelEntity.class.cast(comp);
  16.735 -        }
  16.736 -        if (entity == null) {
  16.737 -            return ""; // NOI18N
  16.738 -        }
  16.739 -
  16.740 -        FileObject fo = getFileObjectByModel(entity.getBpelModel());
  16.741 -        if (fo == null) {
  16.742 -            return ""; // NOI18N
  16.743 -        }
  16.744 -
  16.745 -        // TODO - if the line doesn't contain the target (query component name) string, keep searcing subsequent lines
  16.746 -
  16.747 -
  16.748 -        DataObject dobj = null;
  16.749 -        try {
  16.750 -            dobj = DataObject.find(fo);
  16.751 -        } catch (DataObjectNotFoundException ex) {
  16.752 -            return null;
  16.753 -        }
  16.754 -
  16.755 -
  16.756 -        int line = getLineNum(entity);
  16.757 -        int col = getColumnNum(entity);
  16.758 -        ModelSource modelSource = entity.getBpelModel().getModelSource();
  16.759 -        assert modelSource != null;
  16.760 -        Lookup lookup = modelSource.getLookup();
  16.761 -
  16.762 -        StyledDocument document = lookup.lookup(StyledDocument.class);
  16.763 -        if (document == null) {
  16.764 -            return ""; // NOI18N
  16.765 -        }
  16.766 -
  16.767 -        CloneableEditorSupport editor = (CloneableEditorSupport)dobj.getCookie(org.openide.cookies.EditorCookie.class);
  16.768 -        Line.Set s =editor.getLineSet();
  16.769 -
  16.770 -        Line xmlLine = s.getCurrent(line);
  16.771 -        String nodeLabel =   xmlLine.getText().trim();
  16.772 -        // substitute xml angle brackets <> for &lt; and &gt;
  16.773 -        Pattern lt = Pattern.compile("<"); //NOI18N
  16.774 -        Matcher mlt = lt.matcher(nodeLabel);
  16.775 -        nodeLabel = mlt.replaceAll("&lt;");  //NOI18N
  16.776 -        Pattern gt = Pattern.compile(">"); //NOI18N
  16.777 -        Matcher mgt = gt.matcher(nodeLabel);
  16.778 -        nodeLabel = mgt.replaceAll("&gt;");  //NOI18N
  16.779 -        return boldenRefOrType(nodeLabel);
  16.780 -    }
  16.781 -
  16.782 -    // private methods
  16.783 -    private static int getLineNum(DocumentComponent entity) {
  16.784 -        int position = entity.findPosition();
  16.785 -        ModelSource modelSource = entity.getModel().getModelSource();
  16.786 -        assert modelSource != null;
  16.787 -        Lookup lookup = modelSource.getLookup();
  16.788 -
  16.789 -        StyledDocument document = lookup.lookup(StyledDocument.class);
  16.790 -        if (document == null) {
  16.791 -            return -1;
  16.792 -        }
  16.793 -        return NbDocument.findLineNumber(document,position);
  16.794 -    }
  16.795 -
  16.796 -    private static int getColumnNum(DocumentComponent entity) {
  16.797 -        int position = entity.findPosition();
  16.798 -        ModelSource modelSource = entity.getModel().getModelSource();
  16.799 -        assert modelSource != null;
  16.800 -        Lookup lookup = modelSource.getLookup();
  16.801 -
  16.802 -        StyledDocument document = lookup.lookup(StyledDocument.class);
  16.803 -        if (document == null) {
  16.804 -            return -1;
  16.805 -        }
  16.806 -        return NbDocument.findLineColumn(document,position);
  16.807 -    }
  16.808 -
  16.809 -    private static void openActiveDesignEditor() {
  16.810 -        openActiveMVEditor(BpelEditorConstants.BPEL_DESIGNMV_PREFFERED_ID);
  16.811 -    }
  16.812 -
  16.813 -    private static void openActiveMapperEditor() {
  16.814 -        openActiveMVEditor(BpelEditorConstants.BPEL_MAPPERMV_PREFFERED_ID);
  16.815 -    }
  16.816 -
  16.817 -    private static void openActiveLoggingEditor() {
  16.818 -        openActiveMVEditor(BpelEditorConstants.BPEL_LOGGINGMV_PREFFERED_ID);
  16.819 -    }
  16.820 -
  16.821 -    private static void openActiveSourceEditor() {
  16.822 -        openActiveMVEditor(BpelEditorConstants.BPEL_SOURCEMV_PREFFERED_ID);
  16.823 -    }
  16.824 -
  16.825 -    private static void openActiveMVEditor(String mvPreferedID) {
  16.826 -        if (mvPreferedID == null) {
  16.827 -            return;
  16.828 -        }
  16.829 -
  16.830 -        TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();
  16.831 -
  16.832 -        MultiViewHandler mvh = MultiViews.findMultiViewHandler(tc);
  16.833 -        if (mvh == null) {
  16.834 -            return;
  16.835 -        }
  16.836 -
  16.837 -        MultiViewPerspective[] mvps = mvh.getPerspectives();
  16.838 -        if (mvps != null && mvps.length >0) {
  16.839 -            for (MultiViewPerspective mvp : mvps) {
  16.840 -                if (mvp.preferredID().equals(mvPreferedID)) {  // NOI18N
  16.841 -                    mvh.requestVisible(mvp);
  16.842 -                    mvh.requestActive(mvp);
  16.843 -                }
  16.844 -            }
  16.845 -        }
  16.846 -    }
  16.847 -
  16.848 -    // TODO get xml snippet for line that contains the
  16.849 -    //  query component name
  16.850 -    /**
  16.851 -     * If the label contains ref= or type=
  16.852 -     * the substring containing the named portion of the attribute
  16.853 -     * will be surrounded with html bold tags
  16.854 -     * e.g.,
  16.855 -     * input param <xsd:element ref="comment" minOccurs="0"/>
  16.856 -     * return <xsd:element ref="<b>comment</b>" minOccurs="0"/>
  16.857 -     *
  16.858 -     *
  16.859 -     */
  16.860 -    private static String boldenRefOrType(String label){
  16.861 -        // find index of type or ref
  16.862 -        // find 1st occurence of " from index
  16.863 -        // find 1st occurence of : after ", if any
  16.864 -        // insert <b>
  16.865 -        // find closing "
  16.866 -        // insert </b>
  16.867 -        int it = label.indexOf(" type"); //NOI18N
  16.868 -        if (it < 0){
  16.869 -            it = label.indexOf(" ref"); //NOI18N
  16.870 -        }
  16.871 -        if (it < 0){
  16.872 -            // no type or ref found
  16.873 -            return label;
  16.874 -        }
  16.875 -        int iq1 = label.indexOf('"',it);
  16.876 -        if (iq1 < it){
  16.877 -            // no begin quote
  16.878 -            return label;
  16.879 -        }
  16.880 -        int ic = label.indexOf(':',iq1);
  16.881 -        if (ic < iq1){
  16.882 -            // no colon
  16.883 -        }
  16.884 -        int iq2 = label.indexOf('"', iq1+1);
  16.885 -        if (iq2 < iq1 || ic > iq2){
  16.886 -            // couldn't find closing quote for tag
  16.887 -            return label;
  16.888 -        }
  16.889 -        int ib1 = -1;
  16.890 -        if (ic > -1){
  16.891 -            ib1 = ic+1;
  16.892 -        } else {
  16.893 -            ib1 = iq1+1;
  16.894 -        }
  16.895 -        StringBuffer l = new StringBuffer(label);
  16.896 -        l.insert(ib1,"<b>");
  16.897 -        // the close quote has now been pushed right 3 spaces
  16.898 -        l.insert(iq2+3,"</b>");
  16.899 -        return l.toString();
  16.900 -
  16.901 -    }
  16.902 -
  16.903 -    public static void goToReferenceSource(Reference<Referenceable> reference) {
  16.904 -        Referenceable referenceable = reference.get();
  16.905 -        if (referenceable == null) return;
  16.906 -        if (!(referenceable instanceof DocumentComponent)) return;
  16.907 -        goToDocumentComponentSource((DocumentComponent<DocumentComponent>) referenceable);
  16.908 -    }
  16.909 -
  16.910 -    public static boolean canGoToDocumentComponentSource(
  16.911 -            DocumentComponent<DocumentComponent> component)
  16.912 -    {
  16.913 -        if (component == null) return false;
  16.914 -
  16.915 -        Model model = component.getModel();
  16.916 -        if (model == null) return false;
  16.917 -
  16.918 -        ModelSource modelSource = model.getModelSource();
  16.919 -        if (modelSource == null) return false;
  16.920 -
  16.921 -        Lookup lookup = modelSource.getLookup();
  16.922 -        if (lookup == null) return false;
  16.923 -
  16.924 -        FileObject fileObject = lookup.lookup(FileObject.class);
  16.925 -        if (fileObject == null) return false;
  16.926 -
  16.927 -        DataObject dataObject = null;
  16.928 -        try {
  16.929 -            dataObject = DataObject.find(fileObject);
  16.930 -        } catch (DataObjectNotFoundException e) {}
  16.931 -        if (dataObject == null) return false;
  16.932 -
  16.933 -        LineCookie lineCookie = dataObject.getCookie(LineCookie.class);
  16.934 -        if (lineCookie == null) return false;
  16.935 -
  16.936 -        Line.Set lineSet = lineCookie.getLineSet();
  16.937 -        if (lineSet == null) return false;
  16.938 -
  16.939 -        StyledDocument document = lookup.lookup(StyledDocument.class);
  16.940 -        if (document == null) return false;
  16.941 -
  16.942 -        Line line = null;
  16.943 -        int column = 0;
  16.944 -
  16.945 -        try {
  16.946 -            int pos = component.findPosition();
  16.947 -            line = lineSet.getCurrent(NbDocument.findLineNumber(document, pos));
  16.948 -            column = NbDocument.findLineColumn(document, pos);
  16.949 -        } catch (IndexOutOfBoundsException e) {}
  16.950 -
  16.951 -        if (line == null) {
  16.952 -            try {
  16.953 -                line = lineCookie.getLineSet().getCurrent(0);
  16.954 -            } catch (IndexOutOfBoundsException e) {}
  16.955 -        }
  16.956 -        if (line == null) return false;
  16.957 -
  16.958 -        return true;
  16.959 -    }
  16.960 -
  16.961 -    public static void goToDocumentComponentSource(
  16.962 -            DocumentComponent<DocumentComponent> component)
  16.963 -    {
  16.964 -        if (component == null) return;
  16.965 -
  16.966 -        Model model = component.getModel();
  16.967 -        if (model == null) return;
  16.968 -
  16.969 -        ModelSource modelSource = model.getModelSource();
  16.970 -        if (modelSource == null) return;
  16.971 -
  16.972 -        Lookup lookup = modelSource.getLookup();
  16.973 -        if (lookup == null) return;
  16.974 -
  16.975 -        FileObject fileObject = lookup.lookup(FileObject.class);
  16.976 -        if (fileObject == null) return;
  16.977 -
  16.978 -        DataObject dataObject = null;
  16.979 -        try {
  16.980 -            dataObject = DataObject.find(fileObject);
  16.981 -        } catch (DataObjectNotFoundException e) {}
  16.982 -        if (dataObject == null) return;
  16.983 -
  16.984 -        LineCookie lineCookie = dataObject.getCookie(LineCookie.class);
  16.985 -        if (lineCookie == null) return;
  16.986 -
  16.987 -        Line.Set lineSet = lineCookie.getLineSet();
  16.988 -        if (lineSet == null) return;
  16.989 -
  16.990 -        StyledDocument document = lookup.lookup(StyledDocument.class);
  16.991 -        if (document == null) return;
  16.992 -
  16.993 -        Line line = null;
  16.994 -        int column = 0;
  16.995 -
  16.996 -        try {
  16.997 -            int pos = component.findPosition();
  16.998 -            line = lineSet.getCurrent(NbDocument.findLineNumber(document, pos));
  16.999 -            column = NbDocument.findLineColumn(document, pos);
 16.1000 -        } catch (IndexOutOfBoundsException e) {}
 16.1001 -
 16.1002 -        if (line == null) {
 16.1003 -            try {
 16.1004 -                line = lineCookie.getLineSet().getCurrent(0);
 16.1005 -            } catch (IndexOutOfBoundsException e) {}
 16.1006 -        }
 16.1007 -        if (line == null) return;
 16.1008 -
 16.1009 -        final Line fLine = line;
 16.1010 -        final int fColumn = column;
 16.1011 -
 16.1012 -        SwingUtilities.invokeLater(new Runnable() {
 16.1013 -            public void run() {
 16.1014 -                fLine.show(Line.SHOW_GOTO, fColumn);
 16.1015 -            }
 16.1016 -        });
 16.1017 -    }
 16.1018 -
 16.1019 -    public static int getChildIndex(BpelEntity child, CompositeActivity parent) {
 16.1020 -        assert child != null && parent != null;
 16.1021 -        int childIndex = -1;
 16.1022 -        for (int i = 0; i < parent.sizeOfActivities(); i++) {
 16.1023 -            if (child.equals(parent.getActivity(i))) {
 16.1024 -                childIndex = i;
 16.1025 -                break;
 16.1026 -            }
 16.1027 -        }
 16.1028 -        return childIndex;
 16.1029 -    }
 16.1030 -
 16.1031 -    public static final String getCorrectedHtmlRenderedString(String htmlString) {
 16.1032 -        if (htmlString == null) {
 16.1033 -            return null;
 16.1034 -        }
 16.1035 -        htmlString = htmlString.replaceAll("&amp;","&"); // NOI18n
 16.1036 -        htmlString = htmlString.replaceAll("&gt;",">;"); // NOI18n
 16.1037 -        htmlString = htmlString.replaceAll("&lt;","<"); // NOI18n
 16.1038 -
 16.1039 -        htmlString = htmlString.replaceAll("&","&amp;"); // NOI18n
 16.1040 -        htmlString = htmlString.replaceAll(">","&gt;"); // NOI18n
 16.1041 -        htmlString = htmlString.replaceAll("<","&lt;"); // NOI18n
 16.1042 -        return htmlString;
 16.1043 -    }
 16.1044 -
 16.1045 -    public static String getTagName(DocumentComponent component ) {
 16.1046 -        if (component == null) {
 16.1047 -            return null;
 16.1048 -        }
 16.1049 -
 16.1050 -        Element enEl = component.getPeer();
 16.1051 -        return enEl == null ? null : enEl.getTagName();
 16.1052 -    }
 16.1053 -
 16.1054 -    public static VariableStereotype
 16.1055 -            getVariableStereotype(AbstractVariableDeclaration var) {
 16.1056 -        if (var == null) {
 16.1057 -            return null;
 16.1058 -        }
 16.1059 -        // if (currentStereotype != null) return currentStereotype;
 16.1060 -        VariableStereotype currentStereotype = null;
 16.1061 -        //
 16.1062 -        SchemaReference<GlobalType> typeRef = var.getType();
 16.1063 -        if (typeRef != null) {
 16.1064 -            GlobalType type = typeRef.get();
 16.1065 -            if (type != null) {
 16.1066 -                currentStereotype = VariableStereotype.recognizeStereotype(type);
 16.1067 -            } else {
 16.1068 -                currentStereotype = VariableStereotype.GLOBAL_TYPE;
 16.1069 -            }
 16.1070 -        } else if (var.getMessageType() != null) {
 16.1071 -            currentStereotype = VariableStereotype.MESSAGE;
 16.1072 -        } else if (var.getElement() != null) {
 16.1073 -            currentStereotype = VariableStereotype.GLOBAL_ELEMENT;
 16.1074 -        } else {
 16.1075 -            currentStereotype = VariableStereotype.MESSAGE;
 16.1076 -        }
 16.1077 -        return currentStereotype;
 16.1078 -    }
 16.1079 -
 16.1080 -    public static Reference getVariableType(AbstractVariableDeclaration variable) {
 16.1081 -        NamedComponentReference<GlobalElement> elemRef = variable.getElement();
 16.1082 -        if (elemRef != null) {
 16.1083 -            return elemRef;
 16.1084 -        }
 16.1085 -        //
 16.1086 -        NamedComponentReference<GlobalType> typeRef = variable.getType();
 16.1087 -        if (typeRef != null) {
 16.1088 -            return typeRef;
 16.1089 -        }
 16.1090 -        //
 16.1091 -        WSDLReference<Message> msgRef = variable.getMessageType();
 16.1092 -        if (msgRef != null) {
 16.1093 -            return msgRef;
 16.1094 -        }
 16.1095 -        //
 16.1096 -        return null;
 16.1097 -    }
 16.1098 -
 16.1099 -    public static SchemaComponent getVariableSchemaType(
 16.1100 -            AbstractVariableDeclaration variable) {
 16.1101 -        NamedComponentReference<GlobalElement> elemRef = variable.getElement();
 16.1102 -        if (elemRef != null) {
 16.1103 -            GlobalElement gElem = elemRef.get();
 16.1104 -            if (gElem != null) {
 16.1105 -                return gElem;
 16.1106 -            }
 16.1107 -        }
 16.1108 -        //
 16.1109 -        NamedComponentReference<GlobalType> typeRef = variable.getType();
 16.1110 -        if (typeRef != null) {
 16.1111 -            GlobalType gType = typeRef.get();
 16.1112 -            if (gType != null) {
 16.1113 -                return gType;
 16.1114 -            }
 16.1115 -        }
 16.1116 -        return null;
 16.1117 -    }
 16.1118 -
 16.1119 -    public static SchemaComponent getPartType(Part part) {
 16.1120 -        NamedComponentReference<GlobalElement> elemRef = part.getElement();
 16.1121 -        if (elemRef != null) {
 16.1122 -            GlobalElement gElem = elemRef.get();
 16.1123 -            if (gElem != null) {
 16.1124 -                return gElem;
 16.1125 -            }
 16.1126 -        }
 16.1127 -        //
 16.1128 -        NamedComponentReference<GlobalType> typeRef = part.getType();
 16.1129 -        if (typeRef != null) {
 16.1130 -            GlobalType gType = typeRef.get();
 16.1131 -            if (gType != null) {
 16.1132 -                return gType;
 16.1133 -            }
 16.1134 -        }
 16.1135 -        //
 16.1136 -        return null;
 16.1137 -    }
 16.1138 -
 16.1139 -    public static List<ResultItem> filterBpelResultItems(List<ResultItem> validationResults) {
 16.1140 -        List<ResultItem> bpelResultItems = new ArrayList<ResultItem>();
 16.1141 -        
 16.1142 -        for(ResultItem resultItem: validationResults) {
 16.1143 -            Component component = resultItem.getComponents();
 16.1144 -
 16.1145 -            if(component instanceof BpelEntity) {
 16.1146 -                ResultItem bpelResultItem = 
 16.1147 -                    new ResultItem(resultItem.getValidator(),
 16.1148 -                        resultItem.getType(), component, 
 16.1149 -                        resultItem.getDescription());
 16.1150 -                bpelResultItems.add(bpelResultItem);
 16.1151 -            }
 16.1152 -        }
 16.1153 -        return bpelResultItems;
 16.1154 -    }
 16.1155 -    
 16.1156 -    public static boolean equals(ResultItem item1, ResultItem item2){
 16.1157 -        if (item1 == item2){
 16.1158 -            return true;
 16.1159 -        }
 16.1160 -        if ( !item1.getDescription().equals(item2.getDescription())) {
 16.1161 -            return false;
 16.1162 -        }
 16.1163 -        
 16.1164 -        if ( !item1.getType().equals(item2.getType())) {
 16.1165 -            return false;
 16.1166 -        }
 16.1167 -        return item1.getComponents() == item2.getComponents();
 16.1168 -    }
 16.1169 -
 16.1170 -    private static boolean contains(List<ResultItem> list, ResultItem resultItem) {
 16.1171 -        for (ResultItem item: list) {
 16.1172 -            if (equals(item, resultItem)){
 16.1173 -                return true;
 16.1174 -            }
 16.1175 -        }
 16.1176 -        return false;
 16.1177 -    }
 16.1178 -
 16.1179 -    public static Line getLine(ResultItem item) {
 16.1180 -      int number;
 16.1181 -      Component component = item.getComponents();
 16.1182 -
 16.1183 -      if (component != null) {
 16.1184 -        number = -1;
 16.1185 -
 16.1186 -        if (component instanceof DocumentComponent) {
 16.1187 -          number = getLineNumber((DocumentComponent) item.getComponents());
 16.1188 -        } 
 16.1189 -      }
 16.1190 -      else {
 16.1191 -        number = item.getLineNumber() - 1;
 16.1192 -      }
 16.1193 -//System.out.println("  number: " + number);
 16.1194 -
 16.1195 -      if (number < 1) {
 16.1196 -        return null;
 16.1197 -      }
 16.1198 -      FileObject file = getFileObjectByModel(component == null ? item.getModel() : component.getModel());
 16.1199 -
 16.1200 -      if (file == null) {
 16.1201 -        return null;
 16.1202 -      }
 16.1203 -      LineCookie cookie = null;
 16.1204 -
 16.1205 -      try {
 16.1206 -        DataObject data = DataObject.find(file);
 16.1207 -        cookie = (LineCookie) data.getCookie(LineCookie.class);
 16.1208 -      }
 16.1209 -      catch (DataObjectNotFoundException e) {
 16.1210 -        e.printStackTrace();
 16.1211 -      }
 16.1212 -      if (cookie == null) {
 16.1213 -        return null;
 16.1214 -      }
 16.1215 -      Line line = cookie.getLineSet().getCurrent(number);
 16.1216 -
 16.1217 -      if (line == null) {
 16.1218 -        return null;
 16.1219 -      }
 16.1220 -      return cookie.getLineSet().getCurrent(number);
 16.1221 -    }
 16.1222 -    
 16.1223 -    public static Line.Part getLinePart(ResultItem item) {
 16.1224 -      Line line = getLine(item);
 16.1225 -
 16.1226 -      if (line == null) {
 16.1227 -        return null;
 16.1228 -      }
 16.1229 -      int column = getColumn(item.getComponents());
 16.1230 -
 16.1231 -      if (column == -1) {
 16.1232 -        column = 0;
 16.1233 -      }
 16.1234 -      int length = line.getText().length() - column;
 16.1235 -
 16.1236 -      return line.createPart(column, length);
 16.1237 -    }
 16.1238 -    
 16.1239 -    private static int getColumn(Component component) {
 16.1240 -      AbstractDocument doc = getAbstractDocument(component);
 16.1241 -
 16.1242 -      if (doc == null) {
 16.1243 -        return -1;
 16.1244 -      }
 16.1245 -      int position = findPosition((AbstractDocumentModel) component.getModel(), ((AbstractDocumentComponent) component).getPeer());
 16.1246 -      return findColumn(doc, position);
 16.1247 -    }
 16.1248 -    
 16.1249 -    private static AbstractDocument getAbstractDocument(Component component) {
 16.1250 -      if (component == null) {
 16.1251 -        return null;
 16.1252 -      }
 16.1253 -      Model model = component.getModel();
 16.1254 -
 16.1255 -      if (model == null) {
 16.1256 -        return null;
 16.1257 -      }
 16.1258 -      ModelSource source = model.getModelSource();
 16.1259 -
 16.1260 -      if (source == null) {
 16.1261 -        return null;
 16.1262 -      }
 16.1263 -      return (AbstractDocument) source.getLookup().lookup(AbstractDocument.class);
 16.1264 -    }
 16.1265 -
 16.1266 -    private static int findColumn(AbstractDocument doc, int argInt) {
 16.1267 -      javax.swing.text.Element paragraphsParent = findLineRootElement(doc);
 16.1268 -      int indx = paragraphsParent.getElementIndex(argInt);
 16.1269 -      return argInt - paragraphsParent.getElement(indx).getStartOffset();
 16.1270 -    }
 16.1271 -
 16.1272 -    private static javax.swing.text.Element findLineRootElement(AbstractDocument doc) {
 16.1273 -      javax.swing.text.Element element = doc.getParagraphElement(0).getParentElement();
 16.1274 -
 16.1275 -      if (element == null) {
 16.1276 -        element = doc.getDefaultRootElement();
 16.1277 -      }
 16.1278 -      return element;
 16.1279 -    }
 16.1280 -
 16.1281 -    private static int findPosition(AbstractDocumentModel model, org.w3c.dom.Node node) {
 16.1282 -      Element root = ((DocumentComponent) model.getRootComponent()).getPeer();
 16.1283 -      javax.swing.text.Document doc = model.getBaseDocument();
 16.1284 -
 16.1285 -      try {
 16.1286 -        String buf = doc.getText(0, doc.getLength());
 16.1287 -      
 16.1288 -        if (node instanceof Element) {
 16.1289 -          return findPosition((Element) node, buf, root, getRootElementPosition(buf, root));
 16.1290 -        }
 16.1291 -      }
 16.1292 -      catch (BadLocationException e) {}
 16.1293 -
 16.1294 -      return -1;
 16.1295 -    }
 16.1296 -
 16.1297 -    private static int findPosition(Element target, String buf, Element base, Integer fromPos) {
 16.1298 -      if (target == base) {
 16.1299 -        return fromPos;
 16.1300 -      }
 16.1301 -      NodeList children = base.getChildNodes();
 16.1302 -
 16.1303 -      for (int i = 0; i < children.getLength(); i++) {
 16.1304 -        org.w3c.dom.Node node = children.item(i);
 16.1305 -
 16.1306 -        if ( !(node instanceof Element)) {
 16.1307 -          String s = node.getNodeValue();
 16.1308 -
 16.1309 -          if (s == null) {
 16.1310 -            s = node.getTextContent();
 16.1311 -          }
 16.1312 -          if (s != null) {
 16.1313 -            fromPos += s.length();
 16.1314 -          }
 16.1315 -          continue;
 16.1316 -        }
 16.1317 -        Element current = (Element) children.item(i);
 16.1318 -        String tag = "<" + current.getTagName();
 16.1319 -        fromPos = buf.indexOf(tag, fromPos);
 16.1320 -
 16.1321 -        if (current == target) {
 16.1322 -          return fromPos;
 16.1323 -        }
 16.1324 -        int found = findPosition(target, buf, current, fromPos);
 16.1325 -
 16.1326 -        if (found > -1) {
 16.1327 -          return found;
 16.1328 -        }
 16.1329 -      }
 16.1330 -      return -1;
 16.1331 -    }
 16.1332 -
 16.1333 -    private static int getRootElementPosition(String buf, Element root) {
 16.1334 -      NodeList children = root.getOwnerDocument().getChildNodes();
 16.1335 -      int pos = 0;
 16.1336 -
 16.1337 -      for (int i = 0; i < children.getLength(); i++) {
 16.1338 -        org.w3c.dom.Node n = children.item(i);
 16.1339 -
 16.1340 -        if (n != root) {
 16.1341 -          String s = n.getNodeValue();
 16.1342 -        
 16.1343 -          if (s != null) {
 16.1344 -            pos += s.length();
 16.1345 -          }
 16.1346 -        }
 16.1347 -        else {
 16.1348 -          break;
 16.1349 -        }
 16.1350 -      }
 16.1351 -      return buf.indexOf(root.getTagName(), pos);
 16.1352 -    }
 16.1353 -
 16.1354 -    private static int getLineNumber(DocumentComponent entity) {
 16.1355 -      if (entity == null) {
 16.1356 -        return -1;
 16.1357 -      }
 16.1358 -      Model model = entity.getModel();
 16.1359 -
 16.1360 -      if (model == null) {
 16.1361 -        return -1;
 16.1362 -      }
 16.1363 -      ModelSource source = model.getModelSource();
 16.1364 -
 16.1365 -      if (source == null) {
 16.1366 -        return -1;
 16.1367 -      }
 16.1368 -      Lookup lookup = source.getLookup();
 16.1369 -
 16.1370 -      if (lookup == null) {
 16.1371 -        return -1;
 16.1372 -      }
 16.1373 -      StyledDocument document = (StyledDocument) lookup.lookup(StyledDocument.class);
 16.1374 -
 16.1375 -      if (document == null) {
 16.1376 -        return -1;
 16.1377 -      }
 16.1378 -      return NbDocument.findLineNumber(document, entity.findPosition());
 16.1379 -    }
 16.1380 -
 16.1381 -    public static final String ENTITY_SEPARATOR = "."; // NOI18N
 16.1382 -    private static final int MAX_SIMPLE_NAME_LENGTH = 50;
 16.1383 -}
    17.1 --- a/bpel.editors.api/src/org/netbeans/modules/bpel/editors/api/utils/HtmlNameManager.java	Thu Apr 17 10:51:04 2008 +0200
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,67 +0,0 @@
    17.4 -/*
    17.5 - * The contents of this file are subject to the terms of the Common Development
    17.6 - * and Distribution License (the License). You may not use this file except in
    17.7 - * compliance with the License.
    17.8 - *
    17.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
   17.10 - * or http://www.netbeans.org/cddl.txt.
   17.11 - *
   17.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
   17.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
   17.14 - * If applicable, add the following below the CDDL Header, with the fields
   17.15 - * enclosed by brackets [] replaced by your own identifying information:
   17.16 - * "Portions Copyrighted [year] [name of copyright owner]"
   17.17 - *
   17.18 - * The Original Software is NetBeans. The Initial Developer of the Original
   17.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   17.20 - * Microsystems, Inc. All Rights Reserved.
   17.21 - */
   17.22 -package org.netbeans.modules.bpel.editors.api.utils;
   17.23 -
   17.24 -import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   17.25 -import org.netbeans.modules.xml.xam.Component;
   17.26 -import org.netbeans.modules.xml.xam.Named;
   17.27 -import org.netbeans.modules.xml.xam.dom.DocumentComponent;
   17.28 -
   17.29 -/**
   17.30 - * @author Vitaly
   17.31 - * @version 1.0
   17.32 - */
   17.33 -public interface HtmlNameManager {
   17.34 -    boolean accept(NodeType nodeType, Object reference);
   17.35 -    String getHtmlName(NodeType nodeType, Object reference);
   17.36 -    
   17.37 -    final HtmlNameManager[] HTML_NAME_MANAGERS
   17.38 -            = new HtmlNameManager[] {new ShortHtmlNameManager()};
   17.39 -    
   17.40 -    class ShortHtmlNameManager implements HtmlNameManager {
   17.41 -        public boolean accept(NodeType nodeType, Object reference) {
   17.42 -            return reference instanceof Component;
   17.43 -        }
   17.44 -        
   17.45 -        public String getHtmlName(NodeType nodeType, Object reference) {
   17.46 -            if (!accept(nodeType, reference)) {
   17.47 -                return null;
   17.48 -            }
   17.49 -            
   17.50 -            String refName = null;
   17.51 -            if (reference instanceof Named) {
   17.52 -                refName = ((Named)reference).getName();
   17.53 -            }
   17.54 -            
   17.55 -            if (refName == null
   17.56 -                    && nodeType != null
   17.57 -                    && ! NodeType.UNKNOWN_TYPE.equals(nodeType)) {
   17.58 -                refName = nodeType.getDisplayName();
   17.59 -            }
   17.60 -            
   17.61 -            if (refName == null && reference instanceof DocumentComponent) {
   17.62 -                refName = EditorUtil.getTagName((DocumentComponent)reference);
   17.63 -            }
   17.64 -            
   17.65 -            refName = refName == null ? "" : refName;
   17.66 -            
   17.67 -            return EditorUtil.getCorrectedHtmlRenderedString(refName);
   17.68 -        }
   17.69 -    }
   17.70 -}
    18.1 --- a/bpel.editors/nbproject/project.properties	Thu Apr 17 10:51:04 2008 +0200
    18.2 +++ b/bpel.editors/nbproject/project.properties	Thu Apr 17 15:50:14 2008 +0200
    18.3 @@ -39,4 +39,4 @@
    18.4  # made subject to such option by the copyright holder.
    18.5  
    18.6  javac.source=1.5
    18.7 -javac.compilerargs=-Xlint:unchecked
    18.8 +#javac.compilerargs=-Xlint:unchecked
    19.1 --- a/bpel.editors/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
    19.2 +++ b/bpel.editors/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
    19.3 @@ -143,6 +143,15 @@
    19.4                      </run-dependency>
    19.5                  </dependency>
    19.6                  <dependency>
    19.7 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
    19.8 +                    <build-prerequisite/>
    19.9 +                    <compile-dependency/>
   19.10 +                    <run-dependency>
   19.11 +                        <release-version>1</release-version>
   19.12 +                        <specification-version>1.1</specification-version>
   19.13 +                    </run-dependency>
   19.14 +                </dependency>
   19.15 +                <dependency>
   19.16                      <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
   19.17                      <build-prerequisite/>
   19.18                      <compile-dependency/>
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/bpel.editors/src/META-INF/services/org.netbeans.modules.bpel.search.spi.SearchProvider	Thu Apr 17 15:50:14 2008 +0200
    20.3 @@ -0,0 +1,1 @@
    20.4 +org.netbeans.modules.bpel.diagram.DiagramProvider
    21.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/design/DesignView.java	Thu Apr 17 10:51:04 2008 +0200
    21.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/DesignView.java	Thu Apr 17 15:50:14 2008 +0200
    21.3 @@ -50,7 +50,7 @@
    21.4  import org.netbeans.modules.bpel.design.model.patterns.ProcessPattern;
    21.5  import org.netbeans.modules.bpel.design.model.patterns.SequencePattern;
    21.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    21.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    21.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    21.9  import org.netbeans.modules.bpel.editors.multiview.DesignerMultiViewElement;
   21.10  import org.netbeans.modules.bpel.design.DiagramView;
   21.11  import org.netbeans.modules.bpel.model.api.BpelEntity;
   21.12 @@ -72,7 +72,7 @@
   21.13  
   21.14  import org.openide.nodes.Node;
   21.15  import org.netbeans.modules.bpel.core.helper.api.BusinessProcessHelper;
   21.16 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
   21.17 +import org.netbeans.modules.soa.validation.Controller;
   21.18  import org.netbeans.modules.bpel.design.decoration.Decoration;
   21.19  import org.netbeans.modules.bpel.design.decoration.DecorationProviderFactory;
   21.20  import org.netbeans.modules.bpel.design.decoration.components.GlassPane;
   21.21 @@ -338,8 +338,8 @@
   21.22          selectionBridge.release();
   21.23      }
   21.24  
   21.25 -    public BPELValidationController getValidationController() {
   21.26 -        return getLookup().lookup(BPELValidationController.class);
   21.27 +    public Controller getValidationController() {
   21.28 +        return getLookup().lookup(Controller.class);
   21.29      }
   21.30  
   21.31      public EntitySelectionModel getSelectionModel() {
    22.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/design/decoration/providers/ValidationDecorationProvider.java	Thu Apr 17 10:51:04 2008 +0200
    22.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/design/decoration/providers/ValidationDecorationProvider.java	Thu Apr 17 15:50:14 2008 +0200
    22.3 @@ -23,9 +23,9 @@
    22.4  import java.util.List;
    22.5  import javax.swing.SwingUtilities;
    22.6  
    22.7 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
    22.8 -import org.netbeans.modules.bpel.core.util.BPELValidationListener;
    22.9 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   22.10 +import org.netbeans.modules.soa.validation.Controller;
   22.11 +import org.netbeans.modules.soa.validation.Listener;
   22.12 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   22.13  import org.netbeans.modules.bpel.design.DesignView;
   22.14  import org.netbeans.modules.bpel.design.decoration.ComponentsDescriptor;
   22.15  import org.netbeans.modules.bpel.design.decoration.Decoration;
   22.16 @@ -46,7 +46,7 @@
   22.17  /**
   22.18   * @author aa160298
   22.19   */
   22.20 -public class ValidationDecorationProvider extends DecorationProvider implements BPELValidationListener {
   22.21 +public class ValidationDecorationProvider extends DecorationProvider implements Listener {
   22.22      
   22.23      private Object list_key = new Object();
   22.24      private Object decoration_key = new Object();
   22.25 @@ -55,8 +55,8 @@
   22.26      
   22.27      public ValidationDecorationProvider(DesignView designView) {
   22.28          super(designView);
   22.29 -        final BPELValidationController controller = getDesignView().getValidationController();
   22.30 -        controller.addValidationListener(this);
   22.31 +        final Controller controller = getDesignView().getValidationController();
   22.32 +        controller.addListener(this);
   22.33  
   22.34          SwingUtilities.invokeLater(new Runnable() {
   22.35              public void run() {
   22.36 @@ -66,7 +66,7 @@
   22.37      }
   22.38      
   22.39      public void release(){
   22.40 -        getDesignView().getValidationController().removeValidationListener(this);
   22.41 +        getDesignView().getValidationController().removeListener(this);
   22.42          list_key = null;
   22.43          decoration_key = null;
   22.44      }
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/diagram/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
    23.3 @@ -0,0 +1,105 @@
    23.4 +#
    23.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    23.6 +#
    23.7 +# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    23.8 +#
    23.9 +# The contents of this file are subject to the terms of either the GNU
   23.10 +# General Public License Version 2 only ("GPL") or the Common
   23.11 +# Development and Distribution License("CDDL") (collectively, the
   23.12 +# "License"). You may not use this file except in compliance with the
   23.13 +# License. You can obtain a copy of the License at
   23.14 +# http://www.netbeans.org/cddl-gplv2.html
   23.15 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   23.16 +# specific language governing permissions and limitations under the
   23.17 +# License. When distributing the software, include this License Header
   23.18 +# Notice in each file and include the License file at
   23.19 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   23.20 +# particular file as subject to the "Classpath" exception as provided
   23.21 +# by Sun in the GPL Version 2 section of the License file that
   23.22 +# accompanied this code. If applicable, add the following below the
   23.23 +# License Header, with the fields enclosed by brackets [] replaced by
   23.24 +# your own identifying information:
   23.25 +# "Portions Copyrighted [year] [name of copyright owner]"
   23.26 +#
   23.27 +# Contributor(s):
   23.28 +#
   23.29 +# The Original Software is NetBeans. The Initial Developer of the Original
   23.30 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   23.31 +# Microsystems, Inc. All Rights Reserved.
   23.32 +#
   23.33 +# If you wish your version of this file to be governed by only the CDDL
   23.34 +# or only the GPL Version 2, indicate your decision by adding
   23.35 +# "[Contributor] elects to include this software in this distribution
   23.36 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   23.37 +# single choice of license, a recipient has the option to distribute
   23.38 +# your version of this file under either the CDDL, the GPL Version 2 or
   23.39 +# to extend the choice of license to its licensees as provided above.
   23.40 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   23.41 +# Version 2 license, then the option applies only if the new code is
   23.42 +# made subject to such option by the copyright holder.
   23.43 +
   23.44 +# DiagramProvider
   23.45 +BpelEntity=Any BPEL Entity
   23.46 +Assign=Assign
   23.47 +Branches=Branches
   23.48 +Catch=Catch
   23.49 +CatchAll=Catch All
   23.50 +Compensate=Compensate
   23.51 +CompensationHandler=Compensation Handler
   23.52 +Condition=Condition
   23.53 +Copy=Copy
   23.54 +Correlation=Correlation
   23.55 +CorrelationContainer=Correlation Container
   23.56 +CorrelationSet=Correlation Set
   23.57 +CorrelationSetContainer=Correlation Set Container
   23.58 +DeadlineExpression=Deadline Expression
   23.59 +Documentation=Documentation
   23.60 +DurationExpression=DurationExpression
   23.61 +Else=Else
   23.62 +ElseIf=Else If
   23.63 +Empty=Empty
   23.64 +EventHandlers=Event Handlers
   23.65 +Exit=Exit
   23.66 +FaultHandlers=Fault Handlers
   23.67 +Flow=Flow
   23.68 +For=For
   23.69 +ForEach=For Each
   23.70 +From=From
   23.71 +FromPart=FromPart
   23.72 +If=If
   23.73 +Import=Import
   23.74 +Invoke=Invoke
   23.75 +Link=Link
   23.76 +LinkContainer=Link Container
   23.77 +Literal=Literal
   23.78 +MessageExchange=Message Exchange
   23.79 +MessageExchangeContainer=Message Exchange Container
   23.80 +OnAlarmEvent=On Alarm Event
   23.81 +OnAlarmPick=On Alarm Pick
   23.82 +OnEvent=On Event
   23.83 +OnMessage=On Message
   23.84 +PartnerLink=Partner Link
   23.85 +PartnerLinkContainer=Partner Link Container
   23.86 +PatternedCorrelation=Patterned Correlation
   23.87 +PatternedCorrelationContainer=Patterned Correlation Container
   23.88 +Pick=Pick
   23.89 +Process=Process
   23.90 +Receive=Receive
   23.91 +RepeatUntil=Repeat Until
   23.92 +Reply=Reply
   23.93 +ReThrow=Re Throw
   23.94 +Scope=Scope
   23.95 +Sequence=Sequence
   23.96 +Source=Source
   23.97 +Target=Target
   23.98 +TerminationHandler=Termination Handler
   23.99 +Throw=Throw
  23.100 +TimeEvent=Time Event
  23.101 +To=To
  23.102 +ToPart=To Part
  23.103 +Validate=Validate
  23.104 +Variable=Variable
  23.105 +VariableContainer=Variable Container
  23.106 +VariableDeclaration=VariableDeclaration
  23.107 +Wait=Wait
  23.108 +While=While
    24.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/diagram/DiagramElementImpl.java	Thu Apr 17 10:51:04 2008 +0200
    24.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/diagram/DiagramElementImpl.java	Thu Apr 17 15:50:14 2008 +0200
    24.3 @@ -21,7 +21,7 @@
    24.4  import org.netbeans.modules.xml.xam.Component;
    24.5  
    24.6  import org.netbeans.modules.bpel.editors.api.diagram.DiagramElement;
    24.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    24.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    24.9  
   24.10  import org.netbeans.modules.bpel.design.DesignView;
   24.11  import org.netbeans.modules.bpel.design.model.elements.VisualElement;
    25.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/diagram/DiagramImpl.java	Thu Apr 17 10:51:04 2008 +0200
    25.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/diagram/DiagramImpl.java	Thu Apr 17 15:50:14 2008 +0200
    25.3 @@ -31,7 +31,7 @@
    25.4  
    25.5  import org.netbeans.modules.bpel.editors.api.diagram.Diagram;
    25.6  import org.netbeans.modules.bpel.editors.api.diagram.DiagramElement;
    25.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
    25.8 +import static org.netbeans.modules.soa.ui.UI.*;
    25.9  
   25.10  /**
   25.11   * @author Vladimir Yaroslavskiy
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/diagram/DiagramProvider.java	Thu Apr 17 15:50:14 2008 +0200
    26.3 @@ -0,0 +1,148 @@
    26.4 +/*
    26.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    26.6 + *
    26.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
    26.8 + *
    26.9 + * The contents of this file are subject to the terms of either the GNU
   26.10 + * General Public License Version 2 only ("GPL") or the Common
   26.11 + * Development and Distribution License("CDDL") (collectively, the
   26.12 + * "License"). You may not use this file except in compliance with the
   26.13 + * License. You can obtain a copy of the License at
   26.14 + * http://www.netbeans.org/cddl-gplv2.html
   26.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   26.16 + * specific language governing permissions and limitations under the
   26.17 + * License. When distributing the software, include this License Header
   26.18 + * Notice in each file and include the License file at
   26.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   26.20 + * particular file as subject to the "Classpath" exception as provided
   26.21 + * by Sun in the GPL Version 2 section of the License file that
   26.22 + * accompanied this code. If applicable, add the following below the
   26.23 + * License Header, with the fields enclosed by brackets [] replaced by
   26.24 + * your own identifying information:
   26.25 + * "Portions Copyrighted [year] [name of copyright owner]"
   26.26 + *
   26.27 + * Contributor(s):
   26.28 + *
   26.29 + * The Original Software is NetBeans. The Initial Developer of the Original
   26.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   26.31 + * Microsystems, Inc. All Rights Reserved.
   26.32 + *
   26.33 + * If you wish your version of this file to be governed by only the CDDL
   26.34 + * or only the GPL Version 2, indicate your decision by adding
   26.35 + * "[Contributor] elects to include this software in this distribution
   26.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   26.37 + * single choice of license, a recipient has the option to distribute
   26.38 + * your version of this file under either the CDDL, the GPL Version 2 or
   26.39 + * to extend the choice of license to its licensees as provided above.
   26.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   26.41 + * Version 2 license, then the option applies only if the new code is
   26.42 + * made subject to such option by the copyright holder.
   26.43 + */
   26.44 +package org.netbeans.modules.bpel.diagram;
   26.45 +
   26.46 +import org.openide.loaders.DataObject;
   26.47 +import org.openide.nodes.Node;
   26.48 +
   26.49 +import org.netbeans.modules.xml.xam.Component;
   26.50 +import org.netbeans.modules.xml.xam.Model;
   26.51 +
   26.52 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   26.53 +import org.netbeans.modules.bpel.search.api.SearchTarget;
   26.54 +import org.netbeans.modules.bpel.search.spi.SearchProvider;
   26.55 +
   26.56 +/**
   26.57 + * @author Vladimir Yaroslavskiy
   26.58 + * @version 2008.04.16
   26.59 + */
   26.60 +public class DiagramProvider implements SearchProvider {
   26.61 +
   26.62 +  public Model getModel(Node node) {
   26.63 +//out();
   26.64 +//out("node: " + node);
   26.65 +    if (node == null) {
   26.66 +      return null;
   26.67 +    }
   26.68 +    DataObject data = (DataObject) node.getLookup().lookup(DataObject.class);
   26.69 +//out("data: " + data);
   26.70 +
   26.71 +    if (data == null) {
   26.72 +      return null;
   26.73 +    }
   26.74 +    return EditorUtil.getBpelModel(data);
   26.75 +  }
   26.76 +
   26.77 +  public SearchTarget [] getTargets() {
   26.78 +    return TARGETS;
   26.79 +  }
   26.80 +
   26.81 +  private static SearchTarget createTarget(Class<? extends Component> clazz) {
   26.82 +    return new SearchTarget.Adapter(DiagramProvider.class, clazz);
   26.83 +  }
   26.84 +
   26.85 +  private static final SearchTarget [] TARGETS = new SearchTarget [] {
   26.86 +    createTarget(org.netbeans.modules.bpel.model.api.BpelEntity.class),
   26.87 +    createTarget(org.netbeans.modules.bpel.model.api.Assign.class),
   26.88 +    createTarget(org.netbeans.modules.bpel.model.api.Branches.class),
   26.89 +    createTarget(org.netbeans.modules.bpel.model.api.Catch.class),
   26.90 +    createTarget(org.netbeans.modules.bpel.model.api.CatchAll.class),
   26.91 +    createTarget(org.netbeans.modules.bpel.model.api.Compensate.class),
   26.92 +    createTarget(org.netbeans.modules.bpel.model.api.CompensationHandler.class),
   26.93 +    createTarget(org.netbeans.modules.bpel.model.api.Condition.class),
   26.94 +    createTarget(org.netbeans.modules.bpel.model.api.Copy.class),
   26.95 +    createTarget(org.netbeans.modules.bpel.model.api.Correlation.class),
   26.96 +    createTarget(org.netbeans.modules.bpel.model.api.CorrelationContainer.class),
   26.97 +    createTarget(org.netbeans.modules.bpel.model.api.CorrelationSet.class),
   26.98 +    createTarget(org.netbeans.modules.bpel.model.api.CorrelationSetContainer.class),
   26.99 +    createTarget(org.netbeans.modules.bpel.model.api.DeadlineExpression.class),
  26.100 +    createTarget(org.netbeans.modules.bpel.model.api.Documentation.class),
  26.101 +    createTarget(org.netbeans.modules.bpel.model.api.DurationExpression.class),
  26.102 +    createTarget(org.netbeans.modules.bpel.model.api.Else.class),
  26.103 +    createTarget(org.netbeans.modules.bpel.model.api.ElseIf.class),
  26.104 +    createTarget(org.netbeans.modules.bpel.model.api.Empty.class),
  26.105 +    createTarget(org.netbeans.modules.bpel.model.api.EventHandlers.class),
  26.106 +    createTarget(org.netbeans.modules.bpel.model.api.Exit.class),
  26.107 +    createTarget(org.netbeans.modules.bpel.model.api.FaultHandlers.class),
  26.108 +    createTarget(org.netbeans.modules.bpel.model.api.Flow.class),
  26.109 +    createTarget(org.netbeans.modules.bpel.model.api.For.class),
  26.110 +    createTarget(org.netbeans.modules.bpel.model.api.ForEach.class),
  26.111 +    createTarget(org.netbeans.modules.bpel.model.api.From.class),
  26.112 +    createTarget(org.netbeans.modules.bpel.model.api.FromPart.class),
  26.113 +    createTarget(org.netbeans.modules.bpel.model.api.If.class),
  26.114 +    createTarget(org.netbeans.modules.bpel.model.api.Import.class),
  26.115 +    createTarget(org.netbeans.modules.bpel.model.api.Invoke.class),
  26.116 +    createTarget(org.netbeans.modules.bpel.model.api.Link.class),
  26.117 +    createTarget(org.netbeans.modules.bpel.model.api.LinkContainer.class),
  26.118 +    createTarget(org.netbeans.modules.bpel.model.api.Literal.class),
  26.119 +    createTarget(org.netbeans.modules.bpel.model.api.MessageExchange.class),
  26.120 +    createTarget(org.netbeans.modules.bpel.model.api.MessageExchangeContainer.class),
  26.121 +    createTarget(org.netbeans.modules.bpel.model.api.OnAlarmEvent.class),
  26.122 +    createTarget(org.netbeans.modules.bpel.model.api.OnAlarmPick.class),
  26.123 +    createTarget(org.netbeans.modules.bpel.model.api.OnEvent.class),
  26.124 +    createTarget(org.netbeans.modules.bpel.model.api.OnMessage.class),
  26.125 +    createTarget(org.netbeans.modules.bpel.model.api.PartnerLink.class),
  26.126 +    createTarget(org.netbeans.modules.bpel.model.api.PartnerLinkContainer.class),
  26.127 +    createTarget(org.netbeans.modules.bpel.model.api.PatternedCorrelation.class),
  26.128 +    createTarget(org.netbeans.modules.bpel.model.api.PatternedCorrelationContainer.class),
  26.129 +    createTarget(org.netbeans.modules.bpel.model.api.Pick.class),
  26.130 +    createTarget(org.netbeans.modules.bpel.model.api.Process.class),
  26.131 +    createTarget(org.netbeans.modules.bpel.model.api.Receive.class),
  26.132 +    createTarget(org.netbeans.modules.bpel.model.api.RepeatUntil.class),
  26.133 +    createTarget(org.netbeans.modules.bpel.model.api.Reply.class),
  26.134 +    createTarget(org.netbeans.modules.bpel.model.api.ReThrow.class),
  26.135 +    createTarget(org.netbeans.modules.bpel.model.api.Scope.class),
  26.136 +    createTarget(org.netbeans.modules.bpel.model.api.Sequence.class),
  26.137 +    createTarget(org.netbeans.modules.bpel.model.api.Source.class),
  26.138 +    createTarget(org.netbeans.modules.bpel.model.api.Target.class),
  26.139 +    createTarget(org.netbeans.modules.bpel.model.api.TerminationHandler.class),
  26.140 +    createTarget(org.netbeans.modules.bpel.model.api.Throw.class),
  26.141 +    createTarget(org.netbeans.modules.bpel.model.api.TimeEvent.class),
  26.142 +    createTarget(org.netbeans.modules.bpel.model.api.To.class),
  26.143 +    createTarget(org.netbeans.modules.bpel.model.api.ToPart.class),
  26.144 +    createTarget(org.netbeans.modules.bpel.model.api.Validate.class),
  26.145 +    createTarget(org.netbeans.modules.bpel.model.api.Variable.class),
  26.146 +    createTarget(org.netbeans.modules.bpel.model.api.VariableContainer.class),
  26.147 +    createTarget(org.netbeans.modules.bpel.model.api.VariableDeclaration.class),
  26.148 +    createTarget(org.netbeans.modules.bpel.model.api.Wait.class),
  26.149 +    createTarget(org.netbeans.modules.bpel.model.api.While.class),
  26.150 +  };
  26.151 +}
    27.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/documentation/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
    27.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/documentation/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
    27.3 @@ -11,9 +11,9 @@
    27.4  # http://www.netbeans.org/cddl-gplv2.html
    27.5  # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    27.6  # specific language governing permissions and limitations under the
    27.7 -# License.  When distributing the software, include this License Header
    27.8 +# License. When distributing the software, include this License Header
    27.9  # Notice in each file and include the License file at
   27.10 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   27.11 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   27.12  # particular file as subject to the "Classpath" exception as provided
   27.13  # by Sun in the GPL Version 2 section of the License file that
   27.14  # accompanied this code. If applicable, add the following below the
    28.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationButton.java	Thu Apr 17 10:51:04 2008 +0200
    28.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationButton.java	Thu Apr 17 15:50:14 2008 +0200
    28.3 @@ -11,9 +11,9 @@
    28.4   * http://www.netbeans.org/cddl-gplv2.html
    28.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    28.6   * specific language governing permissions and limitations under the
    28.7 - * License.  When distributing the software, include this License Header
    28.8 + * License. When distributing the software, include this License Header
    28.9   * Notice in each file and include the License file at
   28.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   28.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   28.12   * particular file as subject to the "Classpath" exception as provided
   28.13   * by Sun in the GPL Version 2 section of the License file that
   28.14   * accompanied this code. If applicable, add the following below the
   28.15 @@ -50,7 +50,7 @@
   28.16  import org.netbeans.modules.bpel.model.api.events.VetoException;
   28.17  
   28.18  import org.netbeans.modules.bpel.design.decoration.components.AbstractGlassPaneButton;
   28.19 -import static org.netbeans.modules.soa.ui.util.UI.*;
   28.20 +import static org.netbeans.modules.soa.ui.UI.*;
   28.21  
   28.22  /**
   28.23   * @author Vladimir Yaroslavskiy
    29.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationDecorator.java	Thu Apr 17 10:51:04 2008 +0200
    29.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationDecorator.java	Thu Apr 17 15:50:14 2008 +0200
    29.3 @@ -11,9 +11,9 @@
    29.4   * http://www.netbeans.org/cddl-gplv2.html
    29.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    29.6   * specific language governing permissions and limitations under the
    29.7 - * License.  When distributing the software, include this License Header
    29.8 + * License. When distributing the software, include this License Header
    29.9   * Notice in each file and include the License file at
   29.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   29.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   29.12   * particular file as subject to the "Classpath" exception as provided
   29.13   * by Sun in the GPL Version 2 section of the License file that
   29.14   * accompanied this code. If applicable, add the following below the
   29.15 @@ -52,7 +52,7 @@
   29.16  import org.netbeans.modules.bpel.design.decoration.DecorationProviderFactory;
   29.17  import org.netbeans.modules.bpel.design.decoration.Descriptor;
   29.18  import org.netbeans.modules.bpel.design.selection.DiagramSelectionListener;
   29.19 -import static org.netbeans.modules.soa.ui.util.UI.*;
   29.20 +import static org.netbeans.modules.soa.ui.UI.*;
   29.21  
   29.22  /**
   29.23   * @author Vladimir Yaroslavskiy
    30.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationGenerator.java	Thu Apr 17 10:51:04 2008 +0200
    30.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationGenerator.java	Thu Apr 17 15:50:14 2008 +0200
    30.3 @@ -11,9 +11,9 @@
    30.4   * http://www.netbeans.org/cddl-gplv2.html
    30.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    30.6   * specific language governing permissions and limitations under the
    30.7 - * License.  When distributing the software, include this License Header
    30.8 + * License. When distributing the software, include this License Header
    30.9   * Notice in each file and include the License file at
   30.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   30.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   30.12   * particular file as subject to the "Classpath" exception as provided
   30.13   * by Sun in the GPL Version 2 section of the License file that
   30.14   * accompanied this code. If applicable, add the following below the
   30.15 @@ -54,10 +54,11 @@
   30.16  import javax.swing.Icon;
   30.17  import javax.swing.ImageIcon;
   30.18  import javax.swing.JComponent;
   30.19 +import javax.xml.namespace.QName;
   30.20  
   30.21 -import javax.xml.namespace.QName;
   30.22  import org.openide.ErrorManager;
   30.23  import org.openide.filesystems.FileUtil;
   30.24 +import org.openide.loaders.DataObject;
   30.25  
   30.26  import org.netbeans.modules.xml.xam.Named;
   30.27  import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
   30.28 @@ -86,9 +87,8 @@
   30.29  import org.netbeans.modules.reportgenerator.api.ReportException;
   30.30  import org.netbeans.modules.reportgenerator.api.ReportSection;
   30.31  
   30.32 -import org.netbeans.modules.bpel.core.BPELDataObject;
   30.33 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   30.34 -import static org.netbeans.modules.soa.ui.util.UI.*;
   30.35 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   30.36 +import static org.netbeans.modules.soa.ui.UI.*;
   30.37  
   30.38  /**
   30.39   * @author Vladimir Yaroslavskiy
   30.40 @@ -96,7 +96,7 @@
   30.41   */
   30.42  public class DocumentationGenerator implements ReportCookie {
   30.43  
   30.44 -  public DocumentationGenerator(BPELDataObject dataObject, JComponent canvas) {
   30.45 +  public DocumentationGenerator(DataObject dataObject, JComponent canvas) {
   30.46      myDataObject = dataObject;
   30.47      myCanvas = canvas;
   30.48    }
   30.49 @@ -371,16 +371,14 @@
   30.50    }
   30.51  
   30.52    private String i18n(String key) {
   30.53 -    return org.netbeans.modules.soa.ui.util.UI.i18n(
   30.54 -      DocumentationGenerator.class, key);
   30.55 +    return org.netbeans.modules.soa.ui.UI.i18n(DocumentationGenerator.class, key);
   30.56    }
   30.57  
   30.58    private String i18n(String key, String param) {
   30.59 -    return org.netbeans.modules.soa.ui.util.UI.i18n(
   30.60 -      DocumentationGenerator.class, key, param);
   30.61 +    return org.netbeans.modules.soa.ui.UI.i18n(DocumentationGenerator.class, key, param);
   30.62    }
   30.63  
   30.64    private JComponent myCanvas;
   30.65 -  private BPELDataObject myDataObject;
   30.66 +  private DataObject myDataObject;
   30.67    private ReportElementFactory myFactory;
   30.68  }
    31.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/BpelDesignViewOpenAction.java	Thu Apr 17 10:51:04 2008 +0200
    31.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/BpelDesignViewOpenAction.java	Thu Apr 17 15:50:14 2008 +0200
    31.3 @@ -18,7 +18,7 @@
    31.4  
    31.5  import org.netbeans.modules.bpel.core.BPELDataEditorSupport;
    31.6  import org.netbeans.modules.bpel.core.BPELDataObject;
    31.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    31.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    31.9  import org.netbeans.modules.bpel.model.api.BpelModel;
   31.10  import org.netbeans.modules.bpel.model.api.Process;
   31.11  import org.openide.cookies.OpenCookie;
    32.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/BpelSourceViewOpenAction.java	Thu Apr 17 10:51:04 2008 +0200
    32.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/BpelSourceViewOpenAction.java	Thu Apr 17 15:50:14 2008 +0200
    32.3 @@ -18,7 +18,7 @@
    32.4  
    32.5  import org.netbeans.modules.bpel.core.BPELDataEditorSupport;
    32.6  import org.netbeans.modules.bpel.core.BPELDataObject;
    32.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    32.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    32.9  import org.netbeans.modules.bpel.model.api.BpelModel;
   32.10  import org.netbeans.modules.bpel.model.api.Process;
   32.11  import org.openide.actions.OpenAction;
    33.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/DesignerMultiViewElement.java	Thu Apr 17 10:51:04 2008 +0200
    33.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/editors/multiview/DesignerMultiViewElement.java	Thu Apr 17 15:50:14 2008 +0200
    33.3 @@ -77,12 +77,12 @@
    33.4  import javax.swing.JToolBar;
    33.5  import javax.swing.text.DefaultEditorKit;
    33.6  import javax.swing.text.JTextComponent;
    33.7 +import org.netbeans.modules.soa.validation.Action;
    33.8 +import org.netbeans.modules.soa.validation.Controller;
    33.9  import org.netbeans.core.api.multiview.MultiViewHandler;
   33.10  import org.netbeans.core.api.multiview.MultiViewPerspective;
   33.11  import org.netbeans.core.api.multiview.MultiViews;
   33.12  import org.netbeans.core.spi.multiview.MultiViewFactory;
   33.13 -import org.netbeans.modules.bpel.core.util.BPELValidationAction;
   33.14 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
   33.15  import org.netbeans.modules.bpel.core.SelectBpelElement;
   33.16  import org.netbeans.modules.bpel.design.ZoomManager;
   33.17  import org.netbeans.modules.bpel.design.actions.BreakpointsDeleteAction;
   33.18 @@ -254,8 +254,8 @@
   33.19  //      getValidationController().triggerValidation();
   33.20      }
   33.21      
   33.22 -    private BPELValidationController getValidationController() {
   33.23 -        return (BPELValidationController) getDataObject().getLookup().lookup(BPELValidationController.class);
   33.24 +    private Controller getValidationController() {
   33.25 +        return (Controller) getDataObject().getLookup().lookup(Controller.class);
   33.26      }
   33.27  
   33.28      public void componentClosed() {
   33.29 @@ -351,7 +351,7 @@
   33.30              }
   33.31              // vlv: valdiation
   33.32              toolbar.addSeparator();
   33.33 -            toolbar.add(new BPELValidationAction(getValidationController()));
   33.34 +            toolbar.add(new Action(getValidationController()));
   33.35              
   33.36              // ksorokin: breakpoints
   33.37              toolbar.addSeparator();
    34.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/navigator/BpelModelLogicalBeanTree.java	Thu Apr 17 10:51:04 2008 +0200
    34.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/navigator/BpelModelLogicalBeanTree.java	Thu Apr 17 15:50:14 2008 +0200
    34.3 @@ -25,8 +25,8 @@
    34.4  import javax.swing.SwingUtilities;
    34.5  import javax.swing.tree.TreeSelectionModel;
    34.6  
    34.7 +import org.netbeans.modules.soa.validation.Controller;
    34.8  import org.netbeans.modules.bpel.core.BPELDataEditorSupport;
    34.9 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
   34.10  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   34.11  import org.netbeans.modules.bpel.model.api.BpelEntity;
   34.12  import org.netbeans.modules.bpel.model.api.BpelModel;
   34.13 @@ -55,25 +55,18 @@
   34.14  import org.openide.windows.TopComponent;
   34.15  
   34.16  /**
   34.17 - *
   34.18   * @author Vitaly Bychkov
   34.19   * @version 1.0
   34.20   * Created on 15 December 2005
   34.21   *
   34.22   * Listen to the model state changes, in case invalid bpel document state -
   34.23   * show invalid state message.
   34.24 - *
   34.25   */
   34.26 -public class BpelModelLogicalBeanTree
   34.27 -        implements PropertyChangeListener, ChangeEventListener 
   34.28 -{
   34.29 +public class BpelModelLogicalBeanTree implements PropertyChangeListener, ChangeEventListener {
   34.30      
   34.31      private static final long serialVersionUID = 1L;
   34.32 -    
   34.33      private BpelModel myBpelModel;
   34.34 -    //context lookup
   34.35      private Lookup myContextLookup;
   34.36 -    
   34.37      private BeanTreeView myBeanTreeView;
   34.38      private ExplorerManager myExplorerManager;
   34.39      
   34.40 @@ -134,9 +127,9 @@
   34.41                  elem = ((UsageFilterNode)elem).getOriginal();
   34.42              } else if (elem instanceof BpelNode 
   34.43                      && ((BpelNode)elem).getReference() instanceof BpelEntity
   34.44 -                    && !(org.netbeans.modules.bpel.editors.api.utils.EditorUtil.isNavigatorShowableNodeType(((BpelNode)elem).getNodeType()))) 
   34.45 +                    && !(org.netbeans.modules.bpel.editors.api.EditorUtil.isNavigatorShowableNodeType(((BpelNode)elem).getNodeType()))) 
   34.46              {
   34.47 -                elem = org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getClosestNavigatorNode(
   34.48 +                elem = org.netbeans.modules.bpel.editors.api.EditorUtil.getClosestNavigatorNode(
   34.49                          (BpelEntity)((BpelNode)elem).getReference(),
   34.50                          elem.getLookup());
   34.51              }
   34.52 @@ -311,7 +304,7 @@
   34.53      }
   34.54      
   34.55      private void triggerValidation() {
   34.56 -        BPELValidationController controller = (BPELValidationController) myContextLookup.lookup(BPELValidationController.class);
   34.57 +        Controller controller = (Controller) myContextLookup.lookup(Controller.class);
   34.58  
   34.59          if (controller != null) {
   34.60              controller.triggerValidation();
    35.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/BpelNode.java	Thu Apr 17 10:51:04 2008 +0200
    35.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/BpelNode.java	Thu Apr 17 15:50:14 2008 +0200
    35.3 @@ -113,7 +113,7 @@
    35.4  import org.netbeans.modules.bpel.properties.PropertyType;
    35.5  import org.netbeans.modules.bpel.properties.props.PropertyUtils;
    35.6  import org.netbeans.modules.refactoring.api.ui.RefactoringActionsFactory;
    35.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    35.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    35.9  import org.netbeans.modules.soa.ui.form.CustomNodeEditor;
   35.10  import org.netbeans.modules.xml.xam.Component;
   35.11  import org.netbeans.modules.xml.xam.Model;
   35.12 @@ -663,26 +663,26 @@
   35.13      }
   35.14      
   35.15      private Image getDebuggerBadgedImage(Image nodeImage ) {
   35.16 -        return SoaUiUtil.getBadgedIcon(
   35.17 +        return SoaUtil.getBadgedIcon(
   35.18                  nodeImage,getBreakpointBadge(), 9, 9);
   35.19      }
   35.20      
   35.21      private Image getAnnotationIcon(Image nodeImage, AnnotationType type) {
   35.22          switch (type) {
   35.23              case BREAKPOINT :
   35.24 -                return SoaUiUtil.getBadgedIcon(
   35.25 +                return SoaUtil.getBadgedIcon(
   35.26                          nodeImage,getBreakpointBadge(), 9, 9);
   35.27              case CURRENT_BREAKPOINT :
   35.28 -                return SoaUiUtil.getBadgedIcon(
   35.29 +                return SoaUtil.getBadgedIcon(
   35.30                          nodeImage,getCurrentBreakpointBadge(), 9, 9);
   35.31              case DISABLED_BREAKPOINT :
   35.32 -                return SoaUiUtil.getBadgedIcon(
   35.33 +                return SoaUtil.getBadgedIcon(
   35.34                          nodeImage,getDisabledBreakpointBadge(), 9, 9);
   35.35              case CURRENT_DISABLED_BREAKPOINT :
   35.36 -                return SoaUiUtil.getBadgedIcon(
   35.37 +                return SoaUtil.getBadgedIcon(
   35.38                          nodeImage,getCurrentDisabledBreakpointBadge(), 9, 9);
   35.39              case CURRENT_POSITION :
   35.40 -                return SoaUiUtil.getBadgedIcon(
   35.41 +                return SoaUtil.getBadgedIcon(
   35.42                          nodeImage,getCurrentPositionBadge(), 9, 9);
   35.43          }
   35.44          
   35.45 @@ -701,12 +701,12 @@
   35.46          
   35.47          if (isErrorBadged) {
   35.48              return getErrorBadge() != null
   35.49 -                    ? SoaUiUtil.getBadgedIcon(
   35.50 +                    ? SoaUtil.getBadgedIcon(
   35.51                      vrgnImage/*getNodeType().getImage()*/,getErrorBadge())
   35.52                      : vrgnImage;//getNodeType().getImage();
   35.53          } else if (isWarningBadged) {
   35.54              return getWarningBadge() != null
   35.55 -                    ? SoaUiUtil.getBadgedIcon(
   35.56 +                    ? SoaUtil.getBadgedIcon(
   35.57                      vrgnImage/*getNodeType().getImage()*/,getWarningBadge())
   35.58                      : vrgnImage;//getNodeType().getImage();
   35.59          }
   35.60 @@ -784,7 +784,7 @@
   35.61          htmlDisplayName = htmlDisplayName != null && htmlDisplayName.length() > 0 ?
   35.62              htmlDisplayName : getNodeType().getDisplayName();
   35.63          
   35.64 -        return org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getCorrectedHtmlRenderedString(htmlDisplayName);
   35.65 +        return org.netbeans.modules.bpel.editors.api.EditorUtil.getCorrectedHtmlRenderedString(htmlDisplayName);
   35.66      }
   35.67      
   35.68      protected String getImplShortDescription() {
    36.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/CompensateNode.java	Thu Apr 17 10:51:04 2008 +0200
    36.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/CompensateNode.java	Thu Apr 17 15:50:14 2008 +0200
    36.3 @@ -26,7 +26,7 @@
    36.4  import org.netbeans.modules.bpel.properties.props.PropertyUtils;
    36.5  import org.openide.nodes.Sheet;
    36.6  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    36.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    36.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    36.9  import org.openide.util.Lookup;
   36.10  
   36.11  /**
   36.12 @@ -68,6 +68,6 @@
   36.13          }
   36.14          String result = "";
   36.15          
   36.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName(), result);
   36.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName(), result);
   36.18      }
   36.19  }
    37.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/CompensateScopeNode.java	Thu Apr 17 10:51:04 2008 +0200
    37.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/CompensateScopeNode.java	Thu Apr 17 15:50:14 2008 +0200
    37.3 @@ -26,7 +26,7 @@
    37.4  import org.netbeans.modules.bpel.properties.props.PropertyUtils;
    37.5  import org.openide.nodes.Sheet;
    37.6  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    37.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    37.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    37.9  import org.openide.util.Lookup;
   37.10  
   37.11  /**
   37.12 @@ -73,6 +73,6 @@
   37.13          }
   37.14          String result = "";
   37.15          
   37.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName(), result);
   37.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName(), result);
   37.18      }
   37.19  }
    38.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/CopyNode.java	Thu Apr 17 10:51:04 2008 +0200
    38.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/CopyNode.java	Thu Apr 17 15:50:14 2008 +0200
    38.3 @@ -347,7 +347,7 @@
    38.4              stringFrom = stringFrom == null ? "" : stringFrom;
    38.5              stringTo = stringTo == null ? "" : stringTo;
    38.6          }
    38.7 -        return org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getCorrectedHtmlRenderedString(
    38.8 +        return org.netbeans.modules.bpel.editors.api.EditorUtil.getCorrectedHtmlRenderedString(
    38.9                      NbBundle.getMessage(CopyNode.class,"LBL_Copy",stringTo,stringFrom)); // NOI18N
   38.10      }
   38.11      
    39.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/CorrelationNode.java	Thu Apr 17 10:51:04 2008 +0200
    39.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/CorrelationNode.java	Thu Apr 17 15:50:14 2008 +0200
    39.3 @@ -30,7 +30,7 @@
    39.4  import org.openide.nodes.Sheet;
    39.5  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    39.6  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    39.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    39.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    39.9  import org.openide.nodes.Children;
   39.10  import org.openide.util.Lookup;
   39.11  
   39.12 @@ -98,7 +98,7 @@
   39.13                  : " initiate="+initiate.toString(); // NOI18N
   39.14          }
   39.15          
   39.16 -        return SoaUiUtil.getGrayString(getName(), nodeName == null ? "" : nodeName);
   39.17 +        return SoaUtil.getGrayString(getName(), nodeName == null ? "" : nodeName);
   39.18      }
   39.19      
   39.20      protected ActionType[] getActionsArray() {
    40.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/CorrelationPNode.java	Thu Apr 17 10:51:04 2008 +0200
    40.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/CorrelationPNode.java	Thu Apr 17 15:50:14 2008 +0200
    40.3 @@ -31,7 +31,7 @@
    40.4  import org.netbeans.modules.bpel.properties.props.PropertyUtils;
    40.5  import org.openide.nodes.Sheet;
    40.6  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    40.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    40.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    40.9  import org.openide.util.Lookup;
   40.10  
   40.11  /**
   40.12 @@ -99,7 +99,7 @@
   40.13                  ? ref.getSet().getRefString() 
   40.14                  : super.getImplHtmlDisplayName()
   40.15              : baseName;
   40.16 -        return SoaUiUtil.getGrayString( 
   40.17 +        return SoaUtil.getGrayString( 
   40.18                  baseName
   40.19                  , nodeName == null ? getDisplayName() : nodeName);
   40.20      }
    41.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/DefaultBpelEntityNode.java	Thu Apr 17 10:51:04 2008 +0200
    41.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/DefaultBpelEntityNode.java	Thu Apr 17 15:50:14 2008 +0200
    41.3 @@ -20,7 +20,7 @@
    41.4  
    41.5  import org.netbeans.modules.bpel.nodes.BpelNode;
    41.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    41.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    41.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    41.9  import org.netbeans.modules.bpel.model.api.BpelEntity;
   41.10  import org.netbeans.modules.bpel.model.api.ContentElement;
   41.11  import org.netbeans.modules.xml.xam.Named;
   41.12 @@ -75,7 +75,7 @@
   41.13              name = EditorUtil.getCorrectedHtmlRenderedString(name);
   41.14              
   41.15              if (name != null) {
   41.16 -                String tagName = org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getTagName(ref);
   41.17 +                String tagName = org.netbeans.modules.bpel.editors.api.EditorUtil.getTagName(ref);
   41.18                  assert tagName != null;
   41.19                  name = tagName+" ( "  // NOI18N
   41.20                          +(name.length() > MAX_CONTENT_NAME_LENGTH 
   41.21 @@ -84,7 +84,7 @@
   41.22              }
   41.23          }
   41.24          if (name == null) {
   41.25 -            name = org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getTagName(ref);
   41.26 +            name = org.netbeans.modules.bpel.editors.api.EditorUtil.getTagName(ref);
   41.27          }
   41.28          return (name != null) ? name : "";
   41.29      }
    42.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/InvokeNode.java	Thu Apr 17 10:51:04 2008 +0200
    42.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/InvokeNode.java	Thu Apr 17 15:50:14 2008 +0200
    42.3 @@ -36,7 +36,7 @@
    42.4  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    42.5  import org.netbeans.modules.bpel.properties.editors.InvokeCustomEditor;
    42.6  import org.netbeans.modules.bpel.properties.props.CustomEditorProperty;
    42.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    42.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    42.9  import org.netbeans.modules.soa.ui.form.CustomNodeEditor;
   42.10  import org.openide.util.Lookup;
   42.11  import org.openide.nodes.Children;
   42.12 @@ -150,7 +150,7 @@
   42.13          }
   42.14          StringBuffer result = new StringBuffer();
   42.15  
   42.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName(), result.toString());
   42.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName(), result.toString());
   42.18      }
   42.19  
   42.20  //    protected String getImplShortDescription() {
    43.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/MessagePartNode.java	Thu Apr 17 10:51:04 2008 +0200
    43.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/MessagePartNode.java	Thu Apr 17 15:50:14 2008 +0200
    43.3 @@ -20,7 +20,7 @@
    43.4  
    43.5  import org.netbeans.modules.bpel.nodes.BpelNode;
    43.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    43.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    43.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    43.9  import org.netbeans.modules.xml.schema.model.GlobalElement;
   43.10  import org.netbeans.modules.xml.schema.model.GlobalType;
   43.11  import org.netbeans.modules.xml.wsdl.model.Part;
   43.12 @@ -50,7 +50,7 @@
   43.13      protected String getImplHtmlDisplayName() {
   43.14          String result;
   43.15          String typeName = getTypeName();
   43.16 -        result = SoaUiUtil.getGrayString(
   43.17 +        result = SoaUtil.getGrayString(
   43.18                  getName(),
   43.19                  typeName == null ? "" : " " + typeName); // NOI18N
   43.20          //
    44.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/ReceiveNode.java	Thu Apr 17 10:51:04 2008 +0200
    44.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/ReceiveNode.java	Thu Apr 17 15:50:14 2008 +0200
    44.3 @@ -40,7 +40,7 @@
    44.4  import org.netbeans.modules.bpel.properties.editors.ReceiveCustomEditor;
    44.5  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    44.6  import org.netbeans.modules.bpel.properties.props.CustomEditorProperty;
    44.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    44.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    44.9  import org.netbeans.modules.soa.ui.form.CustomNodeEditor;
   44.10  import org.openide.nodes.Children;
   44.11  import org.openide.nodes.Node;
   44.12 @@ -83,7 +83,7 @@
   44.13          if (receive == null) {
   44.14              return super.getImplHtmlDisplayName();
   44.15          }
   44.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName(), EMPTY_STRING);
   44.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName(), EMPTY_STRING);
   44.18      }
   44.19      
   44.20      public String getHelpId() {
    45.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/SchemaFileNode.java	Thu Apr 17 10:51:04 2008 +0200
    45.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/SchemaFileNode.java	Thu Apr 17 15:50:14 2008 +0200
    45.3 @@ -24,7 +24,7 @@
    45.4  import org.netbeans.modules.bpel.model.api.BpelModel;
    45.5  import org.netbeans.modules.bpel.model.api.support.Utils;
    45.6  import org.netbeans.modules.bpel.properties.ResolverUtility;
    45.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    45.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    45.9  import org.netbeans.modules.xml.schema.model.Schema;
   45.10  import org.netbeans.modules.xml.schema.model.SchemaModel;
   45.11  import org.openide.filesystems.FileObject;
   45.12 @@ -70,7 +70,7 @@
   45.13      }
   45.14      
   45.15      protected String getImplHtmlDisplayName() {
   45.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName());
   45.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName());
   45.18      }
   45.19  
   45.20  }
    46.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/VariableNode.java	Thu Apr 17 10:51:04 2008 +0200
    46.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/VariableNode.java	Thu Apr 17 15:50:14 2008 +0200
    46.3 @@ -30,7 +30,7 @@
    46.4  import org.netbeans.modules.bpel.properties.Constants;
    46.5  import org.netbeans.modules.bpel.editors.api.Constants.VariableStereotype;
    46.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    46.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    46.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    46.9  import org.netbeans.modules.bpel.model.api.BpelEntity;
   46.10  import org.netbeans.modules.bpel.model.api.ElementReference;
   46.11  import org.netbeans.modules.bpel.model.api.MessageTypeReference;
   46.12 @@ -49,7 +49,7 @@
   46.13  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
   46.14  import org.netbeans.modules.bpel.nodes.actions.DeleteVariableAction;
   46.15  import org.netbeans.modules.bpel.properties.PropertyType;
   46.16 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   46.17 +import org.netbeans.modules.soa.ui.SoaUtil;
   46.18  import org.netbeans.modules.soa.ui.form.CustomNodeEditor;
   46.19  import org.netbeans.modules.xml.schema.model.GlobalElement;
   46.20  import org.netbeans.modules.xml.schema.model.GlobalType;
   46.21 @@ -138,14 +138,14 @@
   46.22              if (typeFilter.isTypeAllowed(this)) {
   46.23                  result = getName();
   46.24              } else {
   46.25 -                result = SoaUiUtil.getGrayString(getName());
   46.26 +                result = SoaUtil.getGrayString(getName());
   46.27              }
   46.28          } else {
   46.29              Reference varType = getVariableType();
   46.30              if (varType == null) {
   46.31                  result = getName();
   46.32              } else {
   46.33 -                result = SoaUiUtil.getGrayString(
   46.34 +                result = SoaUtil.getGrayString(
   46.35                          getName(),
   46.36                          " " + getVariableType().getRefString()); // NOI18N
   46.37              }
    47.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/WsdlFileNode.java	Thu Apr 17 10:51:04 2008 +0200
    47.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/WsdlFileNode.java	Thu Apr 17 15:50:14 2008 +0200
    47.3 @@ -26,7 +26,7 @@
    47.4  import org.netbeans.modules.bpel.model.api.BpelModel;
    47.5  import org.netbeans.modules.bpel.model.api.support.Utils;
    47.6  import org.netbeans.modules.bpel.properties.ResolverUtility;
    47.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    47.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    47.9  import org.netbeans.modules.xml.wsdl.model.Message;
   47.10  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
   47.11  import org.openide.filesystems.FileObject;
   47.12 @@ -71,7 +71,7 @@
   47.13      
   47.14      @Override
   47.15      protected String getImplHtmlDisplayName() {
   47.16 -        return SoaUiUtil.getGrayString(super.getImplHtmlDisplayName());
   47.17 +        return SoaUtil.getGrayString(super.getImplHtmlDisplayName());
   47.18      }
   47.19      
   47.20      static class MessageTypeChildren extends Children.Keys {
    48.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/AddPropertyAliasToWsdlAction.java	Thu Apr 17 10:51:04 2008 +0200
    48.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/AddPropertyAliasToWsdlAction.java	Thu Apr 17 15:50:14 2008 +0200
    48.3 @@ -35,7 +35,7 @@
    48.4  import org.netbeans.modules.soa.ui.form.valid.SoaDialogDisplayer;
    48.5  import org.netbeans.modules.bpel.editors.api.ui.valid.NodeEditorDescriptor;
    48.6  import org.netbeans.modules.bpel.model.api.support.ImportHelper;
    48.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    48.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    48.9  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
   48.10  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.BPELQName;
   48.11  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PropertyAlias;
   48.12 @@ -113,7 +113,7 @@
   48.13          //
   48.14          Dialog dialog = SoaDialogDisplayer.getDefault().createDialog(descriptor);
   48.15          //
   48.16 -        SoaUiUtil.setInitialFocusComponentFor(customEditor);
   48.17 +        SoaUtil.setInitialFocusComponentFor(customEditor);
   48.18          dialog.setVisible(true);
   48.19      }
   48.20      
    49.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/FindMexPeerAction.java	Thu Apr 17 10:51:04 2008 +0200
    49.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/FindMexPeerAction.java	Thu Apr 17 15:50:14 2008 +0200
    49.3 @@ -22,7 +22,7 @@
    49.4  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    49.5  import javax.swing.KeyStroke;
    49.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    49.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    49.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    49.9  import org.netbeans.modules.bpel.model.api.BpelContainer;
   49.10  import org.netbeans.modules.bpel.model.api.BpelEntity;
   49.11  import org.netbeans.modules.bpel.model.api.MessageExchange;
    50.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToDiagrammAction.java	Thu Apr 17 10:51:04 2008 +0200
    50.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToDiagrammAction.java	Thu Apr 17 15:50:14 2008 +0200
    50.3 @@ -24,7 +24,7 @@
    50.4  import javax.swing.KeyStroke;
    50.5  import org.netbeans.modules.bpel.model.api.BpelEntity;
    50.6  import org.netbeans.modules.bpel.nodes.BpelNode;
    50.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    50.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    50.9  import org.openide.loaders.DataNode;
   50.10  import org.openide.nodes.Node;
   50.11  import org.openide.util.NbBundle;
    51.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToLoggingAction.java	Thu Apr 17 10:51:04 2008 +0200
    51.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToLoggingAction.java	Thu Apr 17 15:50:14 2008 +0200
    51.3 @@ -20,7 +20,7 @@
    51.4  
    51.5  import org.netbeans.modules.bpel.nodes.actions.BpelNodeAction;
    51.6  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    51.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    51.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    51.9  import org.netbeans.modules.bpel.mapper.logging.multiview.LoggingDesignContextFactory;
   51.10  import org.netbeans.modules.bpel.model.api.BpelEntity;
   51.11  import org.netbeans.modules.bpel.model.api.ExtensibleElements;
    52.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToSourceAction.java	Thu Apr 17 10:51:04 2008 +0200
    52.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToSourceAction.java	Thu Apr 17 15:50:14 2008 +0200
    52.3 @@ -49,7 +49,7 @@
    52.4  
    52.5      protected void performAction(BpelEntity[] bpelEntities) {
    52.6          if (bpelEntities != null && bpelEntities.length > 0) {
    52.7 -            org.netbeans.modules.bpel.editors.api.utils.EditorUtil.goToSource(bpelEntities[0]);
    52.8 +            org.netbeans.modules.bpel.editors.api.EditorUtil.goToSource(bpelEntities[0]);
    52.9          }
   52.10      }
   52.11  
    53.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToTypeSourceAction.java	Thu Apr 17 10:51:04 2008 +0200
    53.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/GoToTypeSourceAction.java	Thu Apr 17 15:50:14 2008 +0200
    53.3 @@ -21,7 +21,7 @@
    53.4  
    53.5  import org.netbeans.modules.bpel.nodes.actions.BpelNodeAction;
    53.6  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    53.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    53.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    53.9  import org.netbeans.modules.bpel.model.api.BpelEntity;
   53.10  import org.netbeans.modules.bpel.model.api.VariableDeclaration;
   53.11  import org.netbeans.modules.bpel.model.api.references.SchemaReference;
    54.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/MoveDownBpelEntityAction.java	Thu Apr 17 10:51:04 2008 +0200
    54.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/MoveDownBpelEntityAction.java	Thu Apr 17 15:50:14 2008 +0200
    54.3 @@ -21,7 +21,7 @@
    54.4  import org.netbeans.modules.bpel.nodes.actions.BpelNodeAction;
    54.5  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    54.6  import java.util.concurrent.Callable;
    54.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    54.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    54.9  import org.netbeans.modules.bpel.model.api.Process;
   54.10  import org.netbeans.modules.bpel.model.api.ActivityHolder;
   54.11  import org.netbeans.modules.bpel.model.api.BpelContainer;
    55.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/MoveUpBpelEntityAction.java	Thu Apr 17 10:51:04 2008 +0200
    55.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/MoveUpBpelEntityAction.java	Thu Apr 17 15:50:14 2008 +0200
    55.3 @@ -21,7 +21,7 @@
    55.4  import org.netbeans.modules.bpel.nodes.actions.BpelNodeAction;
    55.5  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    55.6  import java.util.concurrent.Callable;
    55.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    55.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    55.9  import org.netbeans.modules.bpel.model.api.Process;
   55.10  import org.netbeans.modules.bpel.model.api.ActivityHolder;
   55.11  import org.netbeans.modules.bpel.model.api.BpelContainer;
    56.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/OpenPartnerLinkInEditor.java	Thu Apr 17 10:51:04 2008 +0200
    56.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/OpenPartnerLinkInEditor.java	Thu Apr 17 15:50:14 2008 +0200
    56.3 @@ -36,6 +36,7 @@
    56.4  import org.openide.nodes.Node;
    56.5  import org.openide.text.Line;
    56.6  import org.openide.util.NbBundle;
    56.7 +import org.netbeans.modules.soa.ui.SoaUtil;
    56.8  
    56.9  /**
   56.10   *
   56.11 @@ -65,7 +66,7 @@
   56.12          }
   56.13          
   56.14          WSDLModel wsdlModel = plt.get().getModel();
   56.15 -        FileObject fo = Util.getFileObjectByModel(wsdlModel);
   56.16 +        FileObject fo = SoaUtil.getFileObjectByModel(wsdlModel);
   56.17          try {
   56.18              DataObject d = DataObject.find(fo);
   56.19              LineCookie lc = (LineCookie) d.getCookie(LineCookie.class);
    57.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/ShowBpelMapperAction.java	Thu Apr 17 10:51:04 2008 +0200
    57.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/actions/ShowBpelMapperAction.java	Thu Apr 17 15:50:14 2008 +0200
    57.3 @@ -21,7 +21,7 @@
    57.4  import org.netbeans.modules.bpel.nodes.actions.BpelNodeAction;
    57.5  import org.netbeans.modules.bpel.editors.api.nodes.actions.ActionType;
    57.6  import javax.swing.KeyStroke;
    57.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    57.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    57.9  import org.netbeans.modules.bpel.mapper.multiview.BpelDesignContextFactory;
   57.10  import org.netbeans.modules.bpel.model.api.BpelEntity;
   57.11  import org.netbeans.modules.bpel.nodes.BpelNode;
    58.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/children/ActivityNodeChildren.java	Thu Apr 17 10:51:04 2008 +0200
    58.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/children/ActivityNodeChildren.java	Thu Apr 17 15:50:14 2008 +0200
    58.3 @@ -27,7 +27,7 @@
    58.4  import javax.swing.event.ChangeEvent;
    58.5  import javax.swing.event.ChangeListener;
    58.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    58.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    58.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    58.9  import org.netbeans.modules.bpel.model.api.Activity;
   58.10  import org.netbeans.modules.bpel.model.api.Assign;
   58.11  import org.netbeans.modules.bpel.model.api.BaseFaultHandlers;
    59.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/children/VariableDeclarationScopesChildren.java	Thu Apr 17 10:51:04 2008 +0200
    59.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/children/VariableDeclarationScopesChildren.java	Thu Apr 17 15:50:14 2008 +0200
    59.3 @@ -25,7 +25,7 @@
    59.4  import org.netbeans.modules.bpel.editors.api.Constants.VariableStereotype;
    59.5  import org.netbeans.modules.soa.ui.nodes.NodeFactory;
    59.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    59.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    59.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    59.9  import org.netbeans.modules.bpel.model.api.BaseScope;
   59.10  import org.netbeans.modules.bpel.model.api.VariableContainer;
   59.11  import org.netbeans.modules.bpel.model.api.VariableDeclaration;
    60.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/navigator/NavigatorNodeFactory.java	Thu Apr 17 10:51:04 2008 +0200
    60.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/navigator/NavigatorNodeFactory.java	Thu Apr 17 15:50:14 2008 +0200
    60.3 @@ -83,8 +83,7 @@
    60.4       * See base class comment.
    60.5       */
    60.6      public Node createNode(BpelEntity reference, Lookup lookup) {
    60.7 -        return this.createNode(org.netbeans.modules.bpel.editors.api.utils.
    60.8 -                                    EditorUtil.getBasicNodeType((BpelEntity)reference)
    60.9 +        return this.createNode(org.netbeans.modules.bpel.editors.api.EditorUtil.getBasicNodeType((BpelEntity)reference)
   60.10                  , reference, ChildrenType.DEFAULT_CHILD, lookup);
   60.11      }
   60.12      
    61.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/navigator/TooltipManager.java	Thu Apr 17 10:51:04 2008 +0200
    61.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/navigator/TooltipManager.java	Thu Apr 17 15:50:14 2008 +0200
    61.3 @@ -179,10 +179,10 @@
    61.4          } else {
    61.5              stringFrom = stringFrom == null 
    61.6                      ? BpelNode.EMPTY_STRING 
    61.7 -                    : org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getCorrectedHtmlRenderedString(stringFrom);
    61.8 +                    : org.netbeans.modules.bpel.editors.api.EditorUtil.getCorrectedHtmlRenderedString(stringFrom);
    61.9              stringTo = stringTo == null 
   61.10                      ? BpelNode.EMPTY_STRING 
   61.11 -                    : org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getCorrectedHtmlRenderedString(stringTo);
   61.12 +                    : org.netbeans.modules.bpel.editors.api.EditorUtil.getCorrectedHtmlRenderedString(stringTo);
   61.13          }
   61.14          
   61.15          
    62.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/RefactoringNodeCreatorAbstract.java	Thu Apr 17 10:51:04 2008 +0200
    62.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/RefactoringNodeCreatorAbstract.java	Thu Apr 17 15:50:14 2008 +0200
    62.3 @@ -59,8 +59,7 @@
    62.4                      );
    62.5          } else if (reference instanceof BpelEntity) {
    62.6              bpelNodeType = 
    62.7 -                    org.netbeans.modules.bpel.editors.api.utils.
    62.8 -                        EditorUtil.getBasicNodeType((BpelEntity) reference);
    62.9 +                    org.netbeans.modules.bpel.editors.api.EditorUtil.getBasicNodeType((BpelEntity) reference);
   62.10              if (bpelNodeType == NodeType.VARIABLE_CONTAINER 
   62.11                      || bpelNodeType == NodeType.VARIABLE_CONTAINER 
   62.12                      || bpelNodeType == NodeType.CORRELATION_SET_CONTAINER
    63.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/UsageContextNode.java	Thu Apr 17 10:51:04 2008 +0200
    63.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/UsageContextNode.java	Thu Apr 17 15:50:14 2008 +0200
    63.3 @@ -19,11 +19,11 @@
    63.4  package org.netbeans.modules.bpel.nodes.refactoring;
    63.5  
    63.6  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    63.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    63.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    63.9  import org.netbeans.modules.bpel.model.api.BpelEntity;
   63.10  import org.netbeans.modules.bpel.model.api.Sequence;
   63.11  import org.netbeans.modules.bpel.nodes.BpelNode;
   63.12 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   63.13 +import org.netbeans.modules.soa.ui.SoaUtil;
   63.14  import org.openide.nodes.Node;
   63.15  
   63.16  /**
   63.17 @@ -106,7 +106,7 @@
   63.18          int lastSepPosition = contextPathName.lastIndexOf(EditorUtil.ENTITY_SEPARATOR);
   63.19          if (lastSepPosition > 0) {
   63.20              lastSepPosition++;
   63.21 -            contextPathName = SoaUiUtil.getGrayString(
   63.22 +            contextPathName = SoaUtil.getGrayString(
   63.23                      "",contextPathName.substring(0,lastSepPosition)// NOI18N
   63.24                      ,contextPathName.substring(lastSepPosition), false);
   63.25          }
    64.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/Util.java	Thu Apr 17 10:51:04 2008 +0200
    64.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/refactoring/Util.java	Thu Apr 17 15:50:14 2008 +0200
    64.3 @@ -21,7 +21,7 @@
    64.4  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
    64.5  import org.netbeans.modules.bpel.model.api.BpelEntity;
    64.6  import org.netbeans.modules.bpel.nodes.BpelNode;
    64.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    64.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    64.9  /**
   64.10   *
   64.11   * @author Vitaly Bychkov
    65.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/nodes/validation/ValidationProxyListener.java	Thu Apr 17 10:51:04 2008 +0200
    65.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/nodes/validation/ValidationProxyListener.java	Thu Apr 17 15:50:14 2008 +0200
    65.3 @@ -22,12 +22,13 @@
    65.4  import java.util.HashMap;
    65.5  import java.util.List;
    65.6  import java.util.Map;
    65.7 +
    65.8 +import org.netbeans.modules.soa.validation.Controller;
    65.9 +import org.netbeans.modules.soa.validation.Listener;
   65.10  import org.netbeans.modules.bpel.core.annotations.AnnotationListener;
   65.11  import org.netbeans.modules.bpel.core.annotations.AnnotationManagerCookie;
   65.12  import org.netbeans.modules.bpel.core.annotations.DiagramAnnotation;
   65.13 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
   65.14 -import org.netbeans.modules.bpel.core.util.BPELValidationListener;
   65.15 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   65.16 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   65.17  import org.netbeans.modules.bpel.model.api.BpelEntity;
   65.18  import org.netbeans.modules.bpel.model.api.BpelModel;
   65.19  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.BPELExtensibilityComponent;
   65.20 @@ -41,14 +42,14 @@
   65.21   * @author Vitaly Bychkov
   65.22   * @version 1.1
   65.23   */
   65.24 -public class ValidationProxyListener implements BPELValidationListener, AnnotationListener {
   65.25 +public class ValidationProxyListener implements Listener, AnnotationListener {
   65.26      private Map<Component, Validator.ResultType> cachedResultMap = new HashMap<Component, Validator.ResultType>();
   65.27      private ChangeValidationSupport myValidationSupport;
   65.28      private Lookup myLookup;
   65.29 -    private BPELValidationController myValidationController;
   65.30 +    private Controller myValidationController;
   65.31      private AnnotationManagerCookie cookie;
   65.32      
   65.33 -    private ValidationProxyListener(Lookup lookup, BPELValidationController validationController) {
   65.34 +    private ValidationProxyListener(Lookup lookup, Controller validationController) {
   65.35          assert lookup != null && validationController != null;
   65.36          myLookup = lookup;
   65.37          myValidationController = validationController;
   65.38 @@ -62,7 +63,7 @@
   65.39          if (lookup == null) {
   65.40              return null;
   65.41          }
   65.42 -        BPELValidationController validationController = (BPELValidationController) lookup.lookup(BPELValidationController.class);
   65.43 +        Controller validationController = (Controller) lookup.lookup(Controller.class);
   65.44  
   65.45          if (validationController == null) {
   65.46              return null;
   65.47 @@ -184,12 +185,12 @@
   65.48          return null;
   65.49      }
   65.50      
   65.51 -    private void attachValidationController(BPELValidationListener listener) {
   65.52 -        myValidationController.addValidationListener(listener);
   65.53 +    private void attachValidationController(Listener listener) {
   65.54 +        myValidationController.addListener(listener);
   65.55      }
   65.56      
   65.57 -    private void detachValidationController(BPELValidationListener listener) {
   65.58 -        myValidationController.removeValidationListener(listener);
   65.59 +    private void detachValidationController(Listener listener) {
   65.60 +        myValidationController.removeListener(listener);
   65.61      }
   65.62      
   65.63      /**
    66.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/ImportRegistrationHelper.java	Thu Apr 17 10:51:04 2008 +0200
    66.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/ImportRegistrationHelper.java	Thu Apr 17 15:50:14 2008 +0200
    66.3 @@ -33,6 +33,7 @@
    66.4  import org.netbeans.modules.xml.xam.locator.CatalogModelException;
    66.5  import org.openide.ErrorManager;
    66.6  import org.openide.filesystems.FileObject;
    66.7 +import org.netbeans.modules.soa.ui.SoaUtil;
    66.8  
    66.9  /**
   66.10   *
   66.11 @@ -102,7 +103,7 @@
   66.12      }
   66.13      
   66.14      public Import createImport(Model model){
   66.15 -        FileObject modelFo = Util.getFileObjectByModel(model);
   66.16 +        FileObject modelFo = SoaUtil.getFileObjectByModel(model);
   66.17          if (modelFo != null) {
   66.18              return createImport(modelFo);
   66.19          }
    67.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/ImportWsdlRegistrationHelper.java	Thu Apr 17 10:51:04 2008 +0200
    67.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/ImportWsdlRegistrationHelper.java	Thu Apr 17 15:50:14 2008 +0200
    67.3 @@ -44,6 +44,7 @@
    67.4  import org.openide.filesystems.FileObject;
    67.5  import org.w3c.dom.Document;
    67.6  import org.w3c.dom.Element;
    67.7 +import org.netbeans.modules.soa.ui.SoaUtil;
    67.8  
    67.9  /**
   67.10   *
   67.11 @@ -114,7 +115,7 @@
   67.12      
   67.13      private boolean isSelfFo(FileObject fo) {
   67.14          assert fo != null;
   67.15 -        FileObject modelFo = Util.getFileObjectByModel(myWsdlModel);
   67.16 +        FileObject modelFo = SoaUtil.getFileObjectByModel(myWsdlModel);
   67.17          return modelFo.equals(fo);
   67.18      }
   67.19      
   67.20 @@ -147,7 +148,7 @@
   67.21              return;
   67.22          }
   67.23          
   67.24 -        FileObject fo = Util.getFileObjectByModel(importedWsdlModel);
   67.25 +        FileObject fo = SoaUtil.getFileObjectByModel(importedWsdlModel);
   67.26          Import new_imp = myWsdlModel.getFactory().createImport();
   67.27          
   67.28          String location = Util.getNewModelLocation(myWsdlModel ,fo );
   67.29 @@ -230,7 +231,7 @@
   67.30              if (! isExistSchemaRef(schema, importedSchemaModel)) {
   67.31  //            schemaImport.setSchemaLocation("sagjdsahgjhgasdjhg");
   67.32  //            schemaImport.setNamespace("testnamespace ");
   67.33 -                FileObject fo = Util.getFileObjectByModel(importedSchemaModel);
   67.34 +                FileObject fo = SoaUtil.getFileObjectByModel(importedSchemaModel);
   67.35                  if (fo != null) {
   67.36                      String location = Util.getNewModelLocation(myWsdlModel ,fo );
   67.37                      if (location != null) {
    68.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/NodeUtils.java	Thu Apr 17 10:51:04 2008 +0200
    68.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/NodeUtils.java	Thu Apr 17 15:50:14 2008 +0200
    68.3 @@ -30,7 +30,7 @@
    68.4  import org.netbeans.modules.bpel.editors.api.ui.valid.NodeEditorDescriptor;
    68.5  import org.netbeans.modules.bpel.nodes.BpelNode;
    68.6  import org.netbeans.modules.bpel.nodes.ContainerBpelNode;
    68.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    68.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    68.9  import org.openide.nodes.Node;
   68.10  import org.openide.util.NbBundle;
   68.11  
   68.12 @@ -83,7 +83,7 @@
   68.13              CustomNodeEditor editor = (CustomNodeEditor)c;
   68.14              NodeEditorDescriptor descriptor = new NodeEditorDescriptor(editor, title);
   68.15              Dialog dialog = SoaDialogDisplayer.getDefault().createDialog(descriptor);
   68.16 -            SoaUiUtil.setInitialFocusComponentFor((Container)c);
   68.17 +            SoaUtil.setInitialFocusComponentFor((Container)c);
   68.18              dialog.setVisible(true);
   68.19              
   68.20              return descriptor.isOkHasPressed();
    69.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/ResolverUtility.java	Thu Apr 17 10:51:04 2008 +0200
    69.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/ResolverUtility.java	Thu Apr 17 15:50:14 2008 +0200
    69.3 @@ -47,6 +47,7 @@
    69.4  import org.netbeans.modules.xml.xam.Reference;
    69.5  import org.netbeans.modules.xml.xpath.ext.schema.GetNameVisitor;
    69.6  import org.openide.util.NbBundle;
    69.7 +import org.netbeans.modules.soa.ui.SoaUtil;
    69.8  
    69.9  /**
   69.10   * The utility class containing auxiliary methods to work with WSDL
   69.11 @@ -161,7 +162,7 @@
   69.12          if (bpelModel == null) {
   69.13              return null;
   69.14          }
   69.15 -        FileObject bpelFo = Util.getFileObjectByModel(bpelModel);
   69.16 +        FileObject bpelFo = SoaUtil.getFileObjectByModel(bpelModel);
   69.17          if (bpelFo == null) {
   69.18              return null;
   69.19          }
    70.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/Util.java	Thu Apr 17 10:51:04 2008 +0200
    70.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/Util.java	Thu Apr 17 15:50:14 2008 +0200
    70.3 @@ -55,6 +55,7 @@
    70.4  import org.openide.filesystems.FileUtil;
    70.5  import org.openide.nodes.Node;
    70.6  import org.openide.util.Lookup;
    70.7 +import org.netbeans.modules.soa.ui.SoaUtil;
    70.8  
    70.9  /**
   70.10   *
   70.11 @@ -222,27 +223,10 @@
   70.12          return false;
   70.13      } //-- isExtender
   70.14      
   70.15 -    /**
   70.16 -     *
   70.17 -     *
   70.18 -     */
   70.19 -    public static FileObject getFileObjectByModel(Model model){
   70.20 -        if (model != null){
   70.21 -            ModelSource src = model.getModelSource();
   70.22 -            if (src != null){
   70.23 -                Lookup lookup = src.getLookup();
   70.24 -                if (lookup != null){
   70.25 -                    return (FileObject) lookup.lookup(FileObject.class);
   70.26 -                }
   70.27 -            }
   70.28 -        }
   70.29 -        return null;
   70.30 -    }
   70.31 -    
   70.32      public static String getNewModelLocation(Model mainModel, FileObject newModelFo){
   70.33          Lookup lookup = mainModel.getModelSource().getLookup();
   70.34          if (lookup != null){
   70.35 -            FileObject mainModelFo = getFileObjectByModel(mainModel);
   70.36 +            FileObject mainModelFo = SoaUtil.getFileObjectByModel(mainModel);
   70.37              return getRelativePath(mainModelFo.getParent(), newModelFo);
   70.38          }
   70.39          return null;
    71.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/choosers/NewMessageVarChooser.java	Thu Apr 17 10:51:04 2008 +0200
    71.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/choosers/NewMessageVarChooser.java	Thu Apr 17 15:50:14 2008 +0200
    71.3 @@ -41,7 +41,7 @@
    71.4  import org.netbeans.modules.bpel.properties.VirtualVariableContainer;
    71.5  import org.netbeans.modules.bpel.properties.ResolverUtility;
    71.6  import org.netbeans.modules.bpel.properties.editors.FormBundle;
    71.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    71.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    71.9  import org.netbeans.modules.soa.ui.form.ChooserLifeCycle;
   71.10  import org.netbeans.modules.xml.wsdl.model.Message;
   71.11  import org.openide.util.Lookup;
   71.12 @@ -97,7 +97,7 @@
   71.13              }
   71.14          });
   71.15          //
   71.16 -        SoaUiUtil.activateInlineMnemonics(this);
   71.17 +        SoaUtil.activateInlineMnemonics(this);
   71.18      }
   71.19      
   71.20      public boolean initControls() {
    72.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/choosers/PropAliasTypeChooserPanel.java	Thu Apr 17 10:51:04 2008 +0200
    72.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/choosers/PropAliasTypeChooserPanel.java	Thu Apr 17 15:50:14 2008 +0200
    72.3 @@ -64,7 +64,7 @@
    72.4  import org.netbeans.modules.soa.ui.form.Reusable;
    72.5  import org.netbeans.modules.soa.ui.form.valid.Validator;
    72.6  import org.netbeans.modules.bpel.properties.editors.nodes.factory.PropertyAliasTypeChooserNodeFactory;
    72.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    72.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    72.9  import org.netbeans.modules.xml.schema.model.GlobalElement;
   72.10  import org.netbeans.modules.xml.schema.model.GlobalSimpleType;
   72.11  import org.netbeans.modules.xml.schema.model.GlobalType;
   72.12 @@ -453,7 +453,7 @@
   72.13      }
   72.14      
   72.15      public Component getTreeComponent() {
   72.16 -        JTree tree = SoaUiUtil.lookForChildByClass(treeView, JTree.class);
   72.17 +        JTree tree = SoaUtil.lookForChildByClass(treeView, JTree.class);
   72.18          return tree;
   72.19      }
   72.20      
    73.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/InvokeCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    73.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/InvokeCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    73.3 @@ -28,7 +28,7 @@
    73.4  import org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor;
    73.5  import org.netbeans.modules.bpel.nodes.InvokeNode;
    73.6  import org.netbeans.modules.bpel.properties.editors.controls.MessageConfigurationController;
    73.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    73.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    73.9  import org.openide.util.HelpCtx;
   73.10  import org.openide.util.NbBundle;
   73.11  
   73.12 @@ -75,7 +75,7 @@
   73.13              }
   73.14          });
   73.15          //
   73.16 -        SoaUiUtil.activateInlineMnemonics(this);
   73.17 +        SoaUtil.activateInlineMnemonics(this);
   73.18      }
   73.19  
   73.20      public HelpCtx getHelpCtx() {
    74.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/OnEventCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    74.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/OnEventCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    74.3 @@ -27,7 +27,7 @@
    74.4  import org.netbeans.modules.bpel.model.api.OnEvent;
    74.5  import org.netbeans.modules.bpel.nodes.OnEventNode;
    74.6  import org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor;
    74.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    74.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    74.9  import org.openide.util.HelpCtx;
   74.10  import org.openide.util.NbBundle;
   74.11  
   74.12 @@ -74,7 +74,7 @@
   74.13              }
   74.14          });
   74.15          //
   74.16 -        SoaUiUtil.activateInlineMnemonics(this);
   74.17 +        SoaUtil.activateInlineMnemonics(this);
   74.18      }
   74.19      
   74.20      public HelpCtx getHelpCtx() {
    75.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/OnMessageCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    75.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/OnMessageCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    75.3 @@ -27,7 +27,7 @@
    75.4  import org.netbeans.modules.bpel.model.api.OnMessage;
    75.5  import org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor;
    75.6  import org.netbeans.modules.bpel.nodes.OnMessageNode;
    75.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    75.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    75.9  import org.openide.util.HelpCtx;
   75.10  import org.openide.util.NbBundle;
   75.11  
   75.12 @@ -70,7 +70,7 @@
   75.13              }
   75.14          });
   75.15          //
   75.16 -        SoaUiUtil.activateInlineMnemonics(this);
   75.17 +        SoaUtil.activateInlineMnemonics(this);
   75.18      }
   75.19  
   75.20      public HelpCtx getHelpCtx() {
    76.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/PartnerLinkMainPanel.java	Thu Apr 17 10:51:04 2008 +0200
    76.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/PartnerLinkMainPanel.java	Thu Apr 17 15:50:14 2008 +0200
    76.3 @@ -74,7 +74,8 @@
    76.4  import org.netbeans.modules.soa.ui.form.valid.Validator;
    76.5  import org.openide.ErrorManager;
    76.6  import static org.netbeans.modules.bpel.properties.PropertyType.*;
    76.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    76.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    76.9 +import org.netbeans.modules.soa.ui.SoaUtil;
   76.10  import org.netbeans.modules.soa.ui.form.EditorLifeCycleAdapter;
   76.11  import org.netbeans.modules.soa.ui.form.valid.DefaultValidator;
   76.12  import org.netbeans.modules.bpel.editors.api.ui.valid.ErrorMessagesBundle;
   76.13 @@ -625,7 +626,7 @@
   76.14      }
   76.15      
   76.16      private FileObject getSource() {
   76.17 -        return EditorUtil.getFileObjectByModel(myEditor.getLookup().lookup(BpelModel.class));
   76.18 +        return SoaUtil.getFileObjectByModel(myEditor.getLookup().lookup(BpelModel.class));
   76.19      }
   76.20      
   76.21      // vlv
   76.22 @@ -1317,7 +1318,7 @@
   76.23          if (result != DialogDescriptor.OK_OPTION) {
   76.24              return;
   76.25          }
   76.26 -        FileObject file = EditorUtil.getFileObjectByModel(dialog.getModel());
   76.27 +        FileObject file = SoaUtil.getFileObjectByModel(dialog.getModel());
   76.28          
   76.29          String text = getRelativeName(file);
   76.30          myWsdlWrapperName.setText(text);
    77.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/ReceiveCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    77.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/ReceiveCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    77.3 @@ -27,7 +27,7 @@
    77.4  import org.netbeans.modules.bpel.model.api.Receive;
    77.5  import org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor;
    77.6  import org.netbeans.modules.bpel.nodes.ReceiveNode;
    77.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    77.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    77.9  import org.openide.util.HelpCtx;
   77.10  import org.openide.util.NbBundle;
   77.11  
   77.12 @@ -73,7 +73,7 @@
   77.13              }
   77.14          });
   77.15          //
   77.16 -        SoaUiUtil.activateInlineMnemonics(this);
   77.17 +        SoaUtil.activateInlineMnemonics(this);
   77.18      }
   77.19      
   77.20      public HelpCtx getHelpCtx() {
    78.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/ReplyCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    78.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/ReplyCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    78.3 @@ -27,7 +27,7 @@
    78.4  import org.netbeans.modules.bpel.model.api.Reply;
    78.5  import org.netbeans.modules.bpel.properties.editors.controls.AbstractCustomNodeEditor;
    78.6  import org.netbeans.modules.bpel.nodes.ReplyNode;
    78.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    78.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    78.9  import org.openide.util.HelpCtx;
   78.10  import org.openide.util.NbBundle;
   78.11  
   78.12 @@ -73,7 +73,7 @@
   78.13              }
   78.14          });
   78.15           //
   78.16 -        SoaUiUtil.activateInlineMnemonics(this);
   78.17 +        SoaUtil.activateInlineMnemonics(this);
   78.18     }
   78.19  
   78.20      public HelpCtx getHelpCtx() {
    79.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/VariableMainPanel.java	Thu Apr 17 10:51:04 2008 +0200
    79.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/VariableMainPanel.java	Thu Apr 17 15:50:14 2008 +0200
    79.3 @@ -75,7 +75,7 @@
    79.4              typeChooser.init(StereotypeFilter.ALL, myEditor.getLookup());
    79.5              //
    79.6              Variable var = myEditor.getEditedObject();
    79.7 -            Reference typeRef = org.netbeans.modules.bpel.editors.api.utils.EditorUtil.getVariableType(var);
    79.8 +            Reference typeRef = org.netbeans.modules.bpel.editors.api.EditorUtil.getVariableType(var);
    79.9              //
   79.10              if (typeRef == null) {
   79.11                  typeChooser.setSelectedValue(null);
    80.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/AbstractCustomNodeEditor.java	Thu Apr 17 10:51:04 2008 +0200
    80.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/AbstractCustomNodeEditor.java	Thu Apr 17 15:50:14 2008 +0200
    80.3 @@ -41,7 +41,7 @@
    80.4  import org.netbeans.modules.soa.ui.form.valid.DefaultValidStateManager;
    80.5  import org.netbeans.modules.soa.ui.form.valid.ValidStateManager;
    80.6  import org.netbeans.modules.bpel.nodes.BpelNode;
    80.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    80.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    80.9  import org.netbeans.modules.soa.ui.UserNotification;
   80.10  import org.netbeans.modules.soa.ui.form.valid.Validator.Reason;
   80.11  import org.openide.ErrorManager;
   80.12 @@ -489,6 +489,6 @@
   80.13      }
   80.14      
   80.15      protected void fireHelpContextChange() {
   80.16 -        SoaUiUtil.fireHelpContextChange(this, this.getHelpCtx());
   80.17 +        SoaUtil.fireHelpContextChange(this, this.getHelpCtx());
   80.18      }
   80.19  }
    81.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/SimpleCustomEditor.java	Thu Apr 17 10:51:04 2008 +0200
    81.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/SimpleCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
    81.3 @@ -23,7 +23,7 @@
    81.4  import javax.swing.JPanel;
    81.5  import org.netbeans.modules.soa.ui.form.CustomNodeEditor;
    81.6  import org.netbeans.modules.bpel.nodes.BpelNode;
    81.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    81.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    81.9  import org.openide.ErrorManager;
   81.10  import org.openide.util.HelpCtx;
   81.11  
   81.12 @@ -86,7 +86,7 @@
   81.13              accessibleContext = mainPanel.getAccessibleContext();
   81.14          }
   81.15          //
   81.16 -        SoaUiUtil.activateInlineMnemonics(this);
   81.17 +        SoaUtil.activateInlineMnemonics(this);
   81.18      }
   81.19      
   81.20      public JPanel getMainPanel() {
    82.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/TreeNodeChooser.java	Thu Apr 17 10:51:04 2008 +0200
    82.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/editors/controls/TreeNodeChooser.java	Thu Apr 17 15:50:14 2008 +0200
    82.3 @@ -22,7 +22,7 @@
    82.4  import javax.swing.JPanel;
    82.5  import org.netbeans.modules.soa.ui.form.CustomNodeChooser;
    82.6  import org.netbeans.modules.bpel.properties.Util;
    82.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    82.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    82.9  import org.netbeans.modules.soa.ui.form.valid.DefaultValidStateManager;
   82.10  import org.netbeans.modules.soa.ui.form.valid.ValidStateManager;
   82.11  import org.openide.nodes.Node;
   82.12 @@ -55,7 +55,7 @@
   82.13          // initControls();
   82.14          //
   82.15          Util.attachDefaultDblClickAction(myTreePanel, myTreePanel);
   82.16 -        SoaUiUtil.activateInlineMnemonics(this);
   82.17 +        SoaUtil.activateInlineMnemonics(this);
   82.18          accessibleContext = treePanel.getAccessibleContext();
   82.19      }
   82.20      
    83.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/DeadlinePropertyCustomizer.java	Thu Apr 17 10:51:04 2008 +0200
    83.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/DeadlinePropertyCustomizer.java	Thu Apr 17 15:50:14 2008 +0200
    83.3 @@ -34,18 +34,18 @@
    83.4  import javax.swing.Timer;
    83.5  import javax.swing.event.DocumentEvent;
    83.6  import javax.swing.event.DocumentListener;
    83.7 +import org.netbeans.modules.soa.validation.DurationUtil;
    83.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    83.9  import org.netbeans.modules.soa.ui.form.ValidablePropertyCustomizer;
   83.10 -import org.netbeans.modules.bpel.properties.Constants;
   83.11 -import org.netbeans.modules.bpel.properties.editors.FormBundle;
   83.12  import org.netbeans.modules.soa.ui.form.RangeIntegerDocument;
   83.13  import org.netbeans.modules.soa.ui.form.valid.DefaultValidator;
   83.14 -import org.netbeans.modules.bpel.editors.api.ui.valid.ErrorMessagesBundle;
   83.15  import org.netbeans.modules.soa.ui.form.valid.ValidStateManager;
   83.16  import org.netbeans.modules.soa.ui.form.valid.ValidStateManager.ValidStateListener;
   83.17  import org.netbeans.modules.soa.ui.form.valid.Validator;
   83.18 +import org.netbeans.modules.bpel.properties.Constants;
   83.19 +import org.netbeans.modules.bpel.properties.editors.FormBundle;
   83.20 +import org.netbeans.modules.bpel.editors.api.ui.valid.ErrorMessagesBundle;
   83.21  import org.netbeans.modules.bpel.properties.props.PropertyVetoError;
   83.22 -import org.netbeans.modules.soa.ui.util.DurationUtil;
   83.23 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   83.24  import org.openide.explorer.propertysheet.PropertyEnv;
   83.25  import org.openide.util.HelpCtx;
   83.26  
   83.27 @@ -129,7 +129,7 @@
   83.28          //
   83.29          HelpCtx.setHelpIDString(this, this.getClass().getName());
   83.30          //
   83.31 -        SoaUiUtil.activateInlineMnemonics(this);
   83.32 +        SoaUtil.activateInlineMnemonics(this);
   83.33      }
   83.34      
   83.35      @Override
    84.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/DurationPropertyCustomizer.java	Thu Apr 17 10:51:04 2008 +0200
    84.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/DurationPropertyCustomizer.java	Thu Apr 17 15:50:14 2008 +0200
    84.3 @@ -31,21 +31,21 @@
    84.4  import javax.swing.Timer;
    84.5  import javax.swing.event.DocumentEvent;
    84.6  import javax.swing.event.DocumentListener;
    84.7 +import org.netbeans.modules.soa.validation.Duration;
    84.8 +import org.netbeans.modules.soa.validation.DurationUtil;
    84.9 +import org.netbeans.modules.soa.ui.SoaUtil;
   84.10  import org.netbeans.modules.soa.ui.form.ValidablePropertyCustomizer;
   84.11 +import org.netbeans.modules.soa.ui.form.RangeDoubleDocument;
   84.12 +import org.netbeans.modules.soa.ui.form.RangeIntegerDocument;
   84.13 +import org.netbeans.modules.soa.ui.form.valid.DefaultValidator;
   84.14 +import org.netbeans.modules.soa.ui.form.valid.ValidStateManager;
   84.15 +import org.netbeans.modules.soa.ui.form.valid.ValidStateManager.ValidStateListener;
   84.16 +import org.netbeans.modules.soa.ui.form.valid.Validator;
   84.17  import org.netbeans.modules.bpel.properties.Constants;
   84.18  import org.netbeans.modules.bpel.properties.PropertyType;
   84.19  import org.netbeans.modules.bpel.properties.editors.FormBundle;
   84.20 -import org.netbeans.modules.soa.ui.form.RangeDoubleDocument;
   84.21 -import org.netbeans.modules.soa.ui.form.RangeIntegerDocument;
   84.22 -import org.netbeans.modules.soa.ui.form.valid.DefaultValidator;
   84.23  import org.netbeans.modules.bpel.editors.api.ui.valid.ErrorMessagesBundle;
   84.24 -import org.netbeans.modules.soa.ui.form.valid.ValidStateManager;
   84.25 -import org.netbeans.modules.soa.ui.form.valid.ValidStateManager.ValidStateListener;
   84.26 -import org.netbeans.modules.soa.ui.form.valid.Validator;
   84.27  import org.netbeans.modules.bpel.properties.props.PropertyVetoError;
   84.28 -import org.netbeans.modules.soa.ui.util.Duration;
   84.29 -import org.netbeans.modules.soa.ui.util.DurationUtil;
   84.30 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   84.31  import org.openide.explorer.propertysheet.PropertyEnv;
   84.32  import org.openide.util.HelpCtx;
   84.33  
   84.34 @@ -129,7 +129,7 @@
   84.35          //
   84.36          HelpCtx.setHelpIDString(this, this.getClass().getName());
   84.37          //
   84.38 -        SoaUiUtil.activateInlineMnemonics(this);
   84.39 +        SoaUtil.activateInlineMnemonics(this);
   84.40      }
   84.41      
   84.42      @Override
   84.43 @@ -167,7 +167,7 @@
   84.44          }
   84.45          if (newHelpCtxID != null && newHelpCtxID.length() != 0) {
   84.46              HelpCtx.setHelpIDString(this, newHelpCtxID); // NOI18N
   84.47 -            SoaUiUtil.fireHelpContextChange(this, new HelpCtx(newHelpCtxID));
   84.48 +            SoaUtil.fireHelpContextChange(this, new HelpCtx(newHelpCtxID));
   84.49          }
   84.50      }
   84.51      
    85.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/FaultNamePropertyCustomizer.java	Thu Apr 17 10:51:04 2008 +0200
    85.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/FaultNamePropertyCustomizer.java	Thu Apr 17 15:50:14 2008 +0200
    85.3 @@ -52,7 +52,7 @@
    85.4  import org.netbeans.modules.soa.ui.form.valid.ValidStateManager.ValidStateListener;
    85.5  import org.netbeans.modules.soa.ui.form.valid.Validator;
    85.6  import org.netbeans.modules.bpel.properties.props.PropertyVetoError;
    85.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    85.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    85.9  import org.netbeans.modules.soa.ui.form.valid.DefaultDialogDescriptor;
   85.10  import org.openide.explorer.ExplorerManager;
   85.11  import org.openide.explorer.propertysheet.PropertyEnv;
   85.12 @@ -220,7 +220,7 @@
   85.13          FaultNameChooserPanel chooserPanel = getChooserPanel();
   85.14          Util.attachDefaultDblClickAction(chooserPanel, chooserPanel);
   85.15          //
   85.16 -        SoaUiUtil.activateInlineMnemonics(this);
   85.17 +        SoaUtil.activateInlineMnemonics(this);
   85.18          //
   85.19          HelpCtx.setHelpIDString(this, this.getClass().getName());
   85.20      }
    86.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/TreeChooserPropertyCustomizer.java	Thu Apr 17 10:51:04 2008 +0200
    86.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/properties/props/editors/TreeChooserPropertyCustomizer.java	Thu Apr 17 15:50:14 2008 +0200
    86.3 @@ -27,7 +27,7 @@
    86.4  import org.netbeans.modules.bpel.properties.editors.controls.AbstractTreeChooserPanel;
    86.5  import org.netbeans.modules.soa.ui.form.valid.Validator;
    86.6  import org.netbeans.modules.bpel.properties.props.PropertyVetoError;
    86.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    86.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    86.9  import org.openide.explorer.propertysheet.PropertyEnv;
   86.10  
   86.11  /**
   86.12 @@ -45,7 +45,7 @@
   86.13          pnlChooser.createContent();
   86.14          //
   86.15          Util.attachDefaultDblClickAction(pnlChooser, pnlChooser);
   86.16 -        SoaUiUtil.activateInlineMnemonics(this);
   86.17 +        SoaUtil.activateInlineMnemonics(this);
   86.18      }
   86.19      
   86.20      protected synchronized T getChooserPanel() {
    87.1 --- a/bpel.mapper/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
    87.2 +++ b/bpel.mapper/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
    87.3 @@ -74,6 +74,15 @@
    87.4                      </run-dependency>
    87.5                  </dependency>
    87.6                  <dependency>
    87.7 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
    87.8 +                    <build-prerequisite/>
    87.9 +                    <compile-dependency/>
   87.10 +                    <run-dependency>
   87.11 +                        <release-version>1</release-version>
   87.12 +                        <specification-version>1.1</specification-version>
   87.13 +                    </run-dependency>
   87.14 +                </dependency>
   87.15 +                <dependency>
   87.16                      <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
   87.17                      <build-prerequisite/>
   87.18                      <compile-dependency/>
    88.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/cast/SubtypeChooser.java	Thu Apr 17 10:51:04 2008 +0200
    88.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/cast/SubtypeChooser.java	Thu Apr 17 15:50:14 2008 +0200
    88.3 @@ -37,7 +37,7 @@
    88.4  import org.netbeans.modules.bpel.mapper.tree.spi.ExtTreeModel;
    88.5  import org.netbeans.modules.bpel.mapper.tree.spi.TreeItemFinder;
    88.6  import org.netbeans.modules.bpel.model.api.BpelModel;
    88.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
    88.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    88.9  import org.netbeans.modules.soa.ui.form.ChooserLifeCycle;
   88.10  import org.netbeans.modules.soa.ui.form.valid.DefaultDialogDescriptor;
   88.11  import org.netbeans.modules.soa.ui.form.valid.DefaultValidStateManager;
   88.12 @@ -125,7 +125,7 @@
   88.13          mDlgTitle = NbBundle.getMessage(SubtypeChooser.class,
   88.14              "SUBTYPE_CHOOSER_TITLE"); // NOI18N
   88.15          //
   88.16 -        SoaUiUtil.activateInlineMnemonics(this);
   88.17 +        SoaUtil.activateInlineMnemonics(this);
   88.18      }
   88.19  
   88.20      public boolean initControls() {
   88.21 @@ -183,7 +183,7 @@
   88.22          DefaultDialogDescriptor descriptor = 
   88.23                  new DefaultDialogDescriptor(editor, editor.getDlgTitle());
   88.24          Dialog dialog = SoaDialogDisplayer.getDefault().createDialog(descriptor);
   88.25 -        SoaUiUtil.setInitialFocusComponentFor(editor);
   88.26 +        SoaUtil.setInitialFocusComponentFor(editor);
   88.27          dialog.setVisible(true);
   88.28  
   88.29          return descriptor.isOkHasPressed();
    89.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/logging/multiview/DesignContextControllerImpl2.java	Thu Apr 17 10:51:04 2008 +0200
    89.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/logging/multiview/DesignContextControllerImpl2.java	Thu Apr 17 15:50:14 2008 +0200
    89.3 @@ -16,7 +16,6 @@
    89.4   * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    89.5   * Microsystems, Inc. All Rights Reserved.
    89.6   */
    89.7 -
    89.8  package org.netbeans.modules.bpel.mapper.logging.multiview;
    89.9  
   89.10  import java.awt.EventQueue;
   89.11 @@ -25,7 +24,7 @@
   89.12  import java.lang.ref.WeakReference;
   89.13  import java.util.EventObject;
   89.14  import javax.swing.SwingUtilities;
   89.15 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   89.16 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   89.17  import org.netbeans.modules.bpel.mapper.logging.model.LoggingMapperModelFactory;
   89.18  import org.netbeans.modules.bpel.mapper.model.GraphExpandProcessor;
   89.19  import org.netbeans.modules.bpel.mapper.multiview.BpelDesignContext;
    90.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperModel.java	Thu Apr 17 10:51:04 2008 +0200
    90.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperModel.java	Thu Apr 17 15:50:14 2008 +0200
    90.3 @@ -259,8 +259,8 @@
    90.4              }
    90.5          }
    90.6          return true;
    90.7 -    }
    90.8 -
    90.9 +            }
   90.10 +       
   90.11      public boolean canCopy(TreePath treePath, GraphSubset graphSubset) {
   90.12          return true;
   90.13      }
    91.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperModelFactory.java	Thu Apr 17 10:51:04 2008 +0200
    91.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperModelFactory.java	Thu Apr 17 15:50:14 2008 +0200
    91.3 @@ -216,7 +216,7 @@
    91.4                              timeEH, castList);
    91.5                  } else if (timeEvent instanceof DeadlineExpression) {
    91.6                      DeadlineExpression expr = (DeadlineExpression)timeEvent;
    91.7 -                    BpelEntityCasts castList = editorExtProcessor.getCastList(expr);
    91.8 +                    BpelEntityCasts castList = editorExtProcessor.getCastList(bpelEntity);
    91.9                      addExpressionGraph(expr, newMapperModel, 
   91.10                              DateValueTreeModel.DEADLINE_CONDITION, 
   91.11                              timeEH, castList);
   91.12 @@ -248,7 +248,7 @@
   91.13              assert bpelEntity instanceof ConditionHolder;
   91.14              Expression expr = ((ConditionHolder)bpelEntity).getCondition();
   91.15              if (expr != null) {
   91.16 -                BpelEntityCasts castList = editorExtProcessor.getCastList(expr);
   91.17 +                BpelEntityCasts castList = editorExtProcessor.getCastList(bpelEntity);
   91.18                  addExpressionGraph(expr, newMapperModel, 
   91.19                          ConditionValueTreeModel.BOOLEAN_CONDITION, 
   91.20                          bpelEntity, castList);
   91.21 @@ -275,8 +275,8 @@
   91.22              //
   91.23              // Add Graphs
   91.24              Expression expr = forEach.getStartCounterValue();
   91.25 +            BpelEntityCasts castList = editorExtProcessor.getCastList(bpelEntity);
   91.26              if (expr != null) {
   91.27 -                BpelEntityCasts castList = editorExtProcessor.getCastList(expr);
   91.28                  addExpressionGraph(expr, newMapperModel, 
   91.29                          ForEachConditionsTreeModel.START_VALUE, 
   91.30                          forEach, castList);
   91.31 @@ -284,7 +284,6 @@
   91.32              //
   91.33              expr = forEach.getFinalCounterValue();
   91.34              if (expr != null) {
   91.35 -                BpelEntityCasts castList = editorExtProcessor.getCastList(expr);
   91.36                  addExpressionGraph(expr, newMapperModel, 
   91.37                          ForEachConditionsTreeModel.FINAL_VALUE, 
   91.38                          forEach, castList);
   91.39 @@ -294,7 +293,6 @@
   91.40              if (cc != null) {
   91.41                  expr = cc.getBranches();
   91.42                  if (expr != null) {
   91.43 -                    BpelEntityCasts castList = editorExtProcessor.getCastList(expr);
   91.44                      addExpressionGraph(expr, newMapperModel, 
   91.45                              ForEachConditionsTreeModel.COMPLETION_CONDITION, 
   91.46                              forEach, castList);
    92.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperUtils.java	Thu Apr 17 10:51:04 2008 +0200
    92.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/BpelMapperUtils.java	Thu Apr 17 15:50:14 2008 +0200
    92.3 @@ -1,15 +1,10 @@
    92.4 -/*
    92.5 - * To change this template, choose Tools | Templates
    92.6 - * and open the template in the editor.
    92.7 - */
    92.8 -
    92.9  package org.netbeans.modules.bpel.mapper.model;
   92.10  
   92.11  import java.util.ArrayList;
   92.12  import java.util.HashSet;
   92.13  import java.util.List;
   92.14  import javax.swing.tree.TreePath;
   92.15 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   92.16 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   92.17  import org.netbeans.modules.bpel.mapper.tree.MapperSwingTreeModel;
   92.18  import org.netbeans.modules.bpel.model.api.AbstractVariableDeclaration;
   92.19  import org.netbeans.modules.bpel.model.api.VariableDeclarationScope;
    93.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/ConnectionConstraint.java	Thu Apr 17 10:51:04 2008 +0200
    93.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/ConnectionConstraint.java	Thu Apr 17 15:50:14 2008 +0200
    93.3 @@ -88,15 +88,7 @@
    93.4              }
    93.5          }
    93.6          
    93.7 -        Boolean result = true;
    93.8 -        SourcePin oldSource = null;
    93.9 -        TargetPin oldTarget = null;
   93.10 -         if (oldLink != null) {
   93.11 -            oldSource = oldLink.getSource();
   93.12 -            oldTarget = oldLink.getTarget();
   93.13 -            oldLink.setSource(null);
   93.14 -            oldLink.setTarget(null);
   93.15 -        }
   93.16 +        boolean result = true;
   93.17         
   93.18          if (target instanceof Graph) {
   93.19              if (!rModel.isConnectable(treePath)) {
   93.20 @@ -105,10 +97,18 @@
   93.21              //
   93.22              if (((Graph) target).hasOutgoingLinks()) {
   93.23                  // The target tree node already has a connected link
   93.24 -                result = false;
   93.25 +                result =((Graph) target).getOutgoingLink() == oldLink ;
   93.26              }
   93.27         
   93.28          }
   93.29 +        SourcePin oldSource = null;
   93.30 +        TargetPin oldTarget = null;
   93.31 +         if (oldLink != null) {
   93.32 +            oldSource = oldLink.getSource();
   93.33 +            oldTarget = oldLink.getTarget();
   93.34 +            oldLink.setSource(null);
   93.35 +            oldLink.setTarget(null);
   93.36 +        }
   93.37          //
   93.38          if (source instanceof TreeSourcePin) {
   93.39              TreePath sourceTreePath = ((TreeSourcePin) source).getTreePath();
    94.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/EditorExtensionProcessor.java	Thu Apr 17 10:51:04 2008 +0200
    94.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/EditorExtensionProcessor.java	Thu Apr 17 15:50:14 2008 +0200
    94.3 @@ -198,5 +198,11 @@
    94.4          public List<Cast> getToCasts() {
    94.5              return mToCasts;
    94.6          }
    94.7 +        
    94.8 +        @Override
    94.9 +        public String toString() {
   94.10 +            return "From: " + mFromCasts + " To: " + mToCasts;
   94.11 +        }
   94.12 +        
   94.13      }
   94.14  }
    95.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/LocationPathBuilder.java	Thu Apr 17 10:51:04 2008 +0200
    95.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/LocationPathBuilder.java	Thu Apr 17 15:50:14 2008 +0200
    95.3 @@ -16,7 +16,6 @@
    95.4   * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    95.5   * Microsystems, Inc. All Rights Reserved.
    95.6   */
    95.7 -
    95.8  package org.netbeans.modules.bpel.mapper.model;
    95.9  
   95.10  import org.netbeans.modules.bpel.model.api.AbstractVariableDeclaration;
   95.11 @@ -28,7 +27,7 @@
   95.12  import org.netbeans.modules.xml.xpath.ext.XPathModel;
   95.13  import org.netbeans.modules.xml.xpath.ext.XPathSchemaContext;
   95.14  import org.netbeans.modules.xml.xpath.ext.spi.SimpleSchemaContext;
   95.15 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   95.16 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   95.17  import org.netbeans.modules.bpel.model.api.Query;
   95.18  import org.netbeans.modules.xml.xpath.ext.XPathException;
   95.19  import org.netbeans.modules.xml.xpath.ext.XPathExpression;
    96.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/customitems/WrapServiceRefHandler.java	Thu Apr 17 10:51:04 2008 +0200
    96.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/model/customitems/WrapServiceRefHandler.java	Thu Apr 17 15:50:14 2008 +0200
    96.3 @@ -22,7 +22,7 @@
    96.4  import java.util.ArrayList;
    96.5  import java.util.List;
    96.6  import javax.swing.Icon;
    96.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    96.8 +import org.netbeans.modules.soa.ui.SoaUtil;
    96.9  import org.netbeans.modules.bpel.mapper.model.ItemHandler;
   96.10  import org.netbeans.modules.bpel.mapper.model.VertexFactory;
   96.11  import org.netbeans.modules.bpel.mapper.multiview.BpelDesignContext;
   96.12 @@ -38,7 +38,6 @@
   96.13  import org.netbeans.modules.soa.mappercore.model.Link;
   96.14  import org.netbeans.modules.soa.mappercore.model.Vertex;
   96.15  import org.netbeans.modules.soa.mappercore.model.VertexItem;
   96.16 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   96.17  import org.netbeans.modules.soa.ui.nodes.InstanceRef;
   96.18  import org.netbeans.modules.xml.xpath.ext.metadata.ArgumentDescriptor;
   96.19  import org.netbeans.modules.xml.xpath.ext.metadata.XPathType;
   96.20 @@ -130,7 +129,6 @@
   96.21  ////        
   96.22  //////////        Mapper mapper = null;
   96.23  //////////        BpelDesignContext context = null;
   96.24 -//////////        TopComponent tc = SoaUiUtil.safeFindTopComponent(BpelMapperMultiviewElementDesc.PREFERED_ID);
   96.25  //////////        if ( tc instanceof BpelMapperMultiviewElement) {
   96.26  //////////            mapper = ((BpelMapperMultiviewElement)tc).getMapper();
   96.27  //////////            context = ((BpelMapperMultiviewElement)tc).
   96.28 @@ -149,7 +147,7 @@
   96.29          
   96.30          BpelModel bpelModel = getActiveModel();
   96.31          
   96.32 -        FileObject bpelFo = EditorUtil.getFileObjectByModel(bpelModel);
   96.33 +        FileObject bpelFo = SoaUtil.getFileObjectByModel(bpelModel);
   96.34          FileObject wrap2servicerefFo = null;
   96.35          if (bpelFo != null) {
   96.36              wrap2servicerefFo = bpelFo.getParent().getFileObject(WRAP2SERVICEREF_XSL);
    97.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/multiview/DesignContextControllerImpl2.java	Thu Apr 17 10:51:04 2008 +0200
    97.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/multiview/DesignContextControllerImpl2.java	Thu Apr 17 15:50:14 2008 +0200
    97.3 @@ -45,7 +45,7 @@
    97.4  import java.text.MessageFormat;
    97.5  import java.util.EventObject;
    97.6  import javax.swing.SwingUtilities;
    97.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
    97.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
    97.9  import org.netbeans.modules.bpel.mapper.model.BpelMapperModelFactory;
   97.10  import org.netbeans.modules.bpel.mapper.model.GraphExpandProcessor;
   97.11  import org.netbeans.modules.bpel.mapper.tree.spi.MapperTcContext;
    98.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
    98.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
    98.3 @@ -11,9 +11,9 @@
    98.4  # http://www.netbeans.org/cddl-gplv2.html
    98.5  # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    98.6  # specific language governing permissions and limitations under the
    98.7 -# License.  When distributing the software, include this License Header
    98.8 +# License. When distributing the software, include this License Header
    98.9  # Notice in each file and include the License file at
   98.10 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   98.11 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   98.12  # particular file as subject to the "Classpath" exception as provided
   98.13  # by Sun in the GPL Version 2 section of the License file that
   98.14  # accompanied this code. If applicable, add the following below the
    99.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Handler.java	Thu Apr 17 10:51:04 2008 +0200
    99.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Handler.java	Thu Apr 17 15:50:14 2008 +0200
    99.3 @@ -11,9 +11,9 @@
    99.4   * http://www.netbeans.org/cddl-gplv2.html
    99.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
    99.6   * specific language governing permissions and limitations under the
    99.7 - * License.  When distributing the software, include this License Header
    99.8 + * License. When distributing the software, include this License Header
    99.9   * Notice in each file and include the License file at
   99.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
   99.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
   99.12   * particular file as subject to the "Classpath" exception as provided
   99.13   * by Sun in the GPL Version 2 section of the License file that
   99.14   * accompanied this code. If applicable, add the following below the
   99.15 @@ -53,8 +53,8 @@
   99.16  import org.netbeans.modules.bpel.mapper.model.BpelMapperModel;
   99.17  import org.netbeans.modules.bpel.mapper.model.ItemHandler;
   99.18  import org.netbeans.modules.bpel.mapper.model.VertexFactory;
   99.19 -import org.netbeans.modules.soa.ui.util.DurationDialog;
   99.20 -import static org.netbeans.modules.soa.ui.util.UI.*;
   99.21 +import org.netbeans.modules.soa.validation.DurationDialog;
   99.22 +import static org.netbeans.modules.soa.ui.UI.*;
   99.23  
   99.24  /**
   99.25   * @author Vladimir Yaroslavskiy
   100.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Item.java	Thu Apr 17 10:51:04 2008 +0200
   100.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Item.java	Thu Apr 17 15:50:14 2008 +0200
   100.3 @@ -11,9 +11,9 @@
   100.4   * http://www.netbeans.org/cddl-gplv2.html
   100.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   100.6   * specific language governing permissions and limitations under the
   100.7 - * License.  When distributing the software, include this License Header
   100.8 + * License. When distributing the software, include this License Header
   100.9   * Notice in each file and include the License file at
  100.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  100.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  100.12   * particular file as subject to the "Classpath" exception as provided
  100.13   * by Sun in the GPL Version 2 section of the License file that
  100.14   * accompanied this code. If applicable, add the following below the
  100.15 @@ -56,7 +56,7 @@
  100.16  import org.netbeans.modules.bpel.mapper.model.BpelMapperModel;
  100.17  import org.netbeans.modules.bpel.mapper.model.ItemHandler;
  100.18  import org.netbeans.modules.soa.mappercore.model.GraphSubset;
  100.19 -import static org.netbeans.modules.soa.ui.util.UI.*;
  100.20 +import static org.netbeans.modules.soa.ui.UI.*;
  100.21  
  100.22  /**
  100.23   * @author Vladimir Yaroslavskiy
   101.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Palette.java	Thu Apr 17 10:51:04 2008 +0200
   101.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/palette/Palette.java	Thu Apr 17 15:50:14 2008 +0200
   101.3 @@ -11,9 +11,9 @@
   101.4   * http://www.netbeans.org/cddl-gplv2.html
   101.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   101.6   * specific language governing permissions and limitations under the
   101.7 - * License.  When distributing the software, include this License Header
   101.8 + * License. When distributing the software, include this License Header
   101.9   * Notice in each file and include the License file at
  101.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  101.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  101.12   * particular file as subject to the "Classpath" exception as provided
  101.13   * by Sun in the GPL Version 2 section of the License file that
  101.14   * accompanied this code. If applicable, add the following below the
  101.15 @@ -65,7 +65,7 @@
  101.16  import org.netbeans.modules.xml.xpath.ext.CoreFunctionType;
  101.17  import org.netbeans.modules.xml.xpath.ext.CoreOperationType;
  101.18  import org.netbeans.modules.bpel.model.api.support.BpelXPathExtFunctionMetadata;
  101.19 -import static org.netbeans.modules.soa.ui.util.UI.*;
  101.20 +import static org.netbeans.modules.soa.ui.UI.*;
  101.21  
  101.22  /**
  101.23   * @author Vladimir Yaroslavskiy
  101.24 @@ -78,10 +78,6 @@
  101.25      myIsCollapsed = true;
  101.26    }
  101.27  
  101.28 -//  public JPanel getPanel() {
  101.29 -//    return getPanel(true);
  101.30 -//  }
  101.31 -  
  101.32    public JPanel getPanel() {
  101.33      JPanel panel = new JPanel(new GridBagLayout());
  101.34      GridBagConstraints c = new GridBagConstraints();
  101.35 @@ -92,24 +88,6 @@
  101.36      c.fill = GridBagConstraints.BOTH;
  101.37      panel.add(createMenuBar(), c);
  101.38  
  101.39 -//    if (hasLeftButton) {
  101.40 -//      // vlv: print
  101.41 -//      JButton button = createPrintPreviewButton();
  101.42 -//
  101.43 -//      if (button != null) {
  101.44 -//        c.weightx = 0.0;
  101.45 -//        c.anchor = GridBagConstraints.EAST;
  101.46 -//        c.fill = GridBagConstraints.NONE;
  101.47 -//        c.insets = new Insets(0, 0, 0, TINY_INSET);
  101.48 -//        panel.add(button, c);
  101.49 -//      }
  101.50 -//      // vlv: expand / collapse
  101.51 -//      c.weightx = 0.0;
  101.52 -//      c.anchor = GridBagConstraints.EAST;
  101.53 -//      c.fill = GridBagConstraints.NONE;
  101.54 -//      c.insets = new Insets(0, 0, 0, 0);
  101.55 -//      panel.add(createCollapseExpandAllButton(), c);
  101.56 -//    }
  101.57      panel.setBorder(new Border());
  101.58      panel.setOpaque(true);
  101.59      panel.addMouseMotionListener(new MouseMotionAdapter() {});
   102.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/predicates/editor/PredicateEditor.java	Thu Apr 17 10:51:04 2008 +0200
   102.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/predicates/editor/PredicateEditor.java	Thu Apr 17 15:50:14 2008 +0200
   102.3 @@ -16,7 +16,6 @@
   102.4   * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   102.5   * Microsystems, Inc. All Rights Reserved.
   102.6   */
   102.7 -
   102.8  package org.netbeans.modules.bpel.mapper.predicates.editor;
   102.9  
  102.10  import java.awt.Dialog;
  102.11 @@ -43,7 +42,7 @@
  102.12  import org.netbeans.modules.soa.mappercore.model.Graph;
  102.13  import org.netbeans.modules.soa.mappercore.model.MapperModel;
  102.14  import org.netbeans.modules.soa.mappercore.model.Vertex;
  102.15 -import org.netbeans.modules.soa.ui.SoaUiUtil;
  102.16 +import org.netbeans.modules.soa.ui.SoaUtil;
  102.17  import org.netbeans.modules.soa.ui.form.EditorLifeCycleAdapter;
  102.18  import org.netbeans.modules.soa.ui.form.valid.DefaultDialogDescriptor;
  102.19  import org.netbeans.modules.soa.ui.form.valid.DefaultValidStateManager;
  102.20 @@ -101,7 +100,7 @@
  102.21                  }
  102.22              }
  102.23          });
  102.24 -        SoaUiUtil.activateInlineMnemonics(this);
  102.25 +        SoaUtil.activateInlineMnemonics(this);
  102.26      }
  102.27  
  102.28      @Override
  102.29 @@ -130,7 +129,7 @@
  102.30          DefaultDialogDescriptor descriptor = 
  102.31                  new DefaultDialogDescriptor(editor, editor.getDlgTitle());
  102.32          Dialog dialog = SoaDialogDisplayer.getDefault().createDialog(descriptor);
  102.33 -        SoaUiUtil.setInitialFocusComponentFor(editor);
  102.34 +        SoaUtil.setInitialFocusComponentFor(editor);
  102.35          dialog.setVisible(true);
  102.36  
  102.37          return descriptor.isOkHasPressed();
   103.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java	Thu Apr 17 10:51:04 2008 +0200
   103.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/SimpleTreeInfoProvider.java	Thu Apr 17 15:50:14 2008 +0200
   103.3 @@ -16,7 +16,6 @@
   103.4   * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
   103.5   * Microsystems, Inc. All Rights Reserved.
   103.6   */
   103.7 -
   103.8  package org.netbeans.modules.bpel.mapper.tree.models;
   103.9  
  103.10  import java.util.List;
  103.11 @@ -25,7 +24,7 @@
  103.12  import javax.swing.tree.TreePath;
  103.13  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
  103.14  import org.netbeans.modules.bpel.mapper.tree.spi.TreeItemInfoProvider;
  103.15 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
  103.16 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
  103.17  import org.netbeans.modules.bpel.model.api.BpelEntity;
  103.18  import org.netbeans.modules.bpel.mapper.tree.images.NodeIcons;
  103.19  import org.netbeans.modules.bpel.mapper.tree.spi.MapperTcContext;
   104.1 --- a/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/VariableTreeInfoProvider.java	Thu Apr 17 10:51:04 2008 +0200
   104.2 +++ b/bpel.mapper/src/org/netbeans/modules/bpel/mapper/tree/models/VariableTreeInfoProvider.java	Thu Apr 17 15:50:14 2008 +0200
   104.3 @@ -31,7 +31,7 @@
   104.4  import org.netbeans.modules.bpel.editors.api.nodes.NodeType;
   104.5  import org.netbeans.modules.bpel.mapper.tree.spi.TreeItemInfoProvider;
   104.6  import org.netbeans.modules.xml.xam.Named;
   104.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   104.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   104.9  import org.netbeans.modules.bpel.mapper.multiview.BpelDesignContext;
  104.10  import org.netbeans.modules.bpel.mapper.predicates.AbstractPredicate;
  104.11  import org.netbeans.modules.bpel.mapper.cast.AbstractTypeCast;
   105.1 --- a/bpel.model/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   105.2 +++ b/bpel.model/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   105.3 @@ -50,6 +50,15 @@
   105.4                      </run-dependency>
   105.5                  </dependency>
   105.6                  <dependency>
   105.7 +                    <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
   105.8 +                    <build-prerequisite/>
   105.9 +                    <compile-dependency/>
  105.10 +                    <run-dependency>
  105.11 +                        <release-version>1</release-version>
  105.12 +                        <specification-version>1.1</specification-version>
  105.13 +                    </run-dependency>
  105.14 +                </dependency>
  105.15 +                <dependency>
  105.16                      <code-name-base>org.netbeans.modules.xml.schema.model</code-name-base>
  105.17                      <build-prerequisite/>
  105.18                      <compile-dependency/>
   106.1 --- a/bpel.model/src/org/netbeans/modules/bpel/model/api/support/Utils.java	Thu Apr 17 10:51:04 2008 +0200
   106.2 +++ b/bpel.model/src/org/netbeans/modules/bpel/model/api/support/Utils.java	Thu Apr 17 15:50:14 2008 +0200
   106.3 @@ -139,6 +139,7 @@
   106.4  import org.openide.util.NbBundle;
   106.5  import org.netbeans.modules.xml.xpath.ext.spi.validation.XPathValidationContext;
   106.6  import org.netbeans.modules.xml.xam.Model.State;
   106.7 +import org.netbeans.modules.soa.ui.SoaUtil;
   106.8  
   106.9  public final class Utils {
  106.10  
  106.11 @@ -677,23 +678,8 @@
  106.12          }
  106.13      }
  106.14  
  106.15 -    public static FileObject getFileObjectByModel(Model model) {
  106.16 -        if (model != null){
  106.17 -
  106.18 -            ModelSource src = model.getModelSource();
  106.19 -            if (src != null){
  106.20 -
  106.21 -                Lookup lookup = src.getLookup();
  106.22 -                if (lookup != null){
  106.23 -                    return lookup.lookup(FileObject.class);
  106.24 -                }
  106.25 -            }
  106.26 -        }
  106.27 -        return null;
  106.28 -    }
  106.29 -
  106.30      public static Project safeGetProject(BpelModel bpelModel) {
  106.31 -        FileObject fo = getFileObjectByModel(bpelModel);
  106.32 +        FileObject fo = SoaUtil.getFileObjectByModel(bpelModel);
  106.33          if (fo != null && fo.isValid()) {
  106.34              return FileOwnerQuery.getOwner(fo);
  106.35          } else {
  106.36 @@ -714,7 +700,6 @@
  106.37          return sModel;
  106.38      }
  106.39      
  106.40 -    
  106.41      private static ActivityBuilder getActivityBuilder( String tagName ){
  106.42          return ActivityCreatorHolder.ACTIVITY_BUILDERS.get( tagName );
  106.43      }
   107.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/cli/CliValidateBpelProjectDelegate.java	Thu Apr 17 10:51:04 2008 +0200
   107.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/cli/CliValidateBpelProjectDelegate.java	Thu Apr 17 15:50:14 2008 +0200
   107.3 @@ -41,9 +41,9 @@
   107.4  package org.netbeans.modules.bpel.project.anttasks.cli;
   107.5  
   107.6  import java.io.File;
   107.7 -import java.util.Collection;
   107.8  import java.util.HashMap;
   107.9  import java.util.Iterator;
  107.10 +import java.util.List;
  107.11  import java.util.Map;
  107.12  import org.apache.tools.ant.BuildException;
  107.13  import org.apache.tools.ant.Task;
  107.14 @@ -53,8 +53,6 @@
  107.15  import org.netbeans.modules.bpel.project.anttasks.util.Util;
  107.16  import org.netbeans.modules.xml.xam.Component;
  107.17  import org.netbeans.modules.xml.xam.Model;
  107.18 -import org.netbeans.modules.xml.xam.spi.Validation;
  107.19 -import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
  107.20  import org.netbeans.modules.xml.xam.spi.Validator;
  107.21  import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  107.22  
  107.23 @@ -196,38 +194,31 @@
  107.24      }
  107.25      
  107.26      private void validate(File bpelFile) throws BuildException {
  107.27 -        try {
  107.28 -            BpelModel model = CliBpelCatalogModel.
  107.29 -                    getDefault().getBPELModel(bpelFile.toURI());
  107.30 -                    
  107.31 -            Validation validation = new Validation();
  107.32 -            validation.validate((Model) model, ValidationType.COMPLETE);
  107.33 -            Collection col = validation.getValidationResult();
  107.34 -            boolean isError = false;
  107.35 -            
  107.36 -            for (Iterator itr = col.iterator(); itr.hasNext();) {
  107.37 -                ResultItem resultItem = (ResultItem) itr.next();
  107.38 -                
  107.39 -                if (!mAllowBuildWithError) {
  107.40 -                    if (resultItem.getType() == Validator.ResultType.ERROR) {
  107.41 -                        System.out.println(getValidationError(resultItem));
  107.42 -                        System.out.println();
  107.43 -                    }
  107.44 -                }
  107.45 -                
  107.46 -                if (resultItem.getType() == Validator.ResultType.ERROR) {
  107.47 -                    isError = true;
  107.48 +      try {
  107.49 +        BpelModel model = CliBpelCatalogModel.getDefault().getBPELModel(bpelFile.toURI());
  107.50 +        List<ResultItem> result = Util.validate(model);
  107.51 +        boolean isError = false;
  107.52 +          
  107.53 +        for (ResultItem item : result) {
  107.54 +            if ( !mAllowBuildWithError) {
  107.55 +                if (item.getType() == Validator.ResultType.ERROR) {
  107.56 +                    System.out.println(getValidationError(item));
  107.57 +                    System.out.println();
  107.58                  }
  107.59              }
  107.60 -
  107.61 -            if (isError) {
  107.62 -                this.isFoundErrors = true;
  107.63 -            }
  107.64 -        } catch (Throwable e) {
  107.65 -            if (!mAllowBuildWithError) {
  107.66 -                throw new BuildException(e);
  107.67 +            if (item.getType() == Validator.ResultType.ERROR) {
  107.68 +                isError = true;
  107.69              }
  107.70          }
  107.71 +        if (isError) {
  107.72 +            this.isFoundErrors = true;
  107.73 +        }
  107.74 +      }
  107.75 +      catch (Throwable e) {
  107.76 +          if ( !mAllowBuildWithError) {
  107.77 +              throw new BuildException(e);
  107.78 +          }
  107.79 +      }
  107.80      }
  107.81      
  107.82      private String getValidationError(ResultItem resultItem) {
   108.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ide/IdeValidateBpelProjectTask.java	Thu Apr 17 10:51:04 2008 +0200
   108.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/ide/IdeValidateBpelProjectTask.java	Thu Apr 17 15:50:14 2008 +0200
   108.3 @@ -45,12 +45,12 @@
   108.4  import java.io.StringWriter;
   108.5  import java.util.ArrayList;
   108.6  import java.util.Arrays;
   108.7 -import java.util.Collection;
   108.8  import java.util.HashMap;
   108.9  import java.util.Iterator;
  108.10  import java.util.List;
  108.11  import java.util.Map;
  108.12  import java.util.logging.Logger;
  108.13 +
  108.14  import org.apache.tools.ant.BuildException;
  108.15  import org.apache.tools.ant.Task;
  108.16  import org.apache.tools.ant.types.Reference;
  108.17 @@ -59,8 +59,6 @@
  108.18  import org.netbeans.modules.bpel.project.CommandlineBpelProjectXmlCatalogProvider;
  108.19  import org.netbeans.modules.bpel.project.anttasks.util.Util;
  108.20  import org.netbeans.modules.xml.xam.Component;
  108.21 -import org.netbeans.modules.xml.xam.spi.Validation;
  108.22 -import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
  108.23  import org.netbeans.modules.xml.xam.spi.Validator;
  108.24  import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  108.25  import org.openide.filesystems.FileObject;
  108.26 @@ -161,10 +159,10 @@
  108.27      }
  108.28  
  108.29      private void processSourceDirs(List sourceDirs) {
  108.30 -        Iterator it = sourceDirs.iterator();
  108.31 +        Iterator iterator = sourceDirs.iterator();
  108.32  
  108.33 -        while (it.hasNext()) {
  108.34 -            File sourceDir = (File) it.next();
  108.35 +        while (iterator.hasNext()) {
  108.36 +            File sourceDir = (File) iterator.next();
  108.37              processSourceDir(sourceDir);
  108.38          }
  108.39      }
  108.40 @@ -245,21 +243,18 @@
  108.41  
  108.42          try {
  108.43              model = IdeBpelCatalogModel.getDefault().getBPELModel(bpel);
  108.44 -        } catch (Exception e) {
  108.45 +        }
  108.46 +        catch (Exception e) {
  108.47              throw new RuntimeException("Error while trying to create BPEL Model", e);
  108.48          }
  108.49 -        Validation validation = new Validation();
  108.50 -        validation.validate((org.netbeans.modules.xml.xam.Model) model, ValidationType.COMPLETE);
  108.51 -        Collection col = validation.getValidationResult();
  108.52 +        List<ResultItem> result = Util.validate(model);
  108.53          boolean isError = false;
  108.54  
  108.55 -        for (Iterator itr = col.iterator(); itr.hasNext();) {
  108.56 -            ResultItem resultItem = (ResultItem) itr.next();
  108.57 -
  108.58 -            System.err.println(getValidationError(bpel, resultItem));
  108.59 +        for (ResultItem item : result) {
  108.60 +            System.err.println(getValidationError(bpel, item));
  108.61              System.err.println();
  108.62  
  108.63 -            if (resultItem.getType() == Validator.ResultType.ERROR) {
  108.64 +            if (item.getType() == Validator.ResultType.ERROR) {
  108.65                  isError = true;
  108.66              }
  108.67          }
   109.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/util/Util.java	Thu Apr 17 10:51:04 2008 +0200
   109.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/util/Util.java	Thu Apr 17 15:50:14 2008 +0200
   109.3 @@ -47,12 +47,19 @@
   109.4  import java.io.IOException;
   109.5  import java.util.ArrayList;
   109.6  import java.util.List;
   109.7 +
   109.8  import javax.swing.text.AbstractDocument;
   109.9  import javax.swing.text.BadLocationException;
  109.10 +
  109.11  import org.netbeans.modules.xml.xam.Component;
  109.12 +import org.netbeans.modules.xml.xam.Model;
  109.13  import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
  109.14  import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
  109.15  import org.netbeans.modules.xml.xam.dom.DocumentComponent;
  109.16 +import org.netbeans.modules.xml.xam.spi.Validation;
  109.17 +import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
  109.18 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  109.19 +
  109.20  import org.w3c.dom.Element;
  109.21  import org.w3c.dom.Node;
  109.22  import org.w3c.dom.NodeList;
  109.23 @@ -64,6 +71,12 @@
  109.24      public static final String BPEL_FILE_EXTENSION = "bpel"; // NOI18N
  109.25      public static final String FOUND_VALIDATION_ERRORS = "Found validation error(s)."; // NOI18N
  109.26              
  109.27 +    public static List<ResultItem> validate(Model model) {
  109.28 +      Validation validation = new Validation();
  109.29 +      validation.validate(model, ValidationType.COMPLETE);
  109.30 +      return validation.getValidationResult();
  109.31 +    }
  109.32 +
  109.33      public static String getError(File file, int column, int line, String description, String type) {
  109.34          StringBuffer buffer = new StringBuffer();
  109.35  
  109.36 @@ -335,25 +348,19 @@
  109.37  
  109.38          public boolean accept(File pathname) {
  109.39              boolean result = false;
  109.40 -
  109.41              String fileName = pathname.getName();
  109.42              String fileExtension = null;
  109.43              int dotIndex = fileName.lastIndexOf('.');
  109.44 +
  109.45              if (dotIndex != -1) {
  109.46                  fileExtension = fileName.substring(dotIndex + 1);
  109.47              }
  109.48 -
  109.49              if (fileExtension != null && (fileExtension.equalsIgnoreCase(WSDL_FILE_EXTENSION))) {
  109.50                  result = true;
  109.51              }
  109.52 -
  109.53              return result;
  109.54          }
  109.55      }
  109.56      
  109.57 -    ////////////////////////////////////////////////////////////////////////////
  109.58 -    // Instance
  109.59 -    private Util() {
  109.60 -        // Does nothing
  109.61 -    }
  109.62 +    private Util() {}
  109.63  }
   110.1 --- a/bpel.project/src/org/netbeans/modules/bpel/project/resources/build-impl.xsl	Thu Apr 17 10:51:04 2008 +0200
   110.2 +++ b/bpel.project/src/org/netbeans/modules/bpel/project/resources/build-impl.xsl	Thu Apr 17 15:50:14 2008 +0200
   110.3 @@ -119,7 +119,7 @@
   110.4                <pathelement location="${{netbeans.home}}/../platform8/modules/org-openide-loaders.jar"/>
   110.5                <pathelement location="${{netbeans.home}}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   110.6                <pathelement location="${{netbeans.home}}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   110.7 -              <pathelement location="${{netbeans.home}}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   110.8 +              <pathelement location="${{netbeans.home}}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   110.9                <pathelement location="${{netbeans.home}}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  110.10                <pathelement location="${{netbeans.home}}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  110.11                <pathelement location="${{netbeans.home}}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   111.1 --- a/bpel.refactoring/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   111.2 +++ b/bpel.refactoring/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   111.3 @@ -63,7 +63,7 @@
   111.4                      </run-dependency>
   111.5                  </dependency>
   111.6                  <dependency>
   111.7 -                    <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
   111.8 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
   111.9                      <build-prerequisite/>
  111.10                      <compile-dependency/>
  111.11                      <run-dependency>
   112.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/BpelVisitor.java	Thu Apr 17 10:51:04 2008 +0200
   112.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/BpelVisitor.java	Thu Apr 17 15:50:14 2008 +0200
   112.3 @@ -82,7 +82,7 @@
   112.4  import org.netbeans.modules.xml.xam.Named;
   112.5  import org.netbeans.modules.xml.xam.Referenceable;
   112.6  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.CorrelationProperty;
   112.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   112.8 +import static org.netbeans.modules.soa.ui.UI.*;
   112.9  
  112.10  /**
  112.11   * @author Vladimir Yaroslavskiy
   113.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Deleter.java	Thu Apr 17 10:51:04 2008 +0200
   113.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Deleter.java	Thu Apr 17 15:50:14 2008 +0200
   113.3 @@ -62,7 +62,7 @@
   113.4  import org.netbeans.modules.xml.wsdl.model.Part;
   113.5  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.CorrelationProperty;
   113.6  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PropertyAlias;
   113.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   113.8 +import static org.netbeans.modules.soa.ui.UI.*;
   113.9  
  113.10  /**
  113.11   * @author Vladimir Yaroslavskiy
   114.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Element.java	Thu Apr 17 10:51:04 2008 +0200
   114.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Element.java	Thu Apr 17 15:50:14 2008 +0200
   114.3 @@ -64,7 +64,7 @@
   114.4  import org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction;
   114.5  import org.netbeans.modules.xml.refactoring.spi.SharedUtils;
   114.6  
   114.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   114.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   114.9  
  114.10  /**
  114.11   * @author Vladimir Yaroslavskiy
   115.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Mover.java	Thu Apr 17 10:51:04 2008 +0200
   115.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Mover.java	Thu Apr 17 15:50:14 2008 +0200
   115.3 @@ -69,7 +69,7 @@
   115.4  
   115.5  import org.netbeans.modules.bpel.model.api.Import;
   115.6  import org.netbeans.modules.bpel.model.api.events.VetoException;
   115.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   115.8 +import static org.netbeans.modules.soa.ui.UI.*;
   115.9  
  115.10  /**
  115.11   * @author Vladimir Yaroslavskiy
   116.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Plugin.java	Thu Apr 17 10:51:04 2008 +0200
   116.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Plugin.java	Thu Apr 17 15:50:14 2008 +0200
   116.3 @@ -73,8 +73,8 @@
   116.4  import org.netbeans.modules.bpel.model.spi.BpelModelFactory;
   116.5  import org.netbeans.modules.bpel.model.api.Import;
   116.6  import org.netbeans.modules.bpel.model.api.Process;
   116.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   116.8 -import static org.netbeans.modules.soa.ui.util.UI.*;
   116.9 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
  116.10 +import static org.netbeans.modules.soa.ui.UI.*;
  116.11  
  116.12  /**
  116.13   * @author Vladimir Yaroslavskiy
   117.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Renamer.java	Thu Apr 17 10:51:04 2008 +0200
   117.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Renamer.java	Thu Apr 17 15:50:14 2008 +0200
   117.3 @@ -102,7 +102,7 @@
   117.4  import org.netbeans.modules.bpel.model.api.events.VetoException;
   117.5  import org.netbeans.modules.bpel.model.api.references.ReferenceCollection;
   117.6  import org.netbeans.modules.bpel.model.api.references.WSDLReference;
   117.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   117.8 +import static org.netbeans.modules.soa.ui.UI.*;
   117.9  
  117.10  /**
  117.11   * @author Vladimir Yaroslavskiy
   118.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Util.java	Thu Apr 17 10:51:04 2008 +0200
   118.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Util.java	Thu Apr 17 15:50:14 2008 +0200
   118.3 @@ -56,7 +56,7 @@
   118.4  
   118.5  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
   118.6  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Query;
   118.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   118.8 +import static org.netbeans.modules.soa.ui.UI.*;
   118.9  
  118.10  /**
  118.11   * @author Vladimir Yaroslavskiy
   119.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/WsdlVisitor.java	Thu Apr 17 10:51:04 2008 +0200
   119.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/WsdlVisitor.java	Thu Apr 17 15:50:14 2008 +0200
   119.3 @@ -55,7 +55,7 @@
   119.4  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PropertyAlias;
   119.5  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Query;
   119.6  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Role;
   119.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   119.8 +import static org.netbeans.modules.soa.ui.UI.*;
   119.9  
  119.10  /**
  119.11   * @author Vladimir Yaroslavskiy
   120.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java	Thu Apr 17 10:51:04 2008 +0200
   120.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java	Thu Apr 17 15:50:14 2008 +0200
   120.3 @@ -87,7 +87,7 @@
   120.4  import org.netbeans.modules.xml.xpath.XPathPredicateExpression;
   120.5  import org.netbeans.modules.xml.xpath.XPathVariableReference;
   120.6  import org.netbeans.modules.xml.xpath.visitor.AbstractXPathVisitor;
   120.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   120.8 +import static org.netbeans.modules.soa.ui.UI.*;
   120.9  
  120.10  /**
  120.11   * @author Vladimir Yaroslavskiy
   121.1 --- a/bpel.samples/resources/AsynchronousSample/AsynchronousSample/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   121.2 +++ b/bpel.samples/resources/AsynchronousSample/AsynchronousSample/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   121.3 @@ -62,7 +62,7 @@
   121.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   121.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   121.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   121.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   121.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   121.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  121.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  121.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   122.1 --- a/bpel.samples/resources/AsynchronousSample/AsynchronousSample/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   122.2 +++ b/bpel.samples/resources/AsynchronousSample/AsynchronousSample/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   122.3 @@ -1,5 +1,5 @@
   122.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   122.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   122.6  nbproject/build-impl.xml.data.CRC32=c18cd8a8
   122.7 -nbproject/build-impl.xml.script.CRC32=496a482d
   122.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   122.9 +nbproject/build-impl.xml.script.CRC32=60cc98d7
  122.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   123.1 --- a/bpel.samples/resources/BluePrint1/BluePrint1/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   123.2 +++ b/bpel.samples/resources/BluePrint1/BluePrint1/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   123.3 @@ -62,7 +62,7 @@
   123.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   123.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   123.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   123.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   123.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   123.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  123.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  123.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   124.1 --- a/bpel.samples/resources/BluePrint1/BluePrint1/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   124.2 +++ b/bpel.samples/resources/BluePrint1/BluePrint1/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   124.3 @@ -1,5 +1,5 @@
   124.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   124.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   124.6  nbproject/build-impl.xml.data.CRC32=61cdaf60
   124.7 -nbproject/build-impl.xml.script.CRC32=ab1eaec2
   124.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   124.9 +nbproject/build-impl.xml.script.CRC32=98ebe75f
  124.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   125.1 --- a/bpel.samples/resources/BluePrint2/BluePrint2/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   125.2 +++ b/bpel.samples/resources/BluePrint2/BluePrint2/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   125.3 @@ -62,7 +62,7 @@
   125.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   125.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   125.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   125.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   125.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   125.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  125.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  125.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   126.1 --- a/bpel.samples/resources/BluePrint2/BluePrint2/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   126.2 +++ b/bpel.samples/resources/BluePrint2/BluePrint2/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   126.3 @@ -1,5 +1,5 @@
   126.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   126.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   126.6  nbproject/build-impl.xml.data.CRC32=63650458
   126.7 -nbproject/build-impl.xml.script.CRC32=0bd483b3
   126.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   126.9 +nbproject/build-impl.xml.script.CRC32=962f8c49
  126.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   127.1 --- a/bpel.samples/resources/BluePrint3/BluePrint3/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   127.2 +++ b/bpel.samples/resources/BluePrint3/BluePrint3/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   127.3 @@ -62,7 +62,7 @@
   127.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   127.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   127.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   127.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   127.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   127.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  127.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  127.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   128.1 --- a/bpel.samples/resources/BluePrint3/BluePrint3/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   128.2 +++ b/bpel.samples/resources/BluePrint3/BluePrint3/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   128.3 @@ -1,5 +1,5 @@
   128.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   128.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   128.6  nbproject/build-impl.xml.data.CRC32=62fd62b0
   128.7 -nbproject/build-impl.xml.script.CRC32=6b92989c
   128.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   128.9 +nbproject/build-impl.xml.script.CRC32=9393aabb
  128.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   129.1 --- a/bpel.samples/resources/BluePrint4/BluePrint4/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   129.2 +++ b/bpel.samples/resources/BluePrint4/BluePrint4/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   129.3 @@ -62,7 +62,7 @@
   129.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   129.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   129.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   129.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   129.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   129.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  129.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  129.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   130.1 --- a/bpel.samples/resources/BluePrint4/BluePrint4/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   130.2 +++ b/bpel.samples/resources/BluePrint4/BluePrint4/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   130.3 @@ -1,5 +1,5 @@
   130.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   130.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   130.6  nbproject/build-impl.xml.data.CRC32=66345228
   130.7 -nbproject/build-impl.xml.script.CRC32=9131df10
   130.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   130.9 +nbproject/build-impl.xml.script.CRC32=8ba75a65
  130.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   131.1 --- a/bpel.samples/resources/BluePrint5/BluePrint5/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   131.2 +++ b/bpel.samples/resources/BluePrint5/BluePrint5/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   131.3 @@ -62,7 +62,7 @@
   131.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   131.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   131.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   131.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   131.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   131.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  131.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  131.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   132.1 --- a/bpel.samples/resources/BluePrint5/BluePrint5/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   132.2 +++ b/bpel.samples/resources/BluePrint5/BluePrint5/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   132.3 @@ -1,5 +1,5 @@
   132.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   132.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   132.6  nbproject/build-impl.xml.data.CRC32=67ac34c0
   132.7 -nbproject/build-impl.xml.script.CRC32=f177c43f
   132.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   132.9 +nbproject/build-impl.xml.script.CRC32=8e1b7c97
  132.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   133.1 --- a/bpel.samples/resources/SynchronousSample/SynchronousSample/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   133.2 +++ b/bpel.samples/resources/SynchronousSample/SynchronousSample/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   133.3 @@ -62,7 +62,7 @@
   133.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   133.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   133.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   133.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   133.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   133.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  133.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  133.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   134.1 --- a/bpel.samples/resources/SynchronousSample/SynchronousSample/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   134.2 +++ b/bpel.samples/resources/SynchronousSample/SynchronousSample/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   134.3 @@ -1,5 +1,5 @@
   134.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   134.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   134.6  nbproject/build-impl.xml.data.CRC32=f97c1861
   134.7 -nbproject/build-impl.xml.script.CRC32=a3ca7604
   134.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   134.9 +nbproject/build-impl.xml.script.CRC32=05d1f135
  134.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   135.1 --- a/bpel.samples/resources/TravelReservationService/TravelReservationService/nbproject/build-impl.xml	Thu Apr 17 10:51:04 2008 +0200
   135.2 +++ b/bpel.samples/resources/TravelReservationService/TravelReservationService/nbproject/build-impl.xml	Thu Apr 17 15:50:14 2008 +0200
   135.3 @@ -62,7 +62,7 @@
   135.4              <pathelement location="${netbeans.home}/../platform8/modules/org-openide-loaders.jar"/>
   135.5              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-masterfs.jar"/>
   135.6              <pathelement location="${netbeans.home}/../platform8/modules/org-netbeans-modules-queries.jar"/>
   135.7 -            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-ui.jar"/>
   135.8 +            <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-soa-validation.jar"/>
   135.9              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-model.jar"/>
  135.10              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-project.jar"/>
  135.11              <pathelement location="${netbeans.home}/../soa2/modules/org-netbeans-modules-bpel-validation.jar"/>
   136.1 --- a/bpel.samples/resources/TravelReservationService/TravelReservationService/nbproject/genfiles.properties	Thu Apr 17 10:51:04 2008 +0200
   136.2 +++ b/bpel.samples/resources/TravelReservationService/TravelReservationService/nbproject/genfiles.properties	Thu Apr 17 15:50:14 2008 +0200
   136.3 @@ -1,5 +1,5 @@
   136.4  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
   136.5  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
   136.6  nbproject/build-impl.xml.data.CRC32=3e7e695c
   136.7 -nbproject/build-impl.xml.script.CRC32=88dd625a
   136.8 -nbproject/build-impl.xml.stylesheet.CRC32=e6b389cb
   136.9 +nbproject/build-impl.xml.script.CRC32=7e2e842a
  136.10 +nbproject/build-impl.xml.stylesheet.CRC32=7616f252
   137.1 --- a/bpel.search/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   137.2 +++ b/bpel.search/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   137.3 @@ -186,7 +186,7 @@
   137.4                      </run-dependency>
   137.5                  </dependency>
   137.6                  <dependency>
   137.7 -                    <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
   137.8 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
   137.9                      <build-prerequisite/>
  137.10                      <compile-dependency/>
  137.11                      <run-dependency>
   138.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/api/SearchPattern.java	Thu Apr 17 10:51:04 2008 +0200
   138.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/api/SearchPattern.java	Thu Apr 17 15:50:14 2008 +0200
   138.3 @@ -40,7 +40,7 @@
   138.4   */
   138.5  package org.netbeans.modules.bpel.search.api;
   138.6  
   138.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   138.8 +import static org.netbeans.modules.soa.ui.UI.*;
   138.9  
  138.10  /**
  138.11   * @author Vladimir Yaroslavskiy
   139.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/api/SearchTarget.java	Thu Apr 17 10:51:04 2008 +0200
   139.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/api/SearchTarget.java	Thu Apr 17 15:50:14 2008 +0200
   139.3 @@ -41,6 +41,7 @@
   139.4  package org.netbeans.modules.bpel.search.api;
   139.5  
   139.6  import org.netbeans.modules.xml.xam.Component;
   139.7 +import static org.netbeans.modules.soa.ui.UI.*;
   139.8  
   139.9  /**
  139.10   * @author Vladimir Yaroslavskiy
  139.11 @@ -53,4 +54,38 @@
  139.12     * @return the class of target
  139.13     */
  139.14    Class<? extends Component> getClazz();
  139.15 +
  139.16 +
  139.17 +  // -------------------------------------------
  139.18 +  public class Adapter implements SearchTarget {
  139.19 +
  139.20 +    public Adapter(Class bundle, Class<? extends Component> clazz) {
  139.21 +      myClazz = clazz;
  139.22 +      myBundle = bundle;
  139.23 +    }
  139.24 +
  139.25 +    public Class<? extends Component> getClazz() {
  139.26 +      return myClazz;
  139.27 +    }
  139.28 +
  139.29 +    @Override
  139.30 +    public String toString()
  139.31 +    {
  139.32 +      return i18n(myBundle, name());
  139.33 +    }
  139.34 +
  139.35 +    private String name() {
  139.36 +      String name = myClazz.getName();
  139.37 +
  139.38 +      int k = name.lastIndexOf("."); // NOI18N
  139.39 +
  139.40 +      if (k == -1) {
  139.41 +        return name;
  139.42 +      }
  139.43 +      return name.substring(k + 1);
  139.44 +    }
  139.45 +
  139.46 +    private Class myBundle;
  139.47 +    private Class<? extends Component> myClazz;
  139.48 +  }
  139.49  }
   140.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   140.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   140.3 @@ -41,72 +41,6 @@
   140.4  # SearchAction
   140.5  TLT_Search_Action=Advanced Search - Ctrl+Alt+Shift+F
   140.6  
   140.7 -# Target.BPEL
   140.8 -BpelEntity=Any BPEL Entity
   140.9 -Assign=Assign
  140.10 -Branches=Branches
  140.11 -Catch=Catch
  140.12 -CatchAll=Catch All
  140.13 -Compensate=Compensate
  140.14 -CompensationHandler=Compensation Handler
  140.15 -Condition=Condition
  140.16 -Copy=Copy
  140.17 -Correlation=Correlation
  140.18 -CorrelationContainer=Correlation Container
  140.19 -CorrelationSet=Correlation Set
  140.20 -CorrelationSetContainer=Correlation Set Container
  140.21 -DeadlineExpression=Deadline Expression
  140.22 -Documentation=Documentation
  140.23 -DurationExpression=DurationExpression
  140.24 -Else=Else
  140.25 -ElseIf=Else If
  140.26 -Empty=Empty
  140.27 -EventHandlers=Event Handlers
  140.28 -Exit=Exit
  140.29 -FaultHandlers=Fault Handlers
  140.30 -Flow=Flow
  140.31 -For=For
  140.32 -ForEach=For Each
  140.33 -From=From
  140.34 -FromPart=FromPart
  140.35 -If=If
  140.36 -Import=Import
  140.37 -Invoke=Invoke
  140.38 -Link=Link
  140.39 -LinkContainer=Link Container
  140.40 -Literal=Literal
  140.41 -MessageExchange=Message Exchange
  140.42 -MessageExchangeContainer=Message Exchange Container
  140.43 -OnAlarmEvent=On Alarm Event
  140.44 -OnAlarmPick=On Alarm Pick
  140.45 -OnEvent=On Event
  140.46 -OnMessage=On Message
  140.47 -PartnerLink=Partner Link
  140.48 -PartnerLinkContainer=Partner Link Container
  140.49 -PatternedCorrelation=Patterned Correlation
  140.50 -PatternedCorrelationContainer=Patterned Correlation Container
  140.51 -Pick=Pick
  140.52 -Process=Process
  140.53 -Receive=Receive
  140.54 -RepeatUntil=Repeat Until
  140.55 -Reply=Reply
  140.56 -ReThrow=Re Throw
  140.57 -Scope=Scope
  140.58 -Sequence=Sequence
  140.59 -Source=Source
  140.60 -Target=Target
  140.61 -TerminationHandler=Termination Handler
  140.62 -Throw=Throw
  140.63 -TimeEvent=Time Event
  140.64 -To=To
  140.65 -ToPart=To Part
  140.66 -Validate=Validate
  140.67 -Variable=Variable
  140.68 -VariableContainer=Variable Container
  140.69 -VariableDeclaration=VariableDeclaration
  140.70 -Wait=Wait
  140.71 -While=While
  140.72 -
  140.73  # Target.WSDL
  140.74  WSDLComponent=Any WSDL Element
  140.75  Binding=Binding
  140.76 @@ -116,10 +50,10 @@
  140.77  BindingOutput=Binding Output
  140.78  CorrelationProperty=Correlation Property
  140.79  Definitions=Definitions
  140.80 -#Documentation=Documentation
  140.81 +Documentation=Documentation
  140.82  ExtensibilityElement=Extensibility Element
  140.83  Fault=Fault
  140.84 -#Import=Import
  140.85 +Import=Import
  140.86  Input=Input
  140.87  Message=Message
  140.88  NotificationOperation=Notification Operation
  140.89 @@ -191,7 +125,7 @@
  140.90  Redefine=Redefine
  140.91  Schema=Schema
  140.92  Selector=Selector
  140.93 -#Sequence=Sequence
  140.94 +Sequence=Sequence
  140.95  SequenceDefinition=Sequence Definition
  140.96  SimpleContent=Simple Content
  140.97  SimpleContentDefinition=Simple Content Definition
   141.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/SearchAction.java	Thu Apr 17 10:51:04 2008 +0200
   141.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/SearchAction.java	Thu Apr 17 15:50:14 2008 +0200
   141.3 @@ -61,13 +61,12 @@
   141.4  import org.netbeans.modules.xml.validation.ShowCookie;
   141.5  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
   141.6  
   141.7 -import org.netbeans.modules.bpel.model.api.BpelModel;
   141.8 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   141.9  import org.netbeans.modules.bpel.search.api.SearchManager;
  141.10  import org.netbeans.modules.bpel.search.api.SearchTarget;
  141.11 +import org.netbeans.modules.bpel.search.spi.SearchProvider;
  141.12  import org.netbeans.modules.bpel.search.impl.output.View;
  141.13  import org.netbeans.modules.bpel.search.impl.ui.Search;
  141.14 -import static org.netbeans.modules.soa.ui.util.UI.*;
  141.15 +import static org.netbeans.modules.soa.ui.UI.*;
  141.16  
  141.17  /**
  141.18   * @author Vladimir Yaroslavskiy
  141.19 @@ -86,14 +85,29 @@
  141.20        icon(View.class, icon)
  141.21      );
  141.22      setEnabled(false);
  141.23 +    myProviders = getInstances(SearchProvider.class);
  141.24    }
  141.25  
  141.26    public void actionPerformed(ActionEvent event) {
  141.27      Node node = getLastNode();
  141.28 -    Model model = getModel(node);
  141.29  
  141.30 -    SearchTarget [] targets = getTargets(model);
  141.31 +    SearchTarget [] targets = null;
  141.32 +    Model model = null;
  141.33  
  141.34 +    for (SearchProvider provider : myProviders) {
  141.35 +      model = provider.getModel(node);
  141.36 +
  141.37 +      if (model != null) {
  141.38 +        targets = provider.getTargets();
  141.39 +      }
  141.40 +    }
  141.41 +
  141.42 +    
  141.43 +    
  141.44 +    if (targets == null) {
  141.45 +      model = getModel_(node);
  141.46 +      targets = getTargets(model);
  141.47 +    }
  141.48      if (targets == null) {
  141.49        return;
  141.50      }
  141.51 @@ -174,9 +188,6 @@
  141.52    }
  141.53    
  141.54    private SearchTarget [] getTargets(Model model) {
  141.55 -    if (model instanceof BpelModel) {
  141.56 -      return Target.BPEL;
  141.57 -    }
  141.58      if (model instanceof WSDLModel) {
  141.59        return Target.WSDL;
  141.60      }
  141.61 @@ -186,7 +197,7 @@
  141.62      return null;
  141.63    }
  141.64  
  141.65 -  private Model getModel(Node node) {
  141.66 +  private Model getModel_(Node node) {
  141.67  //out();
  141.68  //out("get model");
  141.69  //out("node: " + node);
  141.70 @@ -196,12 +207,6 @@
  141.71      if (data == null) {
  141.72        return null;
  141.73      }
  141.74 -    Model model = EditorUtil.getBpelModel(data);
  141.75 -//out("model: " + model);
  141.76 -
  141.77 -    if (model != null) {
  141.78 -      return model;
  141.79 -    }
  141.80      ModelCookie cookie = data.getCookie(ModelCookie.class);
  141.81  
  141.82      if (cookie == null) {
  141.83 @@ -222,5 +227,7 @@
  141.84    }
  141.85  
  141.86    private Search mySearch;
  141.87 +  private List<SearchProvider> myProviders;
  141.88 +
  141.89    public static final Action DEFAULT = new SearchAction();
  141.90  }
   142.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/Target.java	Thu Apr 17 10:51:04 2008 +0200
   142.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/action/Target.java	Thu Apr 17 15:50:14 2008 +0200
   142.3 @@ -42,7 +42,7 @@
   142.4  
   142.5  import org.netbeans.modules.xml.xam.Component;
   142.6  import org.netbeans.modules.bpel.search.api.SearchTarget;
   142.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   142.8 +import static org.netbeans.modules.soa.ui.UI.*;
   142.9  
  142.10  /**
  142.11   * @author Vladimir Yaroslavskiy
  142.12 @@ -50,73 +50,6 @@
  142.13   */
  142.14  final class Target implements SearchTarget {
  142.15  
  142.16 -  static final SearchTarget [] BPEL = new SearchTarget [] {
  142.17 -    new Target(org.netbeans.modules.bpel.model.api.BpelEntity.class),
  142.18 -    new Target(org.netbeans.modules.bpel.model.api.Assign.class),
  142.19 -    new Target(org.netbeans.modules.bpel.model.api.Branches.class),
  142.20 -    new Target(org.netbeans.modules.bpel.model.api.Catch.class),
  142.21 -    new Target(org.netbeans.modules.bpel.model.api.CatchAll.class),
  142.22 -    new Target(org.netbeans.modules.bpel.model.api.Compensate.class),
  142.23 -    new Target(org.netbeans.modules.bpel.model.api.CompensationHandler.class),
  142.24 -    new Target(org.netbeans.modules.bpel.model.api.Condition.class),
  142.25 -    new Target(org.netbeans.modules.bpel.model.api.Copy.class),
  142.26 -    new Target(org.netbeans.modules.bpel.model.api.Correlation.class),
  142.27 -    new Target(org.netbeans.modules.bpel.model.api.CorrelationContainer.class),
  142.28 -    new Target(org.netbeans.modules.bpel.model.api.CorrelationSet.class),
  142.29 -    new Target(org.netbeans.modules.bpel.model.api.CorrelationSetContainer.class),
  142.30 -    new Target(org.netbeans.modules.bpel.model.api.DeadlineExpression.class),
  142.31 -    new Target(org.netbeans.modules.bpel.model.api.Documentation.class),
  142.32 -    new Target(org.netbeans.modules.bpel.model.api.DurationExpression.class),
  142.33 -    new Target(org.netbeans.modules.bpel.model.api.Else.class),
  142.34 -    new Target(org.netbeans.modules.bpel.model.api.ElseIf.class),
  142.35 -    new Target(org.netbeans.modules.bpel.model.api.Empty.class),
  142.36 -    new Target(org.netbeans.modules.bpel.model.api.EventHandlers.class),
  142.37 -    new Target(org.netbeans.modules.bpel.model.api.Exit.class),
  142.38 -    new Target(org.netbeans.modules.bpel.model.api.FaultHandlers.class),
  142.39 -    new Target(org.netbeans.modules.bpel.model.api.Flow.class),
  142.40 -    new Target(org.netbeans.modules.bpel.model.api.For.class),
  142.41 -    new Target(org.netbeans.modules.bpel.model.api.ForEach.class),
  142.42 -    new Target(org.netbeans.modules.bpel.model.api.From.class),
  142.43 -    new Target(org.netbeans.modules.bpel.model.api.FromPart.class),
  142.44 -    new Target(org.netbeans.modules.bpel.model.api.If.class),
  142.45 -    new Target(org.netbeans.modules.bpel.model.api.Import.class),
  142.46 -    new Target(org.netbeans.modules.bpel.model.api.Invoke.class),
  142.47 -    new Target(org.netbeans.modules.bpel.model.api.Link.class),
  142.48 -    new Target(org.netbeans.modules.bpel.model.api.LinkContainer.class),
  142.49 -    new Target(org.netbeans.modules.bpel.model.api.Literal.class),
  142.50 -    new Target(org.netbeans.modules.bpel.model.api.MessageExchange.class),
  142.51 -    new Target(org.netbeans.modules.bpel.model.api.MessageExchangeContainer.class),
  142.52 -    new Target(org.netbeans.modules.bpel.model.api.OnAlarmEvent.class),
  142.53 -    new Target(org.netbeans.modules.bpel.model.api.OnAlarmPick.class),
  142.54 -    new Target(org.netbeans.modules.bpel.model.api.OnEvent.class),
  142.55 -    new Target(org.netbeans.modules.bpel.model.api.OnMessage.class),
  142.56 -    new Target(org.netbeans.modules.bpel.model.api.PartnerLink.class),
  142.57 -    new Target(org.netbeans.modules.bpel.model.api.PartnerLinkContainer.class),
  142.58 -    new Target(org.netbeans.modules.bpel.model.api.PatternedCorrelation.class),
  142.59 -    new Target(org.netbeans.modules.bpel.model.api.PatternedCorrelationContainer.class),
  142.60 -    new Target(org.netbeans.modules.bpel.model.api.Pick.class),
  142.61 -    new Target(org.netbeans.modules.bpel.model.api.Process.class),
  142.62 -    new Target(org.netbeans.modules.bpel.model.api.Receive.class),
  142.63 -    new Target(org.netbeans.modules.bpel.model.api.RepeatUntil.class),
  142.64 -    new Target(org.netbeans.modules.bpel.model.api.Reply.class),
  142.65 -    new Target(org.netbeans.modules.bpel.model.api.ReThrow.class),
  142.66 -    new Target(org.netbeans.modules.bpel.model.api.Scope.class),
  142.67 -    new Target(org.netbeans.modules.bpel.model.api.Sequence.class),
  142.68 -    new Target(org.netbeans.modules.bpel.model.api.Source.class),
  142.69 -    new Target(org.netbeans.modules.bpel.model.api.Target.class),
  142.70 -    new Target(org.netbeans.modules.bpel.model.api.TerminationHandler.class),
  142.71 -    new Target(org.netbeans.modules.bpel.model.api.Throw.class),
  142.72 -    new Target(org.netbeans.modules.bpel.model.api.TimeEvent.class),
  142.73 -    new Target(org.netbeans.modules.bpel.model.api.To.class),
  142.74 -    new Target(org.netbeans.modules.bpel.model.api.ToPart.class),
  142.75 -    new Target(org.netbeans.modules.bpel.model.api.Validate.class),
  142.76 -    new Target(org.netbeans.modules.bpel.model.api.Variable.class),
  142.77 -    new Target(org.netbeans.modules.bpel.model.api.VariableContainer.class),
  142.78 -    new Target(org.netbeans.modules.bpel.model.api.VariableDeclaration.class),
  142.79 -    new Target(org.netbeans.modules.bpel.model.api.Wait.class),
  142.80 -    new Target(org.netbeans.modules.bpel.model.api.While.class),
  142.81 -  };
  142.82 -  
  142.83    static final SearchTarget [] WSDL = new SearchTarget [] {
  142.84      new Target(org.netbeans.modules.xml.wsdl.model.WSDLComponent.class),
  142.85      new Target(org.netbeans.modules.xml.wsdl.model.Binding.class),
   143.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/core/Manager.java	Thu Apr 17 10:51:04 2008 +0200
   143.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/core/Manager.java	Thu Apr 17 15:50:14 2008 +0200
   143.3 @@ -53,7 +53,7 @@
   143.4  import org.netbeans.modules.bpel.search.impl.action.SearchAction;
   143.5  import org.netbeans.modules.bpel.search.impl.ui.Find;
   143.6  import org.netbeans.modules.bpel.search.impl.ui.Search;
   143.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   143.8 +import static org.netbeans.modules.soa.ui.UI.*;
   143.9  
  143.10  /**
  143.11   * @author Vladimir Yaroslavskiy
   144.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/diagram/Construct.java	Thu Apr 17 10:51:04 2008 +0200
   144.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/diagram/Construct.java	Thu Apr 17 15:50:14 2008 +0200
   144.3 @@ -51,7 +51,7 @@
   144.4  
   144.5  import org.netbeans.modules.bpel.search.api.SearchException;
   144.6  import org.netbeans.modules.bpel.search.api.SearchOption;
   144.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   144.8 +import static org.netbeans.modules.soa.ui.UI.*;
   144.9  
  144.10  /**
  144.11   * @author Vladimir Yaroslavskiy
   145.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/diagram/Engine.java	Thu Apr 17 10:51:04 2008 +0200
   145.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/diagram/Engine.java	Thu Apr 17 15:50:14 2008 +0200
   145.3 @@ -47,7 +47,7 @@
   145.4  import org.netbeans.modules.bpel.search.api.SearchException;
   145.5  import org.netbeans.modules.bpel.search.api.SearchOption;
   145.6  import org.netbeans.modules.bpel.search.spi.SearchEngine;
   145.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   145.8 +import static org.netbeans.modules.soa.ui.UI.*;
   145.9  
  145.10  /**
  145.11   * @author Vladimir Yaroslavskiy
   146.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/model/Element.java	Thu Apr 17 10:51:04 2008 +0200
   146.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/model/Element.java	Thu Apr 17 15:50:14 2008 +0200
   146.3 @@ -43,9 +43,9 @@
   146.4  import javax.swing.Icon;
   146.5  import org.netbeans.modules.xml.xam.Component;
   146.6  
   146.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   146.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   146.9  import org.netbeans.modules.bpel.search.api.SearchElement;
  146.10 -import static org.netbeans.modules.soa.ui.util.UI.*;
  146.11 +import static org.netbeans.modules.soa.ui.UI.*;
  146.12  
  146.13  /**
  146.14   * @author Vladimir Yaroslavskiy
   147.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/model/Engine.java	Thu Apr 17 10:51:04 2008 +0200
   147.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/model/Engine.java	Thu Apr 17 15:50:14 2008 +0200
   147.3 @@ -44,13 +44,13 @@
   147.4  import org.netbeans.modules.xml.xam.Component;
   147.5  import org.netbeans.modules.xml.xam.Model;
   147.6  import org.netbeans.modules.xml.xam.Named;
   147.7 -import org.netbeans.modules.bpel.editors.api.utils.EditorUtil;
   147.8 +import org.netbeans.modules.bpel.editors.api.EditorUtil;
   147.9  
  147.10  import org.netbeans.modules.bpel.search.api.SearchException;
  147.11  import org.netbeans.modules.bpel.search.api.SearchOption;
  147.12  import org.netbeans.modules.bpel.search.api.SearchTarget;
  147.13  import org.netbeans.modules.bpel.search.spi.SearchEngine;
  147.14 -import static org.netbeans.modules.soa.ui.util.UI.*;
  147.15 +import static org.netbeans.modules.soa.ui.UI.*;
  147.16  
  147.17  /**
  147.18   * @author Vladimir Yaroslavskiy
   148.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Panel.java	Thu Apr 17 10:51:04 2008 +0200
   148.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Panel.java	Thu Apr 17 15:50:14 2008 +0200
   148.3 @@ -51,7 +51,7 @@
   148.4  import javax.swing.SwingUtilities;
   148.5  
   148.6  import org.netbeans.modules.print.api.PrintManager;
   148.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   148.8 +import static org.netbeans.modules.soa.ui.UI.*;
   148.9  
  148.10  /**
  148.11   * @author Vladimir Yaroslavskiy
   149.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Tabbed.java	Thu Apr 17 10:51:04 2008 +0200
   149.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Tabbed.java	Thu Apr 17 15:50:14 2008 +0200
   149.3 @@ -51,8 +51,7 @@
   149.4  import javax.swing.JPopupMenu;
   149.5  import javax.swing.JTabbedPane;
   149.6  import javax.swing.SwingUtilities;
   149.7 -
   149.8 -import static org.netbeans.modules.soa.ui.util.UI.*;
   149.9 +import static org.netbeans.modules.soa.ui.UI.*;
  149.10  
  149.11  /**
  149.12   * @author Vladimir Yaroslavskiy
   150.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Tree.java	Thu Apr 17 10:51:04 2008 +0200
   150.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Tree.java	Thu Apr 17 15:50:14 2008 +0200
   150.3 @@ -79,7 +79,7 @@
   150.4  import org.netbeans.modules.bpel.search.api.SearchElement;
   150.5  
   150.6  import org.netbeans.modules.bpel.search.impl.ui.Export;
   150.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   150.8 +import static org.netbeans.modules.soa.ui.UI.*;
   150.9  
  150.10  /**
  150.11   * @author Vladimir Yaroslavskiy
   151.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/View.java	Thu Apr 17 10:51:04 2008 +0200
   151.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/View.java	Thu Apr 17 15:50:14 2008 +0200
   151.3 @@ -51,7 +51,7 @@
   151.4  import org.netbeans.modules.bpel.search.api.SearchEvent;
   151.5  import org.netbeans.modules.bpel.search.spi.SearchListener;
   151.6  import org.netbeans.modules.bpel.search.impl.ui.Element;
   151.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   151.8 +import static org.netbeans.modules.soa.ui.UI.*;
   151.9  
  151.10  /**
  151.11   * @author Vladimir Yaroslavskiy
  151.12 @@ -148,7 +148,10 @@
  151.13    protected void componentClosed()
  151.14    {
  151.15      super.componentClosed();
  151.16 -    myTabbed.closeAllTabs();
  151.17 +
  151.18 +    if (myTabbed != null) {
  151.19 +      myTabbed.closeAllTabs();
  151.20 +    }
  151.21      myList = null;
  151.22      myTree = null;
  151.23    }
   152.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Wrapper.java	Thu Apr 17 10:51:04 2008 +0200
   152.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/output/Wrapper.java	Thu Apr 17 15:50:14 2008 +0200
   152.3 @@ -59,8 +59,7 @@
   152.4  import javax.swing.event.DocumentListener;
   152.5  import javax.swing.text.Position;
   152.6  import javax.swing.tree.TreePath;
   152.7 -
   152.8 -import static org.netbeans.modules.soa.ui.util.UI.*;
   152.9 +import static org.netbeans.modules.soa.ui.UI.*;
  152.10  
  152.11  /**
  152.12   * @author Vladimir Yaroslavskiy
   153.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Export.java	Thu Apr 17 10:51:04 2008 +0200
   153.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Export.java	Thu Apr 17 15:50:14 2008 +0200
   153.3 @@ -65,7 +65,7 @@
   153.4  import org.openide.DialogDescriptor;
   153.5  import org.openide.ErrorManager;
   153.6  import org.openide.awt.HtmlBrowser;
   153.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   153.8 +import static org.netbeans.modules.soa.ui.UI.*;
   153.9  
  153.10  /**
  153.11   * @author Vladimir Yaroslavskiy
   154.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Field.java	Thu Apr 17 10:51:04 2008 +0200
   154.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Field.java	Thu Apr 17 15:50:14 2008 +0200
   154.3 @@ -52,7 +52,7 @@
   154.4  import javax.swing.JComponent;
   154.5  import javax.swing.JRootPane;
   154.6  import javax.swing.SwingUtilities;
   154.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   154.8 +import static org.netbeans.modules.soa.ui.UI.*;
   154.9  
  154.10  /**
  154.11   * @author Vladimir Yaroslavskiy
   155.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Find.java	Thu Apr 17 10:51:04 2008 +0200
   155.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Find.java	Thu Apr 17 15:50:14 2008 +0200
   155.3 @@ -64,7 +64,7 @@
   155.4  import org.netbeans.modules.bpel.search.api.SearchOption;
   155.5  import org.netbeans.modules.bpel.search.spi.SearchEngine;
   155.6  import org.netbeans.modules.bpel.search.spi.SearchListener;
   155.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   155.8 +import static org.netbeans.modules.soa.ui.UI.*;
   155.9  
  155.10  /**
  155.11   * @author Vladimir Yaroslavskiy
   156.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Progress.java	Thu Apr 17 10:51:04 2008 +0200
   156.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Progress.java	Thu Apr 17 15:50:14 2008 +0200
   156.3 @@ -45,7 +45,7 @@
   156.4  
   156.5  import org.netbeans.modules.bpel.search.api.SearchEvent;
   156.6  import org.netbeans.modules.bpel.search.spi.SearchListener;
   156.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   156.8 +import static org.netbeans.modules.soa.ui.UI.*;
   156.9  
  156.10  /**
  156.11   * @author Vladimir Yaroslavskiy
   157.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Search.java	Thu Apr 17 10:51:04 2008 +0200
   157.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/impl/ui/Search.java	Thu Apr 17 15:50:14 2008 +0200
   157.3 @@ -61,7 +61,7 @@
   157.4  import org.netbeans.modules.bpel.search.api.SearchTarget;
   157.5  import org.netbeans.modules.bpel.search.spi.SearchEngine;
   157.6  import org.netbeans.modules.bpel.search.impl.output.View;
   157.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   157.8 +import static org.netbeans.modules.soa.ui.UI.*;
   157.9  
  157.10  /**
  157.11   * @author Vladimir Yaroslavskiy
   158.1 --- a/bpel.search/src/org/netbeans/modules/bpel/search/spi/SearchEngine.java	Thu Apr 17 10:51:04 2008 +0200
   158.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/spi/SearchEngine.java	Thu Apr 17 15:50:14 2008 +0200
   158.3 @@ -49,7 +49,6 @@
   158.4  import org.netbeans.modules.bpel.search.api.SearchException;
   158.5  import org.netbeans.modules.bpel.search.api.SearchOption;
   158.6  import org.netbeans.modules.bpel.search.api.SearchPattern;
   158.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   158.8  
   158.9  /**
  158.10   * @author Vladimir Yaroslavskiy
   159.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   159.2 +++ b/bpel.search/src/org/netbeans/modules/bpel/search/spi/SearchProvider.java	Thu Apr 17 15:50:14 2008 +0200
   159.3 @@ -0,0 +1,65 @@
   159.4 +/*
   159.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   159.6 + *
   159.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   159.8 + *
   159.9 + * The contents of this file are subject to the terms of either the GNU
  159.10 + * General Public License Version 2 only ("GPL") or the Common
  159.11 + * Development and Distribution License("CDDL") (collectively, the
  159.12 + * "License"). You may not use this file except in compliance with the
  159.13 + * License. You can obtain a copy of the License at
  159.14 + * http://www.netbeans.org/cddl-gplv2.html
  159.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  159.16 + * specific language governing permissions and limitations under the
  159.17 + * License. When distributing the software, include this License Header
  159.18 + * Notice in each file and include the License file at
  159.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  159.20 + * particular file as subject to the "Classpath" exception as provided
  159.21 + * by Sun in the GPL Version 2 section of the License file that
  159.22 + * accompanied this code. If applicable, add the following below the
  159.23 + * License Header, with the fields enclosed by brackets [] replaced by
  159.24 + * your own identifying information:
  159.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  159.26 + *
  159.27 + * Contributor(s):
  159.28 + *
  159.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  159.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  159.31 + * Microsystems, Inc. All Rights Reserved.
  159.32 + *
  159.33 + * If you wish your version of this file to be governed by only the CDDL
  159.34 + * or only the GPL Version 2, indicate your decision by adding
  159.35 + * "[Contributor] elects to include this software in this distribution
  159.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  159.37 + * single choice of license, a recipient has the option to distribute
  159.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  159.39 + * to extend the choice of license to its licensees as provided above.
  159.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  159.41 + * Version 2 license, then the option applies only if the new code is
  159.42 + * made subject to such option by the copyright holder.
  159.43 + */
  159.44 +package org.netbeans.modules.bpel.search.spi;
  159.45 +
  159.46 +import org.openide.nodes.Node;
  159.47 +import org.netbeans.modules.xml.xam.Model;
  159.48 +import org.netbeans.modules.bpel.search.api.SearchTarget;
  159.49 +
  159.50 +/**
  159.51 + * @author Vladimir Yaroslavskiy
  159.52 + * @version 2008.04.16
  159.53 + */
  159.54 +public interface SearchProvider {
  159.55 +
  159.56 +  /**
  159.57 +   * Returns model by given node.
  159.58 +   * @param node is given node
  159.59 +   * @return model by given node
  159.60 +   */
  159.61 +  Model getModel(Node node);
  159.62 +
  159.63 +  /**
  159.64 +   * Returns targets.
  159.65 +   * @return targets
  159.66 +   */
  159.67 +  SearchTarget [] getTargets();
  159.68 +}
   160.1 --- a/bpel.validation/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   160.2 +++ b/bpel.validation/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   160.3 @@ -78,14 +78,6 @@
   160.4                      </run-dependency>
   160.5                  </dependency>
   160.6                  <dependency>
   160.7 -                    <code-name-base>org.netbeans.modules.bpel.core</code-name-base>
   160.8 -                    <build-prerequisite/>
   160.9 -                    <compile-dependency/>
  160.10 -                    <run-dependency>
  160.11 -                        <release-version>1</release-version>
  160.12 -                    </run-dependency>
  160.13 -                </dependency>
  160.14 -                <dependency>
  160.15                      <code-name-base>org.openide.nodes</code-name-base>
  160.16                      <build-prerequisite/>
  160.17                      <compile-dependency/>
  160.18 @@ -176,7 +168,7 @@
  160.19                      </run-dependency>
  160.20                  </dependency>
  160.21                  <dependency>
  160.22 -                    <code-name-base>org.netbeans.modules.soa.ui</code-name-base>
  160.23 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
  160.24                      <build-prerequisite/>
  160.25                      <compile-dependency/>
  160.26                      <run-dependency>
   161.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/action/QuickFixAction.java	Thu Apr 17 10:51:04 2008 +0200
   161.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/action/QuickFixAction.java	Thu Apr 17 15:50:14 2008 +0200
   161.3 @@ -56,13 +56,12 @@
   161.4  import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
   161.5  import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
   161.6  
   161.7 +import org.netbeans.modules.soa.validation.Controller;
   161.8  import org.netbeans.modules.bpel.model.api.BpelModel;
   161.9 -import org.netbeans.modules.bpel.core.BPELDataEditorSupport;
  161.10 -import org.netbeans.modules.bpel.core.util.BPELValidationController;
  161.11  import org.netbeans.modules.bpel.validation.core.QuickFix;
  161.12  import org.netbeans.modules.bpel.validation.core.QuickFixable;
  161.13  import org.netbeans.modules.bpel.validation.core.Util;
  161.14 -import static org.netbeans.modules.soa.ui.util.UI.*;
  161.15 +import static org.netbeans.modules.soa.ui.UI.*;
  161.16  
  161.17  /**
  161.18   * @author Vladimir Yaroslavskiy
  161.19 @@ -117,16 +116,18 @@
  161.20      if (node == null) {
  161.21        return quickFixes;
  161.22      }
  161.23 -//out("MODE: " + node);
  161.24 -    if (myValidationController == null) {
  161.25 -      BPELDataEditorSupport support = (BPELDataEditorSupport) node.getLookup().lookup(DataEditorSupport.class);
  161.26 -      myValidationController = support.getValidationController();
  161.27 +//out();
  161.28 +//out("NODE: " + node);
  161.29 +
  161.30 +    if (myController == null) {
  161.31 +      myController = node.getLookup().lookup(Controller.class);
  161.32 +//out("CONTROLLER: " + myController);
  161.33      }
  161.34 -    if (myValidationController == null) {
  161.35 +    if (myController == null) {
  161.36  //out("CONTROLLER is NULL");
  161.37        return quickFixes;
  161.38      }
  161.39 -    List<ResultItem> result = myValidationController.getValidationResult();
  161.40 +    List<ResultItem> result = myController.getResult();
  161.41  
  161.42      for (ResultItem item : result) {
  161.43        if ( !(item instanceof QuickFixable)) {
  161.44 @@ -141,5 +142,5 @@
  161.45      return quickFixes;
  161.46    }
  161.47  
  161.48 -  private BPELValidationController myValidationController;
  161.49 +  private Controller myController;
  161.50  }
   162.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/core/BpelValidator.java	Thu Apr 17 10:51:04 2008 +0200
   162.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/core/BpelValidator.java	Thu Apr 17 15:50:14 2008 +0200
   162.3 @@ -58,7 +58,7 @@
   162.4  import org.netbeans.modules.bpel.model.api.Process;
   162.5  import org.netbeans.modules.bpel.model.api.support.Initiate;
   162.6  import org.netbeans.modules.bpel.model.api.support.TBoolean;
   162.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   162.8 +import static org.netbeans.modules.soa.ui.UI.*;
   162.9  
  162.10  /**
  162.11   * @author Vladimir Yaroslavskiy
   163.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/core/CoreValidator.java	Thu Apr 17 10:51:04 2008 +0200
   163.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/core/CoreValidator.java	Thu Apr 17 15:50:14 2008 +0200
   163.3 @@ -72,7 +72,7 @@
   163.4  import org.netbeans.modules.bpel.model.api.BpelModel;
   163.5  import org.netbeans.modules.bpel.model.api.Process;
   163.6  import org.netbeans.modules.bpel.model.api.support.SimpleBpelModelVisitorAdaptor;
   163.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   163.8 +import static org.netbeans.modules.soa.ui.UI.*;
   163.9  
  163.10  /**
  163.11   * @author Vladimir Yaroslavskiy
   164.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/core/Util.java	Thu Apr 17 10:51:04 2008 +0200
   164.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/core/Util.java	Thu Apr 17 15:50:14 2008 +0200
   164.3 @@ -43,7 +43,7 @@
   164.4  import java.util.ArrayList;
   164.5  import java.util.List;
   164.6  import org.netbeans.modules.bpel.model.api.NamedElement;
   164.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   164.8 +import static org.netbeans.modules.soa.ui.UI.*;
   164.9  
  164.10  /**
  164.11   * @author Vladimir Yaroslavskiy
   165.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/core/WsdlValidator.java	Thu Apr 17 10:51:04 2008 +0200
   165.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/core/WsdlValidator.java	Thu Apr 17 15:50:14 2008 +0200
   165.3 @@ -59,7 +59,7 @@
   165.4  
   165.5  import org.netbeans.modules.bpel.model.api.BpelModel;
   165.6  import org.netbeans.modules.bpel.model.api.Process;
   165.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   165.8 +import static org.netbeans.modules.soa.ui.UI.*;
   165.9  
  165.10  /**
  165.11   * @author Vladimir Yaroslavskiy
   166.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/custom/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   166.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/custom/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   166.3 @@ -98,7 +98,7 @@
   166.4  import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
   166.5  import org.netbeans.modules.xml.xam.Model;
   166.6  import org.netbeans.modules.bpel.validation.core.BpelValidator;
   166.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   166.8 +import static org.netbeans.modules.soa.ui.UI.*;
   166.9  
  166.10  /**
  166.11   * @author Vladimir Yaroslavskiy
   167.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/project/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   167.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/project/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   167.3 @@ -60,7 +60,7 @@
   167.4  import org.netbeans.modules.compapp.projects.jbi.api.ProjectValidator;
   167.5  import org.netbeans.modules.bpel.model.api.BpelModel;
   167.6  import org.netbeans.modules.bpel.model.api.Process;
   167.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   167.8 +import static org.netbeans.modules.soa.ui.UI.*;
   167.9  
  167.10  /**
  167.11   * @author Vladimir Yaroslavskiy
   168.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/reference/QuickFix.java	Thu Apr 17 10:51:04 2008 +0200
   168.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/reference/QuickFix.java	Thu Apr 17 15:50:14 2008 +0200
   168.3 @@ -55,7 +55,7 @@
   168.4  import org.netbeans.modules.bpel.model.api.references.ReferenceCollection;
   168.5  import org.netbeans.modules.bpel.validation.core.QuickFix.Adapter;
   168.6  import org.netbeans.modules.bpel.validation.core.Util;
   168.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   168.8 +import static org.netbeans.modules.soa.ui.UI.*;
   168.9  
  168.10  /**
  168.11   * @author Vladimir Yaroslavskiy
   169.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/reference/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   169.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/reference/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   169.3 @@ -70,7 +70,7 @@
   169.4  import org.netbeans.modules.xml.xam.spi.Validation;
   169.5  import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
   169.6  import org.netbeans.modules.bpel.validation.core.BpelValidator;
   169.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   169.8 +import static org.netbeans.modules.soa.ui.UI.*;
   169.9  
  169.10  /**
  169.11   * @author Vladimir Yaroslavskiy
   170.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/runtime/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   170.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/runtime/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   170.3 @@ -98,7 +98,7 @@
   170.4  import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
   170.5  import org.netbeans.modules.xml.xam.spi.Validator.ResultType;
   170.6  import org.netbeans.modules.bpel.validation.core.BpelValidator;
   170.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   170.8 +import static org.netbeans.modules.soa.ui.UI.*;
   170.9  
  170.10  /**
  170.11   * @author Vladimir Yaroslavskiy
   171.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/schema/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   171.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/schema/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   171.3 @@ -59,8 +59,12 @@
   171.4  import org.netbeans.modules.xml.xam.spi.ValidationResult;
   171.5  import org.netbeans.modules.xml.xam.spi.XsdBasedValidator;
   171.6  import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
   171.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   171.8 +import static org.netbeans.modules.soa.ui.UI.*;
   171.9  
  171.10 +/**
  171.11 + * @author Vladimir Yaroslavskiy
  171.12 + * @version 2007.05.05
  171.13 + */
  171.14  public final class Validator extends XsdBasedValidator {
  171.15  
  171.16    @Override
   172.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/statics/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   172.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/statics/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   172.3 @@ -160,7 +160,7 @@
   172.4  import org.netbeans.modules.bpel.model.api.RepeatUntil;
   172.5  import org.netbeans.modules.bpel.model.api.PartnerLinkReference;
   172.6  import org.netbeans.modules.bpel.model.api.PortTypeReference;
   172.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   172.8 +import static org.netbeans.modules.soa.ui.UI.*;
   172.9  
  172.10  /**
  172.11   * @author Vladimir Yaroslavskiy
   173.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/variable/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   173.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/variable/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   173.3 @@ -67,7 +67,7 @@
   173.4  import org.netbeans.modules.xml.xam.dom.NamedComponentReference;
   173.5  
   173.6  import org.netbeans.modules.bpel.validation.core.BpelValidator;
   173.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   173.8 +import static org.netbeans.modules.soa.ui.UI.*;
   173.9  
  173.10  /**
  173.11   * @author Vladimir Yaroslavskiy
   174.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/wsdl/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   174.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/wsdl/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   174.3 @@ -61,7 +61,7 @@
   174.4  import org.netbeans.modules.xml.xam.dom.DocumentComponent;
   174.5  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PropertyAlias;
   174.6  import org.netbeans.modules.bpel.validation.core.WsdlValidator;
   174.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   174.8 +import static org.netbeans.modules.soa.ui.UI.*;
   174.9  
  174.10  /**
  174.11   * @author Vladimir Yaroslavskiy
   175.1 --- a/bpel.validation/src/org/netbeans/modules/bpel/validation/xpath/Validator.java	Thu Apr 17 10:51:04 2008 +0200
   175.2 +++ b/bpel.validation/src/org/netbeans/modules/bpel/validation/xpath/Validator.java	Thu Apr 17 15:50:14 2008 +0200
   175.3 @@ -75,8 +75,9 @@
   175.4  import org.netbeans.modules.bpel.validation.core.BpelValidator;
   175.5  import org.netbeans.modules.bpel.model.api.support.ValidationVisitor;
   175.6  import org.netbeans.modules.xml.wsdl.model.extensions.bpel.validation.ValidationUtil;
   175.7 -import org.netbeans.modules.soa.ui.util.Duration;
   175.8 -import org.netbeans.modules.soa.ui.util.DurationUtil;
   175.9 +import org.netbeans.modules.soa.validation.Duration;
  175.10 +import org.netbeans.modules.soa.validation.DurationUtil;
  175.11 +import static org.netbeans.modules.soa.ui.UI.*;
  175.12  
  175.13  /**
  175.14   * @author Vladimir Yaroslavskiy
   176.1 --- a/iep.editor/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   176.2 +++ b/iep.editor/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   176.3 @@ -51,6 +51,15 @@
   176.4                      </run-dependency>
   176.5                  </dependency>
   176.6                  <dependency>
   176.7 +                    <code-name-base>org.netbeans.modules.db</code-name-base>
   176.8 +                    <build-prerequisite/>
   176.9 +                    <compile-dependency/>
  176.10 +                    <run-dependency>
  176.11 +                        <release-version>1</release-version>
  176.12 +                        <specification-version>1.25</specification-version>
  176.13 +                    </run-dependency>
  176.14 +                </dependency>
  176.15 +                <dependency>
  176.16                      <code-name-base>org.netbeans.modules.iep.model</code-name-base>
  176.17                      <build-prerequisite/>
  176.18                      <compile-dependency/>
   177.1 --- a/iep.editor/src/org/netbeans/modules/iep/editor/mf-layer.xml	Thu Apr 17 10:51:04 2008 +0200
   177.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/mf-layer.xml	Thu Apr 17 15:50:14 2008 +0200
   177.3 @@ -122,6 +122,7 @@
   177.4          <folder name="external">
   177.5              <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.iep.editor.palette.Bundle"/>
   177.6              <file name="InvokeStream.xml" url="nbresloc:/org/netbeans/modules/iep/editor/palette/items/external/InvokeStream.xml"/>
   177.7 +            <file name="ExternalTablePollingStream.xml" url="nbresloc:/org/netbeans/modules/iep/editor/palette/items/external/ExternalTablePollingStream.xml"/>
   177.8          </folder>
   177.9      </folder>
  177.10  </filesystem>
   178.1 --- a/iep.editor/src/org/netbeans/modules/iep/editor/palette/items/external/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   178.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/palette/items/external/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   178.3 @@ -31,3 +31,9 @@
   178.4   Enables calling external IEP process. <br>\
   178.5  </html>\
   178.6  
   178.7 +NAME_html-ExternalTablePollingStream=External Table Polling Stream
   178.8 +HINT_html-ExternalTablePollingStream=\
   178.9 +<html>\
  178.10 +<b>External Table Polling Stream</b><br>\
  178.11 + Enables polling external database table and fetch as stream. <br>\
  178.12 +</html>\
   179.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   179.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/palette/items/external/ExternalTablePollingStream.java	Thu Apr 17 15:50:14 2008 +0200
   179.3 @@ -0,0 +1,40 @@
   179.4 +/*
   179.5 + * The contents of this file are subject to the terms of the Common Development
   179.6 + * and Distribution License (the License). You may not use this file except in
   179.7 + * compliance with the License.
   179.8 + * 
   179.9 + * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
  179.10 + * or http://www.netbeans.org/cddl.txt.
  179.11 + * 
  179.12 + * When distributing Covered Code, include this CDDL Header Notice in each file
  179.13 + * and include the License file at http://www.netbeans.org/cddl.txt.
  179.14 + * If applicable, add the following below the CDDL Header, with the fields
  179.15 + * enclosed by brackets [] replaced by your own identifying information:
  179.16 + * "Portions Copyrighted [year] [name of copyright owner]"
  179.17 + * 
  179.18 + * The Original Software is NetBeans. The Initial Developer of the Original
  179.19 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  179.20 + * Microsystems, Inc. All Rights Reserved.
  179.21 + */
  179.22 +
  179.23 +package org.netbeans.modules.iep.editor.palette.items.external;
  179.24 +
  179.25 +import org.netbeans.modules.iep.editor.tcg.palette.TcgActiveEditorDrop;
  179.26 +
  179.27 +/*
  179.28 + * StreamInput.java
  179.29 + *
  179.30 + * Created on January 3, 2006, 5:18 PM
  179.31 + *
  179.32 + * @author Bing Lu
  179.33 + */
  179.34 +public class ExternalTablePollingStream extends TcgActiveEditorDrop {
  179.35 +    
  179.36 +    /** 
  179.37 +     * Creates a new instance of StreamInput 
  179.38 +     */
  179.39 +    public ExternalTablePollingStream() {
  179.40 +        mPath = "/IEP/External/ExternalTablePollingStream";
  179.41 +    }
  179.42 +    
  179.43 +}
   180.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   180.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/palette/items/external/ExternalTablePollingStream.xml	Thu Apr 17 15:50:14 2008 +0200
   180.3 @@ -0,0 +1,33 @@
   180.4 +<?xml version="1.0" encoding="UTF-8"?>
   180.5 +<!--
   180.6 + The contents of this file are subject to the terms of the Common Development
   180.7 + and Distribution License (the License). You may not use this file except in
   180.8 + compliance with the License.
   180.9 + 
  180.10 + You can obtain a copy of the License at http://www.netbeans.org/cddl.html
  180.11 + or http://www.netbeans.org/cddl.txt.
  180.12 + 
  180.13 + When distributing Covered Code, include this CDDL Header Notice in each file
  180.14 + and include the License file at http://www.netbeans.org/cddl.txt.
  180.15 + If applicable, add the following below the CDDL Header, with the fields
  180.16 + enclosed by brackets [] replaced by your own identifying information:
  180.17 + "Portions Copyrighted [year] [name of copyright owner]"
  180.18 + 
  180.19 + The Original Software is NetBeans. The Initial Developer of the Original
  180.20 + Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  180.21 + Microsystems, Inc. All Rights Reserved.
  180.22 +-->
  180.23 +<!DOCTYPE editor_palette_item PUBLIC "-//NetBeans//Editor Palette Item 1.0//EN" "http://www.netbeans.org/dtds/editor-palette-item-1_0.dtd">
  180.24 +
  180.25 +<editor_palette_item version="1.0">
  180.26 +    <class name="org.netbeans.modules.iep.editor.palette.items.external.ExternalTablePollingStream"/>
  180.27 +    
  180.28 +    <!--<icon16 urlvalue="images/streamInputx16.png" />
  180.29 +    <icon32 urlvalue="images/streamInputx32.png" />-->
  180.30 +    <icon16 urlvalue="images/icons32x32/streamInputx32.png" />
  180.31 +    <icon32 urlvalue="images/icons32x32/streamInputx32.png" />
  180.32 +    
  180.33 +    <description localizing-bundle="org.netbeans.modules.iep.editor.palette.items.external.Bundle"
  180.34 +               display-name-key="NAME_html-ExternalTablePollingStream"
  180.35 +               tooltip-key="HINT_html-ExternalTablePollingStream" />
  180.36 +</editor_palette_item>
  180.37 \ No newline at end of file
   181.1 --- a/iep.editor/src/org/netbeans/modules/iep/editor/ps/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   181.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/ps/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   181.3 @@ -279,6 +279,9 @@
   181.4  IEP.External.InvokeStream.title=Invoke Stream
   181.5  IEP.External.InvokeStream.description=Invoke Stream tooltip
   181.6  
   181.7 +IEP.External.ExternalTablePollingStream.title=External Table Stream
   181.8 +IEP.External.ExternalTablePollingStream.description=External Table Stream tooltip
   181.9 +
  181.10  IEP.Category.main=Operator Instance
  181.11  IEP.Category.schema=Operator Schema(s)
  181.12  IEP.Category.operator=operator
   182.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   182.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/ps/ExternalTablePollingStreamCustomEditor.java	Thu Apr 17 15:50:14 2008 +0200
   182.3 @@ -0,0 +1,384 @@
   182.4 +package org.netbeans.modules.iep.editor.ps;
   182.5 +
   182.6 +import java.awt.Component;
   182.7 +import java.awt.GridBagConstraints;
   182.8 +import java.awt.GridBagLayout;
   182.9 +import java.awt.Insets;
  182.10 +import java.awt.event.ActionEvent;
  182.11 +import java.awt.event.ActionListener;
  182.12 +import java.beans.PropertyChangeEvent;
  182.13 +import java.beans.PropertyChangeListener;
  182.14 +import java.beans.PropertyVetoException;
  182.15 +import java.util.List;
  182.16 +import java.util.logging.Logger;
  182.17 +
  182.18 +import javax.swing.BorderFactory;
  182.19 +import javax.swing.Box;
  182.20 +import javax.swing.JButton;
  182.21 +import javax.swing.JPanel;
  182.22 +import javax.swing.JTextField;
  182.23 +import javax.swing.border.CompoundBorder;
  182.24 +import javax.swing.border.LineBorder;
  182.25 +import javax.swing.border.TitledBorder;
  182.26 +
  182.27 +import org.netbeans.api.project.FileOwnerQuery;
  182.28 +import org.netbeans.api.project.Project;
  182.29 +import org.netbeans.modules.iep.editor.designer.GuiConstants;
  182.30 +import org.netbeans.modules.iep.editor.model.NameGenerator;
  182.31 +import org.netbeans.modules.iep.editor.tcg.ps.TcgComponentNodePropertyCustomizerState;
  182.32 +import org.netbeans.modules.iep.editor.tcg.table.DefaultMoveableRowTableModel;
  182.33 +import org.netbeans.modules.iep.editor.wizard.database.DatabaseTableSelectionWizardAction;
  182.34 +import org.netbeans.modules.iep.model.IEPModel;
  182.35 +import org.netbeans.modules.iep.model.InputOperatorComponent;
  182.36 +import org.netbeans.modules.iep.model.InvokeStreamOperatorComponent;
  182.37 +import org.netbeans.modules.iep.model.OperatorComponent;
  182.38 +import org.netbeans.modules.iep.model.Property;
  182.39 +import org.netbeans.modules.iep.model.SchemaComponent;
  182.40 +import org.netbeans.modules.iep.model.lib.TcgPropertyType;
  182.41 +import org.openide.DialogDescriptor;
  182.42 +import org.openide.DialogDisplayer;
  182.43 +import org.openide.explorer.propertysheet.PropertyEnv;
  182.44 +import org.openide.filesystems.FileObject;
  182.45 +import org.openide.util.NbBundle;
  182.46 +
  182.47 +public class ExternalTablePollingStreamCustomEditor extends DefaultCustomEditor {
  182.48 +    private static final Logger mLog = Logger.getLogger(ExternalTablePollingStreamCustomEditor.class.getName());
  182.49 +    
  182.50 +    private boolean mValidOperatorSelection = false;
  182.51 +    
  182.52 +    /** Creates a new instance of InvokeStreamCustomEditor */
  182.53 +    public ExternalTablePollingStreamCustomEditor() {
  182.54 +        super();
  182.55 +    }
  182.56 +    
  182.57 +    public Component getCustomEditor() {
  182.58 +        if (mEnv != null) {
  182.59 +            return new MyCustomizer(getPropertyType(), getOperatorComponent(), mEnv);
  182.60 +        }
  182.61 +        return new MyCustomizer(getPropertyType(), getOperatorComponent(), mCustomizerState);
  182.62 +    }
  182.63 +    
  182.64 +    private class MyCustomizer extends DefaultCustomizer {
  182.65 +        protected PropertyPanel mAttributePanel;
  182.66 +        protected PropertyPanel mSizePanel;
  182.67 +        
  182.68 +        public MyCustomizer(TcgPropertyType propertyType, OperatorComponent component, PropertyEnv env) {
  182.69 +            super(propertyType, component, env);
  182.70 +        }
  182.71 +        
  182.72 +        public MyCustomizer(TcgPropertyType propertyType, OperatorComponent component, TcgComponentNodePropertyCustomizerState customizerState) {
  182.73 +            super(propertyType, component, customizerState);
  182.74 +        }
  182.75 +        
  182.76 +        protected JPanel createPropertyPanel() throws Exception {
  182.77 +            
  182.78 +            JPanel pane = new JPanel();
  182.79 +            String msg = NbBundle.getMessage(DefaultCustomEditor.class, "CustomEditor.DETAILS");
  182.80 +            pane.setBorder(new CompoundBorder(
  182.81 +                    new TitledBorder(LineBorder.createGrayLineBorder(), msg, TitledBorder.LEFT, TitledBorder.TOP),
  182.82 +                    BorderFactory.createEmptyBorder(3, 3, 3, 3)));
  182.83 +            pane.setLayout(new GridBagLayout());
  182.84 +            GridBagConstraints gbc = new GridBagConstraints();
  182.85 +            gbc.insets = new Insets(3, 3, 3, 3);
  182.86 +            
  182.87 +            // name
  182.88 +            Property nameProp = mComponent.getProperty(NAME_KEY);
  182.89 +            String nameStr = NbBundle.getMessage(DefaultCustomEditor.class, "CustomEditor.NAME");
  182.90 +            mNamePanel = PropertyPanel.createSingleLineTextPanel(nameStr, nameProp, false);
  182.91 +            gbc.gridx = 0;
  182.92 +            gbc.gridy = 0;
  182.93 +            gbc.gridwidth = 1;
  182.94 +            gbc.gridheight = 1;
  182.95 +            gbc.anchor = GridBagConstraints.WEST;
  182.96 +            gbc.weightx = 0.0D;
  182.97 +            gbc.weighty = 0.0D;
  182.98 +            gbc.fill = GridBagConstraints.NONE;
  182.99 +            pane.add(mNamePanel.component[0], gbc);
 182.100 +            
 182.101 +            gbc.gridx = 1;
 182.102 +            gbc.gridy = 0;
 182.103 +            gbc.gridwidth = 1;
 182.104 +            gbc.gridheight = 1;
 182.105 +            gbc.anchor = GridBagConstraints.WEST;
 182.106 +            gbc.weightx = 1.0D;
 182.107 +            gbc.weighty = 0.0D;
 182.108 +            gbc.fill = GridBagConstraints.NONE;
 182.109 +            pane.add(mNamePanel.component[1], gbc);
 182.110 +            
 182.111 +            // output schema
 182.112 +            Property outputSchemaNameProp = mComponent.getProperty(OUTPUT_SCHEMA_ID_KEY);
 182.113 +            String outputSchemaNameStr = NbBundle.getMessage(DefaultCustomEditor.class, "CustomEditor.OUTPUT_SCHEMA_NAME");
 182.114 +            mOutputSchemaNamePanel = PropertyPanel.createSingleLineTextPanel(outputSchemaNameStr, outputSchemaNameProp, false);
 182.115 +            if (mIsSchemaOwner) {
 182.116 +                if (mOutputSchemaNamePanel.getStringValue() == null || mOutputSchemaNamePanel.getStringValue().trim().equals("")) {
 182.117 +                	IEPModel model = mComponent.getModel();
 182.118 +                	String schemaName = NameGenerator.generateSchemaName(model.getPlanComponent().getSchemaComponentContainer());
 182.119 +                    mOutputSchemaNamePanel.setStringValue(schemaName);
 182.120 +                }
 182.121 +            } else {
 182.122 +                ((JTextField)mOutputSchemaNamePanel.input[0]).setEditable(false);
 182.123 +            }
 182.124 +            gbc.gridx = 0;
 182.125 +            gbc.gridy = 1;
 182.126 +            gbc.gridwidth = 1;
 182.127 +            gbc.gridheight = 1;
 182.128 +            gbc.anchor = GridBagConstraints.WEST;
 182.129 +            gbc.weightx = 0.0D;
 182.130 +            gbc.weighty = 0.0D;
 182.131 +            gbc.fill = GridBagConstraints.NONE;
 182.132 +            pane.add(mOutputSchemaNamePanel.component[0], gbc);
 182.133 +            
 182.134 +            gbc.gridx = 1;
 182.135 +            gbc.gridy = 1;
 182.136 +            gbc.gridwidth = 1;
 182.137 +            gbc.gridheight = 1;
 182.138 +            gbc.anchor = GridBagConstraints.WEST;
 182.139 +            gbc.weightx = 0.0D;
 182.140 +            gbc.weighty = 0.0D;
 182.141 +            gbc.fill = GridBagConstraints.NONE;
 182.142 +            pane.add(mOutputSchemaNamePanel.component[1], gbc);
 182.143 +            
 182.144 +            // struct
 182.145 +            gbc.gridx = 2;
 182.146 +            gbc.gridy = 0;
 182.147 +            gbc.gridwidth = 1;
 182.148 +            gbc.gridheight = 1;
 182.149 +            gbc.anchor = GridBagConstraints.WEST;
 182.150 +            gbc.weightx = 0.0D;
 182.151 +            gbc.weighty = 0.0D;
 182.152 +            gbc.fill = GridBagConstraints.NONE;
 182.153 +            pane.add(Box.createHorizontalStrut(20), gbc);
 182.154 +            
 182.155 +//            // called iep process
 182.156 +//            Property invokedProcessName = mComponent.getProperty(InvokeStreamOperatorComponent.PROP_EXTERNAL_IEP_PROCESS_QUALIFIED_NAME);
 182.157 +//            String invokedProcessNameLabel = NbBundle.getMessage(ExternalTablePollingStreamCustomEditor.class, "InvokeStreamCustomEditor.EXTERNAL_IEP_PROCESS_QUALIFIED_NAME");
 182.158 +////            List attributeList = mSelectPanel.getQuantityAttributeList();
 182.159 +////            attributeList.add(0, "");
 182.160 +////            mAttributePanel = PropertyPanel.createComboBoxPanel(attributeStr, attributeProp, (String[])attributeList.toArray(new String[0]), false);
 182.161 +//            mAttributePanel = PropertyPanel.createSingleLineTextPanelWithoutFilter(invokedProcessNameLabel, invokedProcessName, false);
 182.162 +//            
 182.163 +//            gbc.gridx = 3;
 182.164 +//            gbc.gridy = 0;
 182.165 +//            gbc.gridwidth = 1;
 182.166 +//            gbc.gridheight = 1;
 182.167 +//            gbc.anchor = GridBagConstraints.WEST;
 182.168 +//            gbc.weightx = 0.0D;
 182.169 +//            gbc.weighty = 0.0D;
 182.170 +//            gbc.fill = GridBagConstraints.NONE;
 182.171 +//            pane.add(mAttributePanel.component[0], gbc);
 182.172 +//            
 182.173 +//            gbc.gridx = 4;
 182.174 +//            gbc.gridy = 0;
 182.175 +//            gbc.gridwidth = GridBagConstraints.RELATIVE;
 182.176 +//            gbc.gridheight = 1;
 182.177 +//            gbc.anchor = GridBagConstraints.WEST;
 182.178 +//            gbc.weightx = 1.0D;
 182.179 +//            gbc.weighty = 0.0D;
 182.180 +//            gbc.fill = GridBagConstraints.NONE;
 182.181 +//            pane.add(mAttributePanel.component[1], gbc);
 182.182 +//
 182.183 +//            
 182.184 +//            ((JTextField)mAttributePanel.component[1]).setEnabled(false);
 182.185 +//            
 182.186 +            
 182.187 +            JButton selectIEPProcessButton = new JButton("...");
 182.188 +            //selectIEPProcessButton.addActionListener(new SelectIEPProcessOperatorActionListener());
 182.189 +            selectIEPProcessButton.setAction(new DatabaseTableSelectionWizardAction());
 182.190 +            gbc.gridx = 5;
 182.191 +            gbc.gridy = 0;
 182.192 +            gbc.gridwidth = GridBagConstraints.REMAINDER;
 182.193 +            gbc.gridheight = 1;
 182.194 +            gbc.anchor = GridBagConstraints.WEST;
 182.195 +            gbc.weightx = 0.0D;
 182.196 +            gbc.weighty = 0.0D;
 182.197 +            gbc.fill = GridBagConstraints.NONE;
 182.198 +            pane.add(selectIEPProcessButton, gbc);
 182.199 +            
 182.200 +//            // called iep operator
 182.201 +//            Property sizeProp = mComponent.getProperty(InvokeStreamOperatorComponent.PROP_EXTERNAL_OPERATOR_NAME);
 182.202 +//            String sizeStr = NbBundle.getMessage(ExternalTablePollingStreamCustomEditor.class, "InvokeStreamCustomEditor.EXTERNAL_OPERATOR_NAME");
 182.203 +////            mSizePanel = PropertyPanel.createFloatNumberPanel(sizeStr, sizeProp, false);
 182.204 +//            mSizePanel = PropertyPanel.createSingleLineTextPanel(sizeStr, sizeProp, false);
 182.205 +//            
 182.206 +//            gbc.gridx = 3;
 182.207 +//            gbc.gridy = 1;
 182.208 +//            gbc.gridwidth = 1;
 182.209 +//            gbc.gridheight = 1;
 182.210 +//            gbc.anchor = GridBagConstraints.WEST;
 182.211 +//            gbc.weightx = 0.0D;
 182.212 +//            gbc.weighty = 0.0D;
 182.213 +//            gbc.fill = GridBagConstraints.NONE;
 182.214 +//            pane.add(mSizePanel.component[0], gbc);
 182.215 +//            
 182.216 +//            gbc.gridx = 4;
 182.217 +//            gbc.gridy = 1;
 182.218 +//            gbc.gridwidth = 1;
 182.219 +//            gbc.gridheight = 1;
 182.220 +//            gbc.anchor = GridBagConstraints.WEST;
 182.221 +//            gbc.weightx = 0.0D;
 182.222 +//            gbc.weighty = 0.0D;
 182.223 +//            gbc.fill = GridBagConstraints.NONE;
 182.224 +//            pane.add(mSizePanel.component[1], gbc);
 182.225 +//            ((JTextField)mSizePanel.component[1]).setEnabled(false);
 182.226 +//            
 182.227 +            // glue
 182.228 +            gbc.gridx = 5;
 182.229 +            gbc.gridy = 0;
 182.230 +            gbc.gridwidth = 1;
 182.231 +            gbc.gridheight = 1;
 182.232 +            gbc.anchor = GridBagConstraints.WEST;
 182.233 +            gbc.weightx = 1.0D;
 182.234 +            gbc.weighty = 0.0D;
 182.235 +            gbc.fill = GridBagConstraints.HORIZONTAL;
 182.236 +            pane.add(Box.createHorizontalGlue(), gbc);
 182.237 +            
 182.238 +            return pane;
 182.239 +        }
 182.240 +        
 182.241 +        @Override
 182.242 +        protected SelectPanel createSelectPanel(IEPModel model, OperatorComponent component) {
 182.243 +        	return new MySelectPanel(model, component);
 182.244 +        }
 182.245 +
 182.246 +        @Override
 182.247 +        protected boolean isShowFromClause() {
 182.248 +            return false;
 182.249 +        }
 182.250 +        
 182.251 +        
 182.252 +        public void validateContent(PropertyChangeEvent evt) throws PropertyVetoException {
 182.253 +            super.validateContent(evt);
 182.254 +            try {
 182.255 +                mAttributePanel.validateContent(evt);
 182.256 +                mSizePanel.validateContent(evt);
 182.257 +            } catch (Exception e) {
 182.258 +                String msg = e.getMessage();
 182.259 +                mStatusLbl.setText(msg);
 182.260 +                mStatusLbl.setIcon(GuiConstants.ERROR_ICON);
 182.261 +                throw new PropertyVetoException(msg, evt);
 182.262 +            }
 182.263 +            
 182.264 +            //validate for atleast one input and that input should be used
 182.265 +            //in from clause and expressions are columns from input
 182.266 +        }
 182.267 +        
 182.268 +        public void setValue() {
 182.269 +            super.setValue();
 182.270 +            mAttributePanel.store();
 182.271 +            mSizePanel.store();
 182.272 +            
 182.273 +//            //store from clause
 182.274 +//            List<OperatorComponent> inputs = mComponent.getInputOperatorList();
 182.275 +//            if(inputs.size() == 1) {
 182.276 +//                OperatorComponent comp = inputs.get(0);
 182.277 +//                String displayName = comp.getDisplayName();
 182.278 +//                if(displayName != null) {
 182.279 +//                    Property fromProp = mComponent.getProperty(FROM_CLAUSE_KEY);
 182.280 +//                    if(fromProp != null) {
 182.281 +//                        mComponent.getModel().startTransaction();
 182.282 +//                        fromProp.setValue(displayName);
 182.283 +//                        mComponent.getModel().endTransaction();
 182.284 +//                    }
 182.285 +//                }
 182.286 +//            }
 182.287 +        }
 182.288 +        
 182.289 +        class SelectIEPProcessOperatorActionListener implements ActionListener {
 182.290 +
 182.291 +            public void actionPerformed(ActionEvent e) {
 182.292 +                IEPModel model = getOperatorComponent().getModel();
 182.293 +                FileObject fileObj = model.getModelSource().getLookup().lookup(FileObject.class);
 182.294 +                if(fileObj != null) {
 182.295 +                    Project project = FileOwnerQuery.getOwner(fileObj);
 182.296 +                    StreamInputChooserPanel panel = new StreamInputChooserPanel(project);
 182.297 +                    DialogDescriptor dd = new DialogDescriptor(panel, "Select Stream Input", true, null);
 182.298 +                    panel.addPropertyChangeListener(new StreamInputChooserPanelPropertyListener(dd));
 182.299 +
 182.300 +                    DialogDisplayer dDisplayer = DialogDisplayer.getDefault();
 182.301 +                    if(dDisplayer.notify(dd) == DialogDescriptor.OK_OPTION) {
 182.302 +                        InputOperatorComponent inComp = panel.getSelectedInputOperatorComponent();
 182.303 +                        if(inComp != null) {
 182.304 +                            String displayName = inComp.getDisplayName();
 182.305 +                            String iepQualifiedName = inComp.getModel().getQualifiedName();
 182.306 +                            mAttributePanel.setStringValue(iepQualifiedName);
 182.307 +                            mSizePanel.setStringValue(displayName);
 182.308 +                            SchemaComponent sc = inComp.getOutputSchemaId();
 182.309 +                            if(sc != null) {
 182.310 +                            	mSelectPanel.clearTable();
 182.311 +                            	mSelectPanel.setAttributes(sc.getSchemaAttributes());
 182.312 +                            }
 182.313 +                        }
 182.314 +                        
 182.315 +                    }
 182.316 +                }
 182.317 +            }
 182.318 +        }
 182.319 +        
 182.320 +    }
 182.321 +    
 182.322 +    
 182.323 +    
 182.324 +    class StreamInputChooserPanelPropertyListener implements PropertyChangeListener {
 182.325 +        
 182.326 +        private DialogDescriptor mDD;
 182.327 +        
 182.328 +        StreamInputChooserPanelPropertyListener(DialogDescriptor dd) {
 182.329 +            this.mDD = dd;
 182.330 +        }
 182.331 +        
 182.332 +        public void propertyChange(PropertyChangeEvent evt) {
 182.333 +            if(StreamInputChooserPanel.PROP_SELECTED_INPUT_OPERATOR_COMPONENT.equals(evt.getPropertyName())){
 182.334 +                if(evt.getNewValue() != null) {
 182.335 +                    mValidOperatorSelection = true;
 182.336 +                } else {
 182.337 +                    mValidOperatorSelection = false;
 182.338 +                }
 182.339 +            } else {
 182.340 +                mValidOperatorSelection = false;
 182.341 +            }
 182.342 +            
 182.343 +            this.mDD.setValid(mValidOperatorSelection);
 182.344 +            
 182.345 +        }
 182.346 +        
 182.347 +    }
 182.348 +    
 182.349 +    class MySelectPanel extends SelectPanel {
 182.350 +
 182.351 +		/**
 182.352 +		 * 
 182.353 +		 */
 182.354 +		private static final long serialVersionUID = -4195259789503600814L;
 182.355 +
 182.356 +		public MySelectPanel(IEPModel model, OperatorComponent component) {
 182.357 +			super(model, component);
 182.358 +		}
 182.359 +    	
 182.360 +		@Override
 182.361 +		protected boolean isAddEmptyRow() {
 182.362 +			return false;
 182.363 +		}
 182.364 +
 182.365 +                @Override
 182.366 +                protected boolean isShowButtons() {
 182.367 +                    return false;
 182.368 +                }
 182.369 +		
 182.370 +                
 182.371 +		@Override
 182.372 +		protected DefaultMoveableRowTableModel createTableModel() {
 182.373 +			return new MyTableModel();
 182.374 +		}
 182.375 +    }
 182.376 +    
 182.377 +    class MyTableModel extends DefaultMoveableRowTableModel {
 182.378 +    	
 182.379 +    	@Override
 182.380 +    	public boolean isCellEditable(int row, int column) {
 182.381 +    		if(column == 0) {
 182.382 +    			return true;
 182.383 +    		}
 182.384 +    		return false;
 182.385 +    	}
 182.386 +    }
 182.387 +}
   183.1 --- a/iep.editor/src/org/netbeans/modules/iep/editor/wizard/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   183.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   183.3 @@ -17,3 +17,12 @@
   183.4  IEPSelectWsdlMessagePanel.jLabel1.text=Operator:
   183.5  NameLocationStepBottomPanel.jRadioButton1.text=Use existing schema
   183.6  NameLocationStepBottomPanel.jRadioButton2.text=Use existing wsdl
   183.7 +IEPFileNameAndPackageNamePanel.jLabel1.text=File Name:
   183.8 +IEPFileNameAndPackageNamePanel.jLabel2.text=Project:
   183.9 +IEPFileNameAndPackageNamePanel.jLabel3.text=Folder:
  183.10 +IEPFileNameAndPackageNamePanel.jLabel4.text=Package:
  183.11 +IEPFileNameAndPackageNamePanel.jLabel5.text=Created File:
  183.12 +IEPFileNameAndPackageNamePanel.fileNameTextField.text=
  183.13 +IEPFileNameAndPackageNamePanel.projectNameTextField.text=
  183.14 +IEPFileNameAndPackageNamePanel.folderTextField.text=
  183.15 +IEPFileNameAndPackageNamePanel.createdFileTextField.text=
   184.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   184.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/IEPFileNameAndPackageNamePanel.form	Thu Apr 17 15:50:14 2008 +0200
   184.3 @@ -0,0 +1,158 @@
   184.4 +<?xml version="1.0" encoding="UTF-8" ?>
   184.5 +
   184.6 +<Form version="1.5" maxVersion="1.6" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   184.7 +  <AuxValues>
   184.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
   184.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  184.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  184.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
  184.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  184.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  184.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  184.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  184.16 +  </AuxValues>
  184.17 +
  184.18 +  <Layout>
  184.19 +    <DimensionLayout dim="0">
  184.20 +      <Group type="103" groupAlignment="0" attributes="0">
  184.21 +          <Group type="102" alignment="0" attributes="0">
  184.22 +              <EmptySpace max="-2" attributes="0"/>
  184.23 +              <Group type="103" groupAlignment="0" attributes="0">
  184.24 +                  <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/>
  184.25 +                  <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
  184.26 +                  <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
  184.27 +                  <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
  184.28 +                  <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/>
  184.29 +              </Group>
  184.30 +              <EmptySpace max="-2" attributes="0"/>
  184.31 +              <Group type="103" groupAlignment="0" attributes="0">
  184.32 +                  <Component id="folderTextField" alignment="1" pref="315" max="32767" attributes="1"/>
  184.33 +                  <Component id="projectNameTextField" alignment="1" pref="315" max="32767" attributes="1"/>
  184.34 +                  <Component id="fileNameTextField" alignment="1" pref="315" max="32767" attributes="1"/>
  184.35 +                  <Component id="jComboBox1" alignment="1" pref="315" max="32767" attributes="1"/>
  184.36 +                  <Component id="createdFileTextField" alignment="0" pref="315" max="32767" attributes="0"/>
  184.37 +              </Group>
  184.38 +              <EmptySpace max="-2" attributes="0"/>
  184.39 +          </Group>
  184.40 +      </Group>
  184.41 +    </DimensionLayout>
  184.42 +    <DimensionLayout dim="1">
  184.43 +      <Group type="103" groupAlignment="0" attributes="0">
  184.44 +          <Group type="102" alignment="0" attributes="0">
  184.45 +              <EmptySpace max="-2" attributes="0"/>
  184.46 +              <Group type="103" groupAlignment="3" attributes="0">
  184.47 +                  <Component id="fileNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
  184.48 +                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
  184.49 +              </Group>
  184.50 +              <EmptySpace max="-2" attributes="0"/>
  184.51 +              <Group type="103" groupAlignment="3" attributes="0">
  184.52 +                  <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
  184.53 +                  <Component id="projectNameTextField" alignment="3" min="-2" max="-2" attributes="0"/>
  184.54 +              </Group>
  184.55 +              <EmptySpace max="-2" attributes="0"/>
  184.56 +              <Group type="103" groupAlignment="3" attributes="0">
  184.57 +                  <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
  184.58 +                  <Component id="folderTextField" alignment="3" min="-2" max="-2" attributes="0"/>
  184.59 +              </Group>
  184.60 +              <EmptySpace max="-2" attributes="0"/>
  184.61 +              <Group type="103" groupAlignment="3" attributes="0">
  184.62 +                  <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
  184.63 +                  <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
  184.64 +              </Group>
  184.65 +              <EmptySpace max="-2" attributes="0"/>
  184.66 +              <Group type="103" groupAlignment="3" attributes="0">
  184.67 +                  <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
  184.68 +                  <Component id="createdFileTextField" alignment="3" min="-2" max="-2" attributes="0"/>
  184.69 +              </Group>
  184.70 +              <EmptySpace pref="167" max="32767" attributes="0"/>
  184.71 +          </Group>
  184.72 +      </Group>
  184.73 +    </DimensionLayout>
  184.74 +  </Layout>
  184.75 +  <SubComponents>
  184.76 +    <Component class="javax.swing.JLabel" name="jLabel1">
  184.77 +      <Properties>
  184.78 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  184.79 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  184.80 +        </Property>
  184.81 +      </Properties>
  184.82 +    </Component>
  184.83 +    <Component class="javax.swing.JTextField" name="fileNameTextField">
  184.84 +      <Properties>
  184.85 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  184.86 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.fileNameTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  184.87 +        </Property>
  184.88 +      </Properties>
  184.89 +      <Events>
  184.90 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileNameTextFieldActionPerformed"/>
  184.91 +      </Events>
  184.92 +    </Component>
  184.93 +    <Component class="javax.swing.JTextField" name="projectNameTextField">
  184.94 +      <Properties>
  184.95 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  184.96 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.projectNameTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  184.97 +        </Property>
  184.98 +        <Property name="enabled" type="boolean" value="false"/>
  184.99 +      </Properties>
 184.100 +      <Events>
 184.101 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="projectNameTextFieldActionPerformed"/>
 184.102 +      </Events>
 184.103 +    </Component>
 184.104 +    <Component class="javax.swing.JTextField" name="folderTextField">
 184.105 +      <Properties>
 184.106 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.107 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.folderTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.108 +        </Property>
 184.109 +        <Property name="enabled" type="boolean" value="false"/>
 184.110 +      </Properties>
 184.111 +    </Component>
 184.112 +    <Component class="javax.swing.JLabel" name="jLabel2">
 184.113 +      <Properties>
 184.114 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.115 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.116 +        </Property>
 184.117 +      </Properties>
 184.118 +    </Component>
 184.119 +    <Component class="javax.swing.JLabel" name="jLabel3">
 184.120 +      <Properties>
 184.121 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.122 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.123 +        </Property>
 184.124 +      </Properties>
 184.125 +    </Component>
 184.126 +    <Component class="javax.swing.JComboBox" name="jComboBox1">
 184.127 +      <Properties>
 184.128 +        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
 184.129 +          <StringArray count="4">
 184.130 +            <StringItem index="0" value="Item 1"/>
 184.131 +            <StringItem index="1" value="Item 2"/>
 184.132 +            <StringItem index="2" value="Item 3"/>
 184.133 +            <StringItem index="3" value="Item 4"/>
 184.134 +          </StringArray>
 184.135 +        </Property>
 184.136 +      </Properties>
 184.137 +    </Component>
 184.138 +    <Component class="javax.swing.JLabel" name="jLabel4">
 184.139 +      <Properties>
 184.140 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.141 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.142 +        </Property>
 184.143 +      </Properties>
 184.144 +    </Component>
 184.145 +    <Component class="javax.swing.JLabel" name="jLabel5">
 184.146 +      <Properties>
 184.147 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.148 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.jLabel5.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.149 +        </Property>
 184.150 +      </Properties>
 184.151 +    </Component>
 184.152 +    <Component class="javax.swing.JTextField" name="createdFileTextField">
 184.153 +      <Properties>
 184.154 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 184.155 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/Bundle.properties" key="IEPFileNameAndPackageNamePanel.createdFileTextField.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 184.156 +        </Property>
 184.157 +        <Property name="enabled" type="boolean" value="false"/>
 184.158 +      </Properties>
 184.159 +    </Component>
 184.160 +  </SubComponents>
 184.161 +</Form>
   185.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   185.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/IEPFileNameAndPackageNamePanel.java	Thu Apr 17 15:50:14 2008 +0200
   185.3 @@ -0,0 +1,143 @@
   185.4 +/*
   185.5 + * IEPFileNameAndPackageNamePanel.java
   185.6 + *
   185.7 + * Created on April 9, 2008, 6:44 PM
   185.8 + */
   185.9 +
  185.10 +package org.netbeans.modules.iep.editor.wizard;
  185.11 +
  185.12 +/**
  185.13 + *
  185.14 + * @author  radval
  185.15 + */
  185.16 +public class IEPFileNameAndPackageNamePanel extends javax.swing.JPanel {
  185.17 +
  185.18 +    /** Creates new form IEPFileNameAndPackageNamePanel */
  185.19 +    public IEPFileNameAndPackageNamePanel() {
  185.20 +        initComponents();
  185.21 +    }
  185.22 +
  185.23 +    /** This method is called from within the constructor to
  185.24 +     * initialize the form.
  185.25 +     * WARNING: Do NOT modify this code. The content of this method is
  185.26 +     * always regenerated by the Form Editor.
  185.27 +     */
  185.28 +    @SuppressWarnings("unchecked")
  185.29 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  185.30 +    private void initComponents() {
  185.31 +
  185.32 +        jLabel1 = new javax.swing.JLabel();
  185.33 +        fileNameTextField = new javax.swing.JTextField();
  185.34 +        projectNameTextField = new javax.swing.JTextField();
  185.35 +        folderTextField = new javax.swing.JTextField();
  185.36 +        jLabel2 = new javax.swing.JLabel();
  185.37 +        jLabel3 = new javax.swing.JLabel();
  185.38 +        jComboBox1 = new javax.swing.JComboBox();
  185.39 +        jLabel4 = new javax.swing.JLabel();
  185.40 +        jLabel5 = new javax.swing.JLabel();
  185.41 +        createdFileTextField = new javax.swing.JTextField();
  185.42 +
  185.43 +        jLabel1.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.jLabel1.text")); // NOI18N
  185.44 +
  185.45 +        fileNameTextField.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.fileNameTextField.text")); // NOI18N
  185.46 +        fileNameTextField.addActionListener(new java.awt.event.ActionListener() {
  185.47 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  185.48 +                fileNameTextFieldActionPerformed(evt);
  185.49 +            }
  185.50 +        });
  185.51 +
  185.52 +        projectNameTextField.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.projectNameTextField.text")); // NOI18N
  185.53 +        projectNameTextField.setEnabled(false);
  185.54 +        projectNameTextField.addActionListener(new java.awt.event.ActionListener() {
  185.55 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  185.56 +                projectNameTextFieldActionPerformed(evt);
  185.57 +            }
  185.58 +        });
  185.59 +
  185.60 +        folderTextField.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.folderTextField.text")); // NOI18N
  185.61 +        folderTextField.setEnabled(false);
  185.62 +
  185.63 +        jLabel2.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.jLabel2.text")); // NOI18N
  185.64 +
  185.65 +        jLabel3.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.jLabel3.text")); // NOI18N
  185.66 +
  185.67 +        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
  185.68 +
  185.69 +        jLabel4.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.jLabel4.text")); // NOI18N
  185.70 +
  185.71 +        jLabel5.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.jLabel5.text")); // NOI18N
  185.72 +
  185.73 +        createdFileTextField.setText(org.openide.util.NbBundle.getMessage(IEPFileNameAndPackageNamePanel.class, "IEPFileNameAndPackageNamePanel.createdFileTextField.text")); // NOI18N
  185.74 +        createdFileTextField.setEnabled(false);
  185.75 +
  185.76 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  185.77 +        this.setLayout(layout);
  185.78 +        layout.setHorizontalGroup(
  185.79 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  185.80 +            .add(layout.createSequentialGroup()
  185.81 +                .addContainerGap()
  185.82 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  185.83 +                    .add(jLabel5)
  185.84 +                    .add(jLabel3)
  185.85 +                    .add(jLabel2)
  185.86 +                    .add(jLabel1)
  185.87 +                    .add(jLabel4))
  185.88 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  185.89 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  185.90 +                    .add(org.jdesktop.layout.GroupLayout.TRAILING, folderTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)
  185.91 +                    .add(org.jdesktop.layout.GroupLayout.TRAILING, projectNameTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)
  185.92 +                    .add(org.jdesktop.layout.GroupLayout.TRAILING, fileNameTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)
  185.93 +                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jComboBox1, 0, 315, Short.MAX_VALUE)
  185.94 +                    .add(createdFileTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE))
  185.95 +                .addContainerGap())
  185.96 +        );
  185.97 +        layout.setVerticalGroup(
  185.98 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  185.99 +            .add(layout.createSequentialGroup()
 185.100 +                .addContainerGap()
 185.101 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 185.102 +                    .add(fileNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
 185.103 +                    .add(jLabel1))
 185.104 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 185.105 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 185.106 +                    .add(jLabel2)
 185.107 +                    .add(projectNameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 185.108 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 185.109 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 185.110 +                    .add(jLabel3)
 185.111 +                    .add(folderTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 185.112 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 185.113 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 185.114 +                    .add(jLabel4)
 185.115 +                    .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 185.116 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 185.117 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 185.118 +                    .add(jLabel5)
 185.119 +                    .add(createdFileTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 185.120 +                .addContainerGap(167, Short.MAX_VALUE))
 185.121 +        );
 185.122 +    }// </editor-fold>//GEN-END:initComponents
 185.123 +
 185.124 +private void fileNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileNameTextFieldActionPerformed
 185.125 +// TODO add your handling code here:
 185.126 +}//GEN-LAST:event_fileNameTextFieldActionPerformed
 185.127 +
 185.128 +private void projectNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectNameTextFieldActionPerformed
 185.129 +// TODO add your handling code here:
 185.130 +}//GEN-LAST:event_projectNameTextFieldActionPerformed
 185.131 +
 185.132 +
 185.133 +    // Variables declaration - do not modify//GEN-BEGIN:variables
 185.134 +    private javax.swing.JTextField createdFileTextField;
 185.135 +    private javax.swing.JTextField fileNameTextField;
 185.136 +    private javax.swing.JTextField folderTextField;
 185.137 +    private javax.swing.JComboBox jComboBox1;
 185.138 +    private javax.swing.JLabel jLabel1;
 185.139 +    private javax.swing.JLabel jLabel2;
 185.140 +    private javax.swing.JLabel jLabel3;
 185.141 +    private javax.swing.JLabel jLabel4;
 185.142 +    private javax.swing.JLabel jLabel5;
 185.143 +    private javax.swing.JTextField projectNameTextField;
 185.144 +    // End of variables declaration//GEN-END:variables
 185.145 +
 185.146 +}
   186.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   186.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   186.3 @@ -0,0 +1,10 @@
   186.4 +DatabaseTableSelectionPanel.jLabel1.text=Database:
   186.5 +DatabaseTableSelectionPanel.jLabel2.text=Available Tables:
   186.6 +DatabaseTableSelectionPanel.jLabel3.text=Selected Tables:
   186.7 +DatabaseTableSelectionPanel.jButton1.text=>
   186.8 +DatabaseTableSelectionPanel.jButton2.text=<
   186.9 +DatabaseTableSelectionPanel.jButton3.text=>>
  186.10 +DatabaseTableSelectionPanel.jButton4.text=<<
  186.11 +DatabaseTableColumnSelectionPanel.jLabel1.text=Selected Tables:
  186.12 +DatabaseTableColumnSelectionPanel.jTextField1.text=jTextField1
  186.13 +DatabaseTableColumnSelectionPanel.jLabel2.text=Select Columns:
   187.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   187.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableColumnSelectionPanel.form	Thu Apr 17 15:50:14 2008 +0200
   187.3 @@ -0,0 +1,95 @@
   187.4 +<?xml version="1.0" encoding="UTF-8" ?>
   187.5 +
   187.6 +<Form version="1.5" maxVersion="1.6" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   187.7 +  <AuxValues>
   187.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
   187.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  187.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  187.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
  187.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  187.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  187.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  187.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  187.16 +  </AuxValues>
  187.17 +
  187.18 +  <Layout>
  187.19 +    <DimensionLayout dim="0">
  187.20 +      <Group type="103" groupAlignment="0" attributes="0">
  187.21 +          <Group type="102" alignment="0" attributes="0">
  187.22 +              <EmptySpace max="-2" attributes="0"/>
  187.23 +              <Group type="103" groupAlignment="0" attributes="0">
  187.24 +                  <Component id="jScrollPane1" alignment="0" pref="380" max="32767" attributes="0"/>
  187.25 +                  <Group type="102" alignment="0" attributes="0">
  187.26 +                      <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
  187.27 +                      <EmptySpace max="-2" attributes="0"/>
  187.28 +                      <Component id="jTextField1" pref="297" max="32767" attributes="0"/>
  187.29 +                  </Group>
  187.30 +                  <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
  187.31 +              </Group>
  187.32 +              <EmptySpace max="-2" attributes="0"/>
  187.33 +          </Group>
  187.34 +      </Group>
  187.35 +    </DimensionLayout>
  187.36 +    <DimensionLayout dim="1">
  187.37 +      <Group type="103" groupAlignment="0" attributes="0">
  187.38 +          <Group type="102" alignment="0" attributes="0">
  187.39 +              <EmptySpace max="-2" attributes="0"/>
  187.40 +              <Group type="103" groupAlignment="3" attributes="0">
  187.41 +                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
  187.42 +                  <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/>
  187.43 +              </Group>
  187.44 +              <EmptySpace type="unrelated" max="-2" attributes="0"/>
  187.45 +              <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
  187.46 +              <EmptySpace max="-2" attributes="0"/>
  187.47 +              <Component id="jScrollPane1" min="-2" pref="275" max="-2" attributes="0"/>
  187.48 +              <EmptySpace max="32767" attributes="0"/>
  187.49 +          </Group>
  187.50 +      </Group>
  187.51 +    </DimensionLayout>
  187.52 +  </Layout>
  187.53 +  <SubComponents>
  187.54 +    <Component class="javax.swing.JLabel" name="jLabel1">
  187.55 +      <Properties>
  187.56 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  187.57 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableColumnSelectionPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  187.58 +        </Property>
  187.59 +      </Properties>
  187.60 +    </Component>
  187.61 +    <Component class="javax.swing.JTextField" name="jTextField1">
  187.62 +      <Properties>
  187.63 +        <Property name="editable" type="boolean" value="false"/>
  187.64 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  187.65 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableColumnSelectionPanel.jTextField1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  187.66 +        </Property>
  187.67 +      </Properties>
  187.68 +    </Component>
  187.69 +    <Component class="javax.swing.JLabel" name="jLabel2">
  187.70 +      <Properties>
  187.71 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  187.72 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableColumnSelectionPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  187.73 +        </Property>
  187.74 +      </Properties>
  187.75 +    </Component>
  187.76 +    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
  187.77 +      <AuxValues>
  187.78 +        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
  187.79 +      </AuxValues>
  187.80 +
  187.81 +      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
  187.82 +      <SubComponents>
  187.83 +        <Component class="javax.swing.JTable" name="jTable1">
  187.84 +          <Properties>
  187.85 +            <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
  187.86 +              <Table columnCount="4" rowCount="4">
  187.87 +                <Column editable="true" title="Title 1" type="java.lang.Object"/>
  187.88 +                <Column editable="true" title="Title 2" type="java.lang.Object"/>
  187.89 +                <Column editable="true" title="Title 3" type="java.lang.Object"/>
  187.90 +                <Column editable="true" title="Title 4" type="java.lang.Object"/>
  187.91 +              </Table>
  187.92 +            </Property>
  187.93 +          </Properties>
  187.94 +        </Component>
  187.95 +      </SubComponents>
  187.96 +    </Container>
  187.97 +  </SubComponents>
  187.98 +</Form>
   188.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   188.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableColumnSelectionPanel.java	Thu Apr 17 15:50:14 2008 +0200
   188.3 @@ -0,0 +1,94 @@
   188.4 +/*
   188.5 + * DatabaseTableColumnSelectionPanel.java
   188.6 + *
   188.7 + * Created on April 15, 2008, 6:38 PM
   188.8 + */
   188.9 +
  188.10 +package org.netbeans.modules.iep.editor.wizard.database;
  188.11 +
  188.12 +/**
  188.13 + *
  188.14 + * @author  radval
  188.15 + */
  188.16 +public class DatabaseTableColumnSelectionPanel extends javax.swing.JPanel {
  188.17 +
  188.18 +    /** Creates new form DatabaseTableColumnSelectionPanel */
  188.19 +    public DatabaseTableColumnSelectionPanel() {
  188.20 +        initComponents();
  188.21 +    }
  188.22 +
  188.23 +    /** This method is called from within the constructor to
  188.24 +     * initialize the form.
  188.25 +     * WARNING: Do NOT modify this code. The content of this method is
  188.26 +     * always regenerated by the Form Editor.
  188.27 +     */
  188.28 +    @SuppressWarnings("unchecked")
  188.29 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  188.30 +    private void initComponents() {
  188.31 +
  188.32 +        jLabel1 = new javax.swing.JLabel();
  188.33 +        jTextField1 = new javax.swing.JTextField();
  188.34 +        jLabel2 = new javax.swing.JLabel();
  188.35 +        jScrollPane1 = new javax.swing.JScrollPane();
  188.36 +        jTable1 = new javax.swing.JTable();
  188.37 +
  188.38 +        jLabel1.setText(org.openide.util.NbBundle.getMessage(DatabaseTableColumnSelectionPanel.class, "DatabaseTableColumnSelectionPanel.jLabel1.text")); // NOI18N
  188.39 +
  188.40 +        jTextField1.setEditable(false);
  188.41 +        jTextField1.setText(org.openide.util.NbBundle.getMessage(DatabaseTableColumnSelectionPanel.class, "DatabaseTableColumnSelectionPanel.jTextField1.text")); // NOI18N
  188.42 +
  188.43 +        jLabel2.setText(org.openide.util.NbBundle.getMessage(DatabaseTableColumnSelectionPanel.class, "DatabaseTableColumnSelectionPanel.jLabel2.text")); // NOI18N
  188.44 +
  188.45 +        jTable1.setModel(new javax.swing.table.DefaultTableModel(
  188.46 +            new Object [][] {
  188.47 +                {null, null, null, null},
  188.48 +                {null, null, null, null},
  188.49 +                {null, null, null, null},
  188.50 +                {null, null, null, null}
  188.51 +            },
  188.52 +            new String [] {
  188.53 +                "Title 1", "Title 2", "Title 3", "Title 4"
  188.54 +            }
  188.55 +        ));
  188.56 +        jScrollPane1.setViewportView(jTable1);
  188.57 +
  188.58 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  188.59 +        this.setLayout(layout);
  188.60 +        layout.setHorizontalGroup(
  188.61 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  188.62 +            .add(layout.createSequentialGroup()
  188.63 +                .addContainerGap()
  188.64 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  188.65 +                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
  188.66 +                    .add(layout.createSequentialGroup()
  188.67 +                        .add(jLabel1)
  188.68 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  188.69 +                        .add(jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE))
  188.70 +                    .add(jLabel2))
  188.71 +                .addContainerGap())
  188.72 +        );
  188.73 +        layout.setVerticalGroup(
  188.74 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  188.75 +            .add(layout.createSequentialGroup()
  188.76 +                .addContainerGap()
  188.77 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
  188.78 +                    .add(jLabel1)
  188.79 +                    .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  188.80 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
  188.81 +                .add(jLabel2)
  188.82 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  188.83 +                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 275, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
  188.84 +                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  188.85 +        );
  188.86 +    }// </editor-fold>//GEN-END:initComponents
  188.87 +
  188.88 +
  188.89 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  188.90 +    private javax.swing.JLabel jLabel1;
  188.91 +    private javax.swing.JLabel jLabel2;
  188.92 +    private javax.swing.JScrollPane jScrollPane1;
  188.93 +    private javax.swing.JTable jTable1;
  188.94 +    private javax.swing.JTextField jTextField1;
  188.95 +    // End of variables declaration//GEN-END:variables
  188.96 +
  188.97 +}
   189.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   189.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionPanel.form	Thu Apr 17 15:50:14 2008 +0200
   189.3 @@ -0,0 +1,193 @@
   189.4 +<?xml version="1.0" encoding="UTF-8" ?>
   189.5 +
   189.6 +<Form version="1.5" maxVersion="1.6" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   189.7 +  <AuxValues>
   189.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
   189.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  189.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
  189.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
  189.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  189.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  189.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  189.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  189.16 +  </AuxValues>
  189.17 +
  189.18 +  <Layout>
  189.19 +    <DimensionLayout dim="0">
  189.20 +      <Group type="103" groupAlignment="0" attributes="0">
  189.21 +          <Group type="102" attributes="0">
  189.22 +              <EmptySpace max="-2" attributes="0"/>
  189.23 +              <Group type="103" groupAlignment="0" attributes="0">
  189.24 +                  <Group type="102" alignment="0" attributes="0">
  189.25 +                      <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
  189.26 +                      <EmptySpace max="-2" attributes="0"/>
  189.27 +                      <Component id="jComboBox1" pref="326" max="32767" attributes="0"/>
  189.28 +                      <EmptySpace max="-2" attributes="0"/>
  189.29 +                  </Group>
  189.30 +                  <Group type="102" alignment="0" attributes="0">
  189.31 +                      <Group type="103" groupAlignment="0" attributes="0">
  189.32 +                          <Component id="jLabel2" min="-2" max="-2" attributes="1"/>
  189.33 +                          <Component id="jScrollPane1" min="-2" pref="121" max="-2" attributes="1"/>
  189.34 +                      </Group>
  189.35 +                      <EmptySpace max="-2" attributes="0"/>
  189.36 +                      <Group type="103" groupAlignment="0" attributes="0">
  189.37 +                          <Component id="jButton3" alignment="0" pref="83" max="32767" attributes="0"/>
  189.38 +                          <Component id="jButton4" alignment="1" pref="83" max="32767" attributes="0"/>
  189.39 +                          <Component id="jButton2" pref="83" max="32767" attributes="0"/>
  189.40 +                          <Component id="jButton1" pref="83" max="32767" attributes="0"/>
  189.41 +                      </Group>
  189.42 +                      <EmptySpace max="-2" attributes="0"/>
  189.43 +                      <Group type="103" groupAlignment="0" attributes="0">
  189.44 +                          <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
  189.45 +                          <Component id="jScrollPane2" min="-2" pref="158" max="-2" attributes="0"/>
  189.46 +                      </Group>
  189.47 +                      <EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
  189.48 +                  </Group>
  189.49 +              </Group>
  189.50 +          </Group>
  189.51 +      </Group>
  189.52 +    </DimensionLayout>
  189.53 +    <DimensionLayout dim="1">
  189.54 +      <Group type="103" groupAlignment="0" attributes="0">
  189.55 +          <Group type="102" alignment="0" attributes="0">
  189.56 +              <EmptySpace max="-2" attributes="0"/>
  189.57 +              <Group type="103" groupAlignment="3" attributes="0">
  189.58 +                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
  189.59 +                  <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
  189.60 +              </Group>
  189.61 +              <EmptySpace type="separate" max="-2" attributes="0"/>
  189.62 +              <Group type="103" groupAlignment="3" attributes="0">
  189.63 +                  <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
  189.64 +                  <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
  189.65 +              </Group>
  189.66 +              <EmptySpace max="-2" attributes="0"/>
  189.67 +              <Group type="103" groupAlignment="0" attributes="0">
  189.68 +                  <Component id="jScrollPane2" alignment="0" pref="218" max="32767" attributes="0"/>
  189.69 +                  <Component id="jScrollPane1" alignment="0" pref="218" max="32767" attributes="0"/>
  189.70 +                  <Group type="102" alignment="0" attributes="0">
  189.71 +                      <EmptySpace min="-2" pref="52" max="-2" attributes="0"/>
  189.72 +                      <Component id="jButton1" min="-2" max="-2" attributes="0"/>
  189.73 +                      <EmptySpace max="-2" attributes="0"/>
  189.74 +                      <Component id="jButton2" min="-2" max="-2" attributes="0"/>
  189.75 +                      <EmptySpace max="-2" attributes="0"/>
  189.76 +                      <Component id="jButton3" min="-2" max="-2" attributes="0"/>
  189.77 +                      <EmptySpace max="-2" attributes="0"/>
  189.78 +                      <Component id="jButton4" min="-2" max="-2" attributes="0"/>
  189.79 +                  </Group>
  189.80 +              </Group>
  189.81 +              <EmptySpace max="-2" attributes="0"/>
  189.82 +          </Group>
  189.83 +      </Group>
  189.84 +    </DimensionLayout>
  189.85 +  </Layout>
  189.86 +  <SubComponents>
  189.87 +    <Component class="javax.swing.JLabel" name="jLabel1">
  189.88 +      <Properties>
  189.89 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
  189.90 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
  189.91 +        </Property>
  189.92 +      </Properties>
  189.93 +    </Component>
  189.94 +    <Component class="javax.swing.JComboBox" name="jComboBox1">
  189.95 +      <Properties>
  189.96 +        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
  189.97 +          <StringArray count="4">
  189.98 +            <StringItem index="0" value="Item 1"/>
  189.99 +            <StringItem index="1" value="Item 2"/>
 189.100 +            <StringItem index="2" value="Item 3"/>
 189.101 +            <StringItem index="3" value="Item 4"/>
 189.102 +          </StringArray>
 189.103 +        </Property>
 189.104 +      </Properties>
 189.105 +    </Component>
 189.106 +    <Component class="javax.swing.JLabel" name="jLabel2">
 189.107 +      <Properties>
 189.108 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.109 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.110 +        </Property>
 189.111 +      </Properties>
 189.112 +    </Component>
 189.113 +    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
 189.114 +      <AuxValues>
 189.115 +        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
 189.116 +      </AuxValues>
 189.117 +
 189.118 +      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
 189.119 +      <SubComponents>
 189.120 +        <Component class="javax.swing.JList" name="jList1">
 189.121 +          <Properties>
 189.122 +            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
 189.123 +              <StringArray count="5">
 189.124 +                <StringItem index="0" value="Item 1"/>
 189.125 +                <StringItem index="1" value="Item 2"/>
 189.126 +                <StringItem index="2" value="Item 3"/>
 189.127 +                <StringItem index="3" value="Item 4"/>
 189.128 +                <StringItem index="4" value="Item 5"/>
 189.129 +              </StringArray>
 189.130 +            </Property>
 189.131 +          </Properties>
 189.132 +        </Component>
 189.133 +      </SubComponents>
 189.134 +    </Container>
 189.135 +    <Component class="javax.swing.JLabel" name="jLabel3">
 189.136 +      <Properties>
 189.137 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.138 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jLabel3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.139 +        </Property>
 189.140 +      </Properties>
 189.141 +    </Component>
 189.142 +    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
 189.143 +      <AuxValues>
 189.144 +        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
 189.145 +      </AuxValues>
 189.146 +
 189.147 +      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
 189.148 +      <SubComponents>
 189.149 +        <Component class="javax.swing.JList" name="jList2">
 189.150 +          <Properties>
 189.151 +            <Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
 189.152 +              <StringArray count="5">
 189.153 +                <StringItem index="0" value="Item 1"/>
 189.154 +                <StringItem index="1" value="Item 2"/>
 189.155 +                <StringItem index="2" value="Item 3"/>
 189.156 +                <StringItem index="3" value="Item 4"/>
 189.157 +                <StringItem index="4" value="Item 5"/>
 189.158 +              </StringArray>
 189.159 +            </Property>
 189.160 +          </Properties>
 189.161 +        </Component>
 189.162 +      </SubComponents>
 189.163 +    </Container>
 189.164 +    <Component class="javax.swing.JButton" name="jButton1">
 189.165 +      <Properties>
 189.166 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.167 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.168 +        </Property>
 189.169 +      </Properties>
 189.170 +      <Events>
 189.171 +        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
 189.172 +      </Events>
 189.173 +    </Component>
 189.174 +    <Component class="javax.swing.JButton" name="jButton2">
 189.175 +      <Properties>
 189.176 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.177 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jButton2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.178 +        </Property>
 189.179 +      </Properties>
 189.180 +    </Component>
 189.181 +    <Component class="javax.swing.JButton" name="jButton3">
 189.182 +      <Properties>
 189.183 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.184 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jButton3.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.185 +        </Property>
 189.186 +      </Properties>
 189.187 +    </Component>
 189.188 +    <Component class="javax.swing.JButton" name="jButton4">
 189.189 +      <Properties>
 189.190 +        <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
 189.191 +          <ResourceString bundle="org/netbeans/modules/iep/editor/wizard/database/Bundle.properties" key="DatabaseTableSelectionPanel.jButton4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
 189.192 +        </Property>
 189.193 +      </Properties>
 189.194 +    </Component>
 189.195 +  </SubComponents>
 189.196 +</Form>
   190.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   190.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionPanel.java	Thu Apr 17 15:50:14 2008 +0200
   190.3 @@ -0,0 +1,153 @@
   190.4 +/*
   190.5 + * DatabaseTableSelectionPanel.java
   190.6 + *
   190.7 + * Created on April 15, 2008, 6:29 PM
   190.8 + */
   190.9 +
  190.10 +package org.netbeans.modules.iep.editor.wizard.database;
  190.11 +
  190.12 +/**
  190.13 + *
  190.14 + * @author  radval
  190.15 + */
  190.16 +public class DatabaseTableSelectionPanel extends javax.swing.JPanel {
  190.17 +
  190.18 +    /** Creates new form DatabaseTableSelectionPanel */
  190.19 +    public DatabaseTableSelectionPanel() {
  190.20 +        initComponents();
  190.21 +    }
  190.22 +
  190.23 +    /** This method is called from within the constructor to
  190.24 +     * initialize the form.
  190.25 +     * WARNING: Do NOT modify this code. The content of this method is
  190.26 +     * always regenerated by the Form Editor.
  190.27 +     */
  190.28 +    @SuppressWarnings("unchecked")
  190.29 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  190.30 +    private void initComponents() {
  190.31 +
  190.32 +        jLabel1 = new javax.swing.JLabel();
  190.33 +        jComboBox1 = new javax.swing.JComboBox();
  190.34 +        jLabel2 = new javax.swing.JLabel();
  190.35 +        jScrollPane1 = new javax.swing.JScrollPane();
  190.36 +        jList1 = new javax.swing.JList();
  190.37 +        jLabel3 = new javax.swing.JLabel();
  190.38 +        jScrollPane2 = new javax.swing.JScrollPane();
  190.39 +        jList2 = new javax.swing.JList();
  190.40 +        jButton1 = new javax.swing.JButton();
  190.41 +        jButton2 = new javax.swing.JButton();
  190.42 +        jButton3 = new javax.swing.JButton();
  190.43 +        jButton4 = new javax.swing.JButton();
  190.44 +
  190.45 +        jLabel1.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jLabel1.text")); // NOI18N
  190.46 +
  190.47 +        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
  190.48 +
  190.49 +        jLabel2.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jLabel2.text")); // NOI18N
  190.50 +
  190.51 +        jList1.setModel(new javax.swing.AbstractListModel() {
  190.52 +            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
  190.53 +            public int getSize() { return strings.length; }
  190.54 +            public Object getElementAt(int i) { return strings[i]; }
  190.55 +        });
  190.56 +        jScrollPane1.setViewportView(jList1);
  190.57 +
  190.58 +        jLabel3.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jLabel3.text")); // NOI18N
  190.59 +
  190.60 +        jList2.setModel(new javax.swing.AbstractListModel() {
  190.61 +            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
  190.62 +            public int getSize() { return strings.length; }
  190.63 +            public Object getElementAt(int i) { return strings[i]; }
  190.64 +        });
  190.65 +        jScrollPane2.setViewportView(jList2);
  190.66 +
  190.67 +        jButton1.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jButton1.text")); // NOI18N
  190.68 +        jButton1.addActionListener(new java.awt.event.ActionListener() {
  190.69 +            public void actionPerformed(java.awt.event.ActionEvent evt) {
  190.70 +                jButton1ActionPerformed(evt);
  190.71 +            }
  190.72 +        });
  190.73 +
  190.74 +        jButton2.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jButton2.text")); // NOI18N
  190.75 +
  190.76 +        jButton3.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jButton3.text")); // NOI18N
  190.77 +
  190.78 +        jButton4.setText(org.openide.util.NbBundle.getMessage(DatabaseTableSelectionPanel.class, "DatabaseTableSelectionPanel.jButton4.text")); // NOI18N
  190.79 +
  190.80 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  190.81 +        this.setLayout(layout);
  190.82 +        layout.setHorizontalGroup(
  190.83 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  190.84 +            .add(layout.createSequentialGroup()
  190.85 +                .addContainerGap()
  190.86 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  190.87 +                    .add(layout.createSequentialGroup()
  190.88 +                        .add(jLabel1)
  190.89 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  190.90 +                        .add(jComboBox1, 0, 326, Short.MAX_VALUE)
  190.91 +                        .addContainerGap())
  190.92 +                    .add(layout.createSequentialGroup()
  190.93 +                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  190.94 +                            .add(jLabel2)
  190.95 +                            .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 121, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
  190.96 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
  190.97 +                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  190.98 +                            .add(jButton3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
  190.99 +                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
 190.100 +                            .add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
 190.101 +                            .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE))
 190.102 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 190.103 +                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
 190.104 +                            .add(jLabel3)
 190.105 +                            .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 158, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 190.106 +                        .add(16, 16, 16))))
 190.107 +        );
 190.108 +        layout.setVerticalGroup(
 190.109 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
 190.110 +            .add(layout.createSequentialGroup()
 190.111 +                .addContainerGap()
 190.112 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 190.113 +                    .add(jLabel1)
 190.114 +                    .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
 190.115 +                .add(18, 18, 18)
 190.116 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
 190.117 +                    .add(jLabel2)
 190.118 +                    .add(jLabel3))
 190.119 +                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 190.120 +                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
 190.121 +                    .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
 190.122 +                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
 190.123 +                    .add(layout.createSequentialGroup()
 190.124 +                        .add(52, 52, 52)
 190.125 +                        .add(jButton1)
 190.126 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 190.127 +                        .add(jButton2)
 190.128 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 190.129 +                        .add(jButton3)
 190.130 +                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
 190.131 +                        .add(jButton4)))
 190.132 +                .addContainerGap())
 190.133 +        );
 190.134 +    }// </editor-fold>//GEN-END:initComponents
 190.135 +
 190.136 +private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
 190.137 +// TODO add your handling code here:
 190.138 +}//GEN-LAST:event_jButton1ActionPerformed
 190.139 +
 190.140 +
 190.141 +    // Variables declaration - do not modify//GEN-BEGIN:variables
 190.142 +    private javax.swing.JButton jButton1;
 190.143 +    private javax.swing.JButton jButton2;
 190.144 +    private javax.swing.JButton jButton3;
 190.145 +    private javax.swing.JButton jButton4;
 190.146 +    private javax.swing.JComboBox jComboBox1;
 190.147 +    private javax.swing.JLabel jLabel1;
 190.148 +    private javax.swing.JLabel jLabel2;
 190.149 +    private javax.swing.JLabel jLabel3;
 190.150 +    private javax.swing.JList jList1;
 190.151 +    private javax.swing.JList jList2;
 190.152 +    private javax.swing.JScrollPane jScrollPane1;
 190.153 +    private javax.swing.JScrollPane jScrollPane2;
 190.154 +    // End of variables declaration//GEN-END:variables
 190.155 +
 190.156 +}
   191.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   191.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel1.form	Thu Apr 17 15:50:14 2008 +0200
   191.3 @@ -0,0 +1,27 @@
   191.4 +<?xml version="1.0" encoding="UTF-8" ?>
   191.5 +
   191.6 +<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   191.7 +  <AuxValues>
   191.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   191.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  191.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
  191.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
  191.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  191.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  191.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  191.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  191.16 +  </AuxValues>
  191.17 +
  191.18 +  <Layout>
  191.19 +    <DimensionLayout dim="0">
  191.20 +      <Group type="103" groupAlignment="0" attributes="0">
  191.21 +          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
  191.22 +      </Group>
  191.23 +    </DimensionLayout>
  191.24 +    <DimensionLayout dim="1">
  191.25 +      <Group type="103" groupAlignment="0" attributes="0">
  191.26 +          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
  191.27 +      </Group>
  191.28 +    </DimensionLayout>
  191.29 +  </Layout>
  191.30 +</Form>
   192.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   192.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel1.java	Thu Apr 17 15:50:14 2008 +0200
   192.3 @@ -0,0 +1,54 @@
   192.4 +/*
   192.5 + * To change this template, choose Tools | Templates
   192.6 + * and open the template in the editor.
   192.7 + */
   192.8 +
   192.9 +package org.netbeans.modules.iep.editor.wizard.database;
  192.10 +
  192.11 +import java.awt.BorderLayout;
  192.12 +import javax.swing.JPanel;
  192.13 +
  192.14 +public final class DatabaseTableSelectionVisualPanel1 extends JPanel {
  192.15 +
  192.16 +    private DatabaseTableSelectionPanel mDBTableSelectionPanel;
  192.17 +    
  192.18 +    /** Creates new form DatabaseTableSelectionVisualPanel1 */
  192.19 +    public DatabaseTableSelectionVisualPanel1() {
  192.20 +        initComponents();
  192.21 +        init();
  192.22 +    }
  192.23 +
  192.24 +    @Override
  192.25 +    public String getName() {
  192.26 +        return "Step #1";
  192.27 +    }
  192.28 +
  192.29 +    private void init() {
  192.30 +        this.setLayout(new BorderLayout());
  192.31 +        mDBTableSelectionPanel = new DatabaseTableSelectionPanel();
  192.32 +        this.add(mDBTableSelectionPanel, BorderLayout.CENTER);
  192.33 +    }
  192.34 +    
  192.35 +    /** This method is called from within the constructor to
  192.36 +     * initialize the form.
  192.37 +     * WARNING: Do NOT modify this code. The content of this method is
  192.38 +     * always regenerated by the Form Editor.
  192.39 +     */
  192.40 +    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  192.41 +    private void initComponents() {
  192.42 +
  192.43 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  192.44 +        this.setLayout(layout);
  192.45 +        layout.setHorizontalGroup(
  192.46 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  192.47 +            .add(0, 400, Short.MAX_VALUE)
  192.48 +        );
  192.49 +        layout.setVerticalGroup(
  192.50 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  192.51 +            .add(0, 300, Short.MAX_VALUE)
  192.52 +        );
  192.53 +    }// </editor-fold>//GEN-END:initComponents
  192.54 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  192.55 +    // End of variables declaration//GEN-END:variables
  192.56 +}
  192.57 +
   193.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   193.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel2.form	Thu Apr 17 15:50:14 2008 +0200
   193.3 @@ -0,0 +1,27 @@
   193.4 +<?xml version="1.0" encoding="UTF-8" ?>
   193.5 +
   193.6 +<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   193.7 +  <AuxValues>
   193.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   193.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  193.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
  193.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
  193.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  193.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  193.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  193.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  193.16 +  </AuxValues>
  193.17 +
  193.18 +  <Layout>
  193.19 +    <DimensionLayout dim="0">
  193.20 +      <Group type="103" groupAlignment="0" attributes="0">
  193.21 +          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
  193.22 +      </Group>
  193.23 +    </DimensionLayout>
  193.24 +    <DimensionLayout dim="1">
  193.25 +      <Group type="103" groupAlignment="0" attributes="0">
  193.26 +          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
  193.27 +      </Group>
  193.28 +    </DimensionLayout>
  193.29 +  </Layout>
  193.30 +</Form>
   194.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   194.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel2.java	Thu Apr 17 15:50:14 2008 +0200
   194.3 @@ -0,0 +1,56 @@
   194.4 +/*
   194.5 + * To change this template, choose Tools | Templates
   194.6 + * and open the template in the editor.
   194.7 + */
   194.8 +
   194.9 +package org.netbeans.modules.iep.editor.wizard.database;
  194.10 +
  194.11 +import java.awt.BorderLayout;
  194.12 +import javax.swing.JPanel;
  194.13 +
  194.14 +public final class DatabaseTableSelectionVisualPanel2 extends JPanel {
  194.15 +
  194.16 +    private DatabaseTableColumnSelectionPanel mDBTableColumnSelectionPanel;
  194.17 +    
  194.18 +    /** Creates new form DatabaseTableSelectionVisualPanel2 */
  194.19 +    public DatabaseTableSelectionVisualPanel2() {
  194.20 +        initComponents();
  194.21 +        init();
  194.22 +    }
  194.23 +
  194.24 +    @Override
  194.25 +    public String getName() {
  194.26 +        return "Step #2";
  194.27 +    }
  194.28 +    
  194.29 +    private void init() {
  194.30 +        this.setLayout(new BorderLayout());
  194.31 +        mDBTableColumnSelectionPanel = new DatabaseTableColumnSelectionPanel();
  194.32 +        this.add(mDBTableColumnSelectionPanel, BorderLayout.CENTER);
  194.33 +        
  194.34 +        
  194.35 +    }
  194.36 +
  194.37 +    /** This method is called from within the constructor to
  194.38 +     * initialize the form.
  194.39 +     * WARNING: Do NOT modify this code. The content of this method is
  194.40 +     * always regenerated by the Form Editor.
  194.41 +     */
  194.42 +    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  194.43 +    private void initComponents() {
  194.44 +
  194.45 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  194.46 +        this.setLayout(layout);
  194.47 +        layout.setHorizontalGroup(
  194.48 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  194.49 +            .add(0, 400, Short.MAX_VALUE)
  194.50 +        );
  194.51 +        layout.setVerticalGroup(
  194.52 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  194.53 +            .add(0, 300, Short.MAX_VALUE)
  194.54 +        );
  194.55 +    }// </editor-fold>//GEN-END:initComponents
  194.56 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  194.57 +    // End of variables declaration//GEN-END:variables
  194.58 +}
  194.59 +
   195.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   195.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel3.form	Thu Apr 17 15:50:14 2008 +0200
   195.3 @@ -0,0 +1,27 @@
   195.4 +<?xml version="1.0" encoding="UTF-8" ?>
   195.5 +
   195.6 +<Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
   195.7 +  <AuxValues>
   195.8 +    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
   195.9 +    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
  195.10 +    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
  195.11 +    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
  195.12 +    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
  195.13 +    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
  195.14 +    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
  195.15 +    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
  195.16 +  </AuxValues>
  195.17 +
  195.18 +  <Layout>
  195.19 +    <DimensionLayout dim="0">
  195.20 +      <Group type="103" groupAlignment="0" attributes="0">
  195.21 +          <EmptySpace min="0" pref="400" max="32767" attributes="0"/>
  195.22 +      </Group>
  195.23 +    </DimensionLayout>
  195.24 +    <DimensionLayout dim="1">
  195.25 +      <Group type="103" groupAlignment="0" attributes="0">
  195.26 +          <EmptySpace min="0" pref="300" max="32767" attributes="0"/>
  195.27 +      </Group>
  195.28 +    </DimensionLayout>
  195.29 +  </Layout>
  195.30 +</Form>
   196.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   196.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionVisualPanel3.java	Thu Apr 17 15:50:14 2008 +0200
   196.3 @@ -0,0 +1,44 @@
   196.4 +/*
   196.5 + * To change this template, choose Tools | Templates
   196.6 + * and open the template in the editor.
   196.7 + */
   196.8 +
   196.9 +package org.netbeans.modules.iep.editor.wizard.database;
  196.10 +
  196.11 +import javax.swing.JPanel;
  196.12 +
  196.13 +public final class DatabaseTableSelectionVisualPanel3 extends JPanel {
  196.14 +
  196.15 +    /** Creates new form DatabaseTableSelectionVisualPanel3 */
  196.16 +    public DatabaseTableSelectionVisualPanel3() {
  196.17 +        initComponents();
  196.18 +    }
  196.19 +
  196.20 +    @Override
  196.21 +    public String getName() {
  196.22 +        return "Step #3";
  196.23 +    }
  196.24 +
  196.25 +    /** This method is called from within the constructor to
  196.26 +     * initialize the form.
  196.27 +     * WARNING: Do NOT modify this code. The content of this method is
  196.28 +     * always regenerated by the Form Editor.
  196.29 +     */
  196.30 +    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  196.31 +    private void initComponents() {
  196.32 +
  196.33 +        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  196.34 +        this.setLayout(layout);
  196.35 +        layout.setHorizontalGroup(
  196.36 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  196.37 +            .add(0, 400, Short.MAX_VALUE)
  196.38 +        );
  196.39 +        layout.setVerticalGroup(
  196.40 +            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
  196.41 +            .add(0, 300, Short.MAX_VALUE)
  196.42 +        );
  196.43 +    }// </editor-fold>//GEN-END:initComponents
  196.44 +    // Variables declaration - do not modify//GEN-BEGIN:variables
  196.45 +    // End of variables declaration//GEN-END:variables
  196.46 +}
  196.47 +
   197.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   197.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionWizardAction.java	Thu Apr 17 15:50:14 2008 +0200
   197.3 @@ -0,0 +1,90 @@
   197.4 +/*
   197.5 + * To change this template, choose Tools | Templates
   197.6 + * and open the template in the editor.
   197.7 + */
   197.8 +package org.netbeans.modules.iep.editor.wizard.database;
   197.9 +
  197.10 +import java.awt.Component;
  197.11 +import java.awt.Dialog;
  197.12 +import java.text.MessageFormat;
  197.13 +import javax.swing.JComponent;
  197.14 +import org.openide.DialogDisplayer;
  197.15 +import org.openide.WizardDescriptor;
  197.16 +import org.openide.util.HelpCtx;
  197.17 +import org.openide.util.actions.CallableSystemAction;
  197.18 +
  197.19 +// An example action demonstrating how the wizard could be called from within
  197.20 +// your code. You can copy-paste the code below wherever you need.
  197.21 +public final class DatabaseTableSelectionWizardAction extends CallableSystemAction {
  197.22 +
  197.23 +    private WizardDescriptor.Panel[] panels;
  197.24 +
  197.25 +    public void performAction() {
  197.26 +        WizardDescriptor wizardDescriptor = new WizardDescriptor(getPanels());
  197.27 +        // {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
  197.28 +        wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
  197.29 +        wizardDescriptor.setTitle("Your wizard dialog title here");
  197.30 +        Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
  197.31 +        dialog.setVisible(true);
  197.32 +        dialog.toFront();
  197.33 +        boolean cancelled = wizardDescriptor.getValue() != WizardDescriptor.FINISH_OPTION;
  197.34 +        if (!cancelled) {
  197.35 +            // do something
  197.36 +        }
  197.37 +    }
  197.38 +
  197.39 +    /**
  197.40 +     * Initialize panels representing individual wizard's steps and sets
  197.41 +     * various properties for them influencing wizard appearance.
  197.42 +     */
  197.43 +    private WizardDescriptor.Panel[] getPanels() {
  197.44 +        if (panels == null) {
  197.45 +            panels = new WizardDescriptor.Panel[]{
  197.46 +                        new DatabaseTableSelectionWizardPanel1(),
  197.47 +                        new DatabaseTableSelectionWizardPanel2(),
  197.48 +                        new DatabaseTableSelectionWizardPanel3()
  197.49 +                    };
  197.50 +            String[] steps = new String[panels.length];
  197.51 +            for (int i = 0; i < panels.length; i++) {
  197.52 +                Component c = panels[i].getComponent();
  197.53 +                // Default step name to component name of panel. Mainly useful
  197.54 +                // for getting the name of the target chooser to appear in the
  197.55 +                // list of steps.
  197.56 +                steps[i] = c.getName();
  197.57 +                if (c instanceof JComponent) { // assume Swing components
  197.58 +
  197.59 +                    JComponent jc = (JComponent) c;
  197.60 +                    // Sets step number of a component
  197.61 +                    jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i));
  197.62 +                    // Sets steps names for a panel
  197.63 +                    jc.putClientProperty("WizardPanel_contentData", steps);
  197.64 +                    // Turn on subtitle creation on each step
  197.65 +                    jc.putClientProperty("WizardPanel_autoWizardStyle", Boolean.TRUE);
  197.66 +                    // Show steps on the left side with the image on the background
  197.67 +                    jc.putClientProperty("WizardPanel_contentDisplayed", Boolean.TRUE);
  197.68 +                    // Turn on numbering of all steps
  197.69 +                    jc.putClientProperty("WizardPanel_contentNumbered", Boolean.TRUE);
  197.70 +                }
  197.71 +            }
  197.72 +        }
  197.73 +        return panels;
  197.74 +    }
  197.75 +
  197.76 +    public String getName() {
  197.77 +        return "Start Sample Wizard";
  197.78 +    }
  197.79 +
  197.80 +    @Override
  197.81 +    public String iconResource() {
  197.82 +        return null;
  197.83 +    }
  197.84 +
  197.85 +    public HelpCtx getHelpCtx() {
  197.86 +        return HelpCtx.DEFAULT_HELP;
  197.87 +    }
  197.88 +
  197.89 +    @Override
  197.90 +    protected boolean asynchronous() {
  197.91 +        return false;
  197.92 +    }
  197.93 +}
   198.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   198.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionWizardPanel1.java	Thu Apr 17 15:50:14 2008 +0200
   198.3 @@ -0,0 +1,87 @@
   198.4 +/*
   198.5 + * To change this template, choose Tools | Templates
   198.6 + * and open the template in the editor.
   198.7 + */
   198.8 +package org.netbeans.modules.iep.editor.wizard.database;
   198.9 +
  198.10 +import java.awt.Component;
  198.11 +import javax.swing.event.ChangeListener;
  198.12 +import org.openide.WizardDescriptor;
  198.13 +import org.openide.util.HelpCtx;
  198.14 +
  198.15 +public class DatabaseTableSelectionWizardPanel1 implements WizardDescriptor.Panel {
  198.16 +
  198.17 +    /**
  198.18 +     * The visual component that displays this panel. If you need to access the
  198.19 +     * component from this class, just use getComponent().
  198.20 +     */
  198.21 +    private Component component;
  198.22 +
  198.23 +    // Get the visual component for the panel. In this template, the component
  198.24 +    // is kept separate. This can be more efficient: if the wizard is created
  198.25 +    // but never displayed, or not all panels are displayed, it is better to
  198.26 +    // create only those which really need to be visible.
  198.27 +    public Component getComponent() {
  198.28 +        if (component == null) {
  198.29 +            component = new DatabaseTableSelectionVisualPanel1();
  198.30 +        }
  198.31 +        return component;
  198.32 +    }
  198.33 +
  198.34 +    public HelpCtx getHelp() {
  198.35 +        // Show no Help button for this panel:
  198.36 +        return HelpCtx.DEFAULT_HELP;
  198.37 +    // If you have context help:
  198.38 +    // return new HelpCtx(SampleWizardPanel1.class);
  198.39 +    }
  198.40 +
  198.41 +    public boolean isValid() {
  198.42 +        // If it is always OK to press Next or Finish, then:
  198.43 +        return true;
  198.44 +    // If it depends on some condition (form filled out...), then:
  198.45 +    // return someCondition();
  198.46 +    // and when this condition changes (last form field filled in...) then:
  198.47 +    // fireChangeEvent();
  198.48 +    // and uncomment the complicated stuff below.
  198.49 +    }
  198.50 +
  198.51 +    public final void addChangeListener(ChangeListener l) {
  198.52 +    }
  198.53 +
  198.54 +    public final void removeChangeListener(ChangeListener l) {
  198.55 +    }
  198.56 +    /*
  198.57 +    private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); // or can use ChangeSupport in NB 6.0
  198.58 +    public final void addChangeListener(ChangeListener l) {
  198.59 +    synchronized (listeners) {
  198.60 +    listeners.add(l);
  198.61 +    }
  198.62 +    }
  198.63 +    public final void removeChangeListener(ChangeListener l) {
  198.64 +    synchronized (listeners) {
  198.65 +    listeners.remove(l);
  198.66 +    }
  198.67 +    }
  198.68 +    protected final void fireChangeEvent() {
  198.69 +    Iterator<ChangeListener> it;
  198.70 +    synchronized (listeners) {
  198.71 +    it = new HashSet<ChangeListener>(listeners).iterator();
  198.72 +    }
  198.73 +    ChangeEvent ev = new ChangeEvent(this);
  198.74 +    while (it.hasNext()) {
  198.75 +    it.next().stateChanged(ev);
  198.76 +    }
  198.77 +    }
  198.78 +     */
  198.79 +
  198.80 +    // You can use a settings object to keep track of state. Normally the
  198.81 +    // settings object will be the WizardDescriptor, so you can use
  198.82 +    // WizardDescriptor.getProperty & putProperty to store information entered
  198.83 +    // by the user.
  198.84 +    public void readSettings(Object settings) {
  198.85 +    }
  198.86 +
  198.87 +    public void storeSettings(Object settings) {
  198.88 +    }
  198.89 +}
  198.90 +
   199.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   199.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionWizardPanel2.java	Thu Apr 17 15:50:14 2008 +0200
   199.3 @@ -0,0 +1,87 @@
   199.4 +/*
   199.5 + * To change this template, choose Tools | Templates
   199.6 + * and open the template in the editor.
   199.7 + */
   199.8 +package org.netbeans.modules.iep.editor.wizard.database;
   199.9 +
  199.10 +import java.awt.Component;
  199.11 +import javax.swing.event.ChangeListener;
  199.12 +import org.openide.WizardDescriptor;
  199.13 +import org.openide.util.HelpCtx;
  199.14 +
  199.15 +public class DatabaseTableSelectionWizardPanel2 implements WizardDescriptor.Panel {
  199.16 +
  199.17 +    /**
  199.18 +     * The visual component that displays this panel. If you need to access the
  199.19 +     * component from this class, just use getComponent().
  199.20 +     */
  199.21 +    private Component component;
  199.22 +
  199.23 +    // Get the visual component for the panel. In this template, the component
  199.24 +    // is kept separate. This can be more efficient: if the wizard is created
  199.25 +    // but never displayed, or not all panels are displayed, it is better to
  199.26 +    // create only those which really need to be visible.
  199.27 +    public Component getComponent() {
  199.28 +        if (component == null) {
  199.29 +            component = new DatabaseTableSelectionVisualPanel2();
  199.30 +        }
  199.31 +        return component;
  199.32 +    }
  199.33 +
  199.34 +    public HelpCtx getHelp() {
  199.35 +        // Show no Help button for this panel:
  199.36 +        return HelpCtx.DEFAULT_HELP;
  199.37 +    // If you have context help:
  199.38 +    // return new HelpCtx(SampleWizardPanel1.class);
  199.39 +    }
  199.40 +
  199.41 +    public boolean isValid() {
  199.42 +        // If it is always OK to press Next or Finish, then:
  199.43 +        return true;
  199.44 +    // If it depends on some condition (form filled out...), then:
  199.45 +    // return someCondition();
  199.46 +    // and when this condition changes (last form field filled in...) then:
  199.47 +    // fireChangeEvent();
  199.48 +    // and uncomment the complicated stuff below.
  199.49 +    }
  199.50 +
  199.51 +    public final void addChangeListener(ChangeListener l) {
  199.52 +    }
  199.53 +
  199.54 +    public final void removeChangeListener(ChangeListener l) {
  199.55 +    }
  199.56 +    /*
  199.57 +    private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); // or can use ChangeSupport in NB 6.0
  199.58 +    public final void addChangeListener(ChangeListener l) {
  199.59 +    synchronized (listeners) {
  199.60 +    listeners.add(l);
  199.61 +    }
  199.62 +    }
  199.63 +    public final void removeChangeListener(ChangeListener l) {
  199.64 +    synchronized (listeners) {
  199.65 +    listeners.remove(l);
  199.66 +    }
  199.67 +    }
  199.68 +    protected final void fireChangeEvent() {
  199.69 +    Iterator<ChangeListener> it;
  199.70 +    synchronized (listeners) {
  199.71 +    it = new HashSet<ChangeListener>(listeners).iterator();
  199.72 +    }
  199.73 +    ChangeEvent ev = new ChangeEvent(this);
  199.74 +    while (it.hasNext()) {
  199.75 +    it.next().stateChanged(ev);
  199.76 +    }
  199.77 +    }
  199.78 +     */
  199.79 +
  199.80 +    // You can use a settings object to keep track of state. Normally the
  199.81 +    // settings object will be the WizardDescriptor, so you can use
  199.82 +    // WizardDescriptor.getProperty & putProperty to store information entered
  199.83 +    // by the user.
  199.84 +    public void readSettings(Object settings) {
  199.85 +    }
  199.86 +
  199.87 +    public void storeSettings(Object settings) {
  199.88 +    }
  199.89 +}
  199.90 +
   200.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   200.2 +++ b/iep.editor/src/org/netbeans/modules/iep/editor/wizard/database/DatabaseTableSelectionWizardPanel3.java	Thu Apr 17 15:50:14 2008 +0200
   200.3 @@ -0,0 +1,87 @@
   200.4 +/*
   200.5 + * To change this template, choose Tools | Templates
   200.6 + * and open the template in the editor.
   200.7 + */
   200.8 +package org.netbeans.modules.iep.editor.wizard.database;
   200.9 +
  200.10 +import java.awt.Component;
  200.11 +import javax.swing.event.ChangeListener;
  200.12 +import org.openide.WizardDescriptor;
  200.13 +import org.openide.util.HelpCtx;
  200.14 +
  200.15 +public class DatabaseTableSelectionWizardPanel3 implements WizardDescriptor.Panel {
  200.16 +
  200.17 +    /**
  200.18 +     * The visual component that displays this panel. If you need to access the
  200.19 +     * component from this class, just use getComponent().
  200.20 +     */
  200.21 +    private Component component;
  200.22 +
  200.23 +    // Get the visual component for the panel. In this template, the component
  200.24 +    // is kept separate. This can be more efficient: if the wizard is created
  200.25 +    // but never displayed, or not all panels are displayed, it is better to
  200.26 +    // create only those which really need to be visible.
  200.27 +    public Component getComponent() {
  200.28 +        if (component == null) {
  200.29 +            component = new DatabaseTableSelectionVisualPanel3();
  200.30 +        }
  200.31 +        return component;
  200.32 +    }
  200.33 +
  200.34 +    public HelpCtx getHelp() {
  200.35 +        // Show no Help button for this panel:
  200.36 +        return HelpCtx.DEFAULT_HELP;
  200.37 +    // If you have context help:
  200.38 +    // return new HelpCtx(SampleWizardPanel1.class);
  200.39 +    }
  200.40 +
  200.41 +    public boolean isValid() {
  200.42 +        // If it is always OK to press Next or Finish, then:
  200.43 +        return true;
  200.44 +    // If it depends on some condition (form filled out...), then:
  200.45 +    // return someCondition();
  200.46 +    // and when this condition changes (last form field filled in...) then:
  200.47 +    // fireChangeEvent();
  200.48 +    // and uncomment the complicated stuff below.
  200.49 +    }
  200.50 +
  200.51 +    public final void addChangeListener(ChangeListener l) {
  200.52 +    }
  200.53 +
  200.54 +    public final void removeChangeListener(ChangeListener l) {
  200.55 +    }
  200.56 +    /*
  200.57 +    private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); // or can use ChangeSupport in NB 6.0
  200.58 +    public final void addChangeListener(ChangeListener l) {
  200.59 +    synchronized (listeners) {
  200.60 +    listeners.add(l);
  200.61 +    }
  200.62 +    }
  200.63 +    public final void removeChangeListener(ChangeListener l) {
  200.64 +    synchronized (listeners) {
  200.65 +    listeners.remove(l);
  200.66 +    }
  200.67 +    }
  200.68 +    protected final void fireChangeEvent() {
  200.69 +    Iterator<ChangeListener> it;
  200.70 +    synchronized (listeners) {
  200.71 +    it = new HashSet<ChangeListener>(listeners).iterator();
  200.72 +    }
  200.73 +    ChangeEvent ev = new ChangeEvent(this);
  200.74 +    while (it.hasNext()) {
  200.75 +    it.next().stateChanged(ev);
  200.76 +    }
  200.77 +    }
  200.78 +     */
  200.79 +
  200.80 +    // You can use a settings object to keep track of state. Normally the
  200.81 +    // settings object will be the WizardDescriptor, so you can use
  200.82 +    // WizardDescriptor.getProperty & putProperty to store information entered
  200.83 +    // by the user.
  200.84 +    public void readSettings(Object settings) {
  200.85 +    }
  200.86 +
  200.87 +    public void storeSettings(Object settings) {
  200.88 +    }
  200.89 +}
  200.90 +
   201.1 --- a/iep.editor/src/vm/iep/library.xml	Thu Apr 17 10:51:04 2008 +0200
   201.2 +++ b/iep.editor/src/vm/iep/library.xml	Thu Apr 17 15:50:14 2008 +0200
   201.3 @@ -658,5 +658,27 @@
   201.4              <!--<property transient="false" category="IEP.Category.main" name="whereClause" title="IEP.Operator.StreamProjectionAndFilter.whereClause.title" description="IEP.Operator.StreamProjectionAndFilter.whereClause.description" required="false" type="string" editor="default" default="" renderer="string" access="" multiple="false"/> -->
   201.5              <!--<code type="xml" file="vm/iep/external/invokeStream.xml"/>-->
   201.6          </component_type>
   201.7 +        
   201.8 +        <!-- external db polling operator -->
   201.9 +        <component_type name="ExternalTablePollingStream" icon="streamInputx32.png" title="IEP.External.ExternalTablePollingStream.title" description="IEP.External.ExternalTablePollingStream.description" allowsChildren="false" visible="true" validator="org.netbeans.modules.iep.editor.model.DefaultOperatorValidator">
  201.10 +            <property_group ref="/IEP/View/Node"/>
  201.11 +            <property_group ref="/IEP/Model/Entity">
  201.12 +                <property name="propertyEditor" editor="org.netbeans.modules.iep.editor.ps.ExternalTablePollingStreamCustomEditor"/>
  201.13 +                <property name="inputSchemaIdList" access="" />
  201.14 +                <property name="inputType" access="" />
  201.15 +                <property name="inputMaxCount" access="" />
  201.16 +                <property name="inputIdList" access="" />
  201.17 +                <property name="staticInputMaxCount" access="" />
  201.18 +    	        <property name="staticInputIdList" access="" />
  201.19 +                <property name="type" default="i18n.IEP.Input.StreamInput.title"/>
  201.20 +                <property name="outputType" default="i18n.IEP.IOType.stream"/>
  201.21 +                <property name="outputSchemaId" required="true"/>
  201.22 +                <property name="isSchemaOwner" default="true"/>
  201.23 +                <!--<property name="wsInput" default="true"/>-->
  201.24 +                <property name="palette" default="external"/>
  201.25 +                <property name="helpID" default="iep_streaminput_prop"/>
  201.26 +            </property_group>
  201.27 +            <code type="xml" file="vm/iep/input/streamInput.xml"/>
  201.28 +        </component_type>
  201.29        </component_type_group>
  201.30  </component_type_group>
  201.31 \ No newline at end of file
   202.1 --- a/soa.kit/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   202.2 +++ b/soa.kit/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   202.3 @@ -31,6 +31,13 @@
   202.4                          <specification-version>1.1</specification-version>
   202.5                      </run-dependency>
   202.6                  </dependency>
   202.7 +                <dependency>
   202.8 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
   202.9 +                    <run-dependency>
  202.10 +                        <release-version>1</release-version>
  202.11 +                        <specification-version>1.1</specification-version>
  202.12 +                    </run-dependency>
  202.13 +                </dependency>
  202.14                  <!-- <dependency>
  202.15                      <code-name-base>org.netbeans.modules.sql.help</code-name-base>
  202.16                      <run-dependency>
   203.1 --- a/soa.mappercore/nbproject/project.properties	Thu Apr 17 10:51:04 2008 +0200
   203.2 +++ b/soa.mappercore/nbproject/project.properties	Thu Apr 17 15:50:14 2008 +0200
   203.3 @@ -18,7 +18,4 @@
   203.4  
   203.5  javac.source=1.5
   203.6  javac.compilerargs=-Xlint -Xlint:-serial
   203.7 -
   203.8  sigtest.fail.on.error=false
   203.9 -
  203.10 -
   204.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/AutoScrollSelectionRightTree.java	Thu Apr 17 10:51:04 2008 +0200
   204.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/AutoScrollSelectionRightTree.java	Thu Apr 17 15:50:14 2008 +0200
   204.3 @@ -8,6 +8,7 @@
   204.4  import javax.swing.tree.TreePath;
   204.5  import org.netbeans.modules.soa.mappercore.event.MapperSelectionEvent;
   204.6  import org.netbeans.modules.soa.mappercore.event.MapperSelectionListener;
   204.7 +import org.netbeans.modules.soa.mappercore.utils.Utils;
   204.8  
   204.9  /**
  204.10   *
  204.11 @@ -25,7 +26,7 @@
  204.12  
  204.13      public void mapperSelectionChanged(MapperSelectionEvent event) {
  204.14          TreePath treePath = rightTree.getSelectionModel().getSelectedPath();
  204.15 -        if (treePath == currentPath) { return; }
  204.16 +        if (Utils.equal(treePath, currentPath)) { return; }
  204.17          
  204.18          currentPath = treePath;
  204.19          if (treePath == null) { return; }
   205.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/AutoSelectionCanvas.java	Thu Apr 17 10:51:04 2008 +0200
   205.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/AutoSelectionCanvas.java	Thu Apr 17 15:50:14 2008 +0200
   205.3 @@ -47,6 +47,7 @@
   205.4  import org.netbeans.modules.soa.mappercore.model.Link;
   205.5  import org.netbeans.modules.soa.mappercore.model.TreeSourcePin;
   205.6  import org.netbeans.modules.soa.mappercore.model.Vertex;
   205.7 +import org.netbeans.modules.soa.mappercore.utils.Utils;
   205.8  
   205.9  /**
  205.10   *
  205.11 @@ -85,7 +86,9 @@
  205.12          
  205.13          if (vertexes != null && vertexes.size() > 0) {
  205.14              Vertex vertex = vertexes.get(0);
  205.15 -            if (vertex != currentVertex || (treePath != currentPath && vertex == currentVertex)) {
  205.16 +            if (vertex != currentVertex || 
  205.17 +                    (!(Utils.equal(treePath, currentPath) && vertex == currentVertex))) 
  205.18 +            {
  205.19                  
  205.20                  currentVertex = vertex;
  205.21                  if (mapper.getNode(treePath, true).isGraphCollapsed()) {
   206.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/Canvas.java	Thu Apr 17 10:51:04 2008 +0200
   206.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/Canvas.java	Thu Apr 17 15:50:14 2008 +0200
   206.3 @@ -155,6 +155,10 @@
   206.4                  return str;
   206.5              }
   206.6          }
   206.7 +        
   206.8 +        if (graphItem instanceof Link) {
   206.9 +            return "Link";
  206.10 +        }
  206.11          return null;
  206.12      }
  206.13       
  206.14 @@ -319,7 +323,18 @@
  206.15          Rectangle viewRect = scrollPane.getViewport().getViewRect();
  206.16          return graphX - getGraphViewPositionX() + viewRect.x + viewRect.width;
  206.17      }
  206.18 -
  206.19 +    
  206.20 +    public int toGraphY(int canvasY) {
  206.21 +        MapperNode node = getNodeAt(canvasY);
  206.22 +                
  206.23 +        int graphY = node.getY();
  206.24 +        while (node.getParent() != null) {
  206.25 +            node = node.getParent();
  206.26 +            graphY = graphY + node.getY();
  206.27 +        }
  206.28 +        return graphY;
  206.29 +    }
  206.30 +    
  206.31      @Override
  206.32      public void paintComponent(Graphics g) {
  206.33          super.paintComponent(g);
   207.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/CanvasEventHandler.java	Thu Apr 17 10:51:04 2008 +0200
   207.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/CanvasEventHandler.java	Thu Apr 17 15:50:14 2008 +0200
   207.3 @@ -18,9 +18,13 @@
   207.4   */
   207.5  package org.netbeans.modules.soa.mappercore;
   207.6  
   207.7 +import java.awt.Cursor;
   207.8 +import java.awt.Rectangle;
   207.9  import java.awt.datatransfer.Transferable;
  207.10  import java.awt.event.MouseEvent;
  207.11  import javax.swing.tree.TreePath;
  207.12 +import org.netbeans.modules.soa.mappercore.model.Constant;
  207.13 +import org.netbeans.modules.soa.mappercore.model.Function;
  207.14  import org.netbeans.modules.soa.mappercore.model.Graph;
  207.15  import org.netbeans.modules.soa.mappercore.model.GraphItem;
  207.16  import org.netbeans.modules.soa.mappercore.model.Link;
  207.17 @@ -37,6 +41,7 @@
  207.18  public class CanvasEventHandler extends AbstractMapperEventHandler {
  207.19  
  207.20      private MouseEvent initialEvent = null;
  207.21 +    private Vertex resizingVertex = null;
  207.22      
  207.23      public CanvasEventHandler(Canvas canvas) {
  207.24          super(canvas.getMapper(), canvas);
  207.25 @@ -45,7 +50,7 @@
  207.26  
  207.27      private void reset() {
  207.28          initialEvent = null;
  207.29 -
  207.30 +        resizingVertex = null;
  207.31      }
  207.32  
  207.33      public void mouseReleased(MouseEvent e) {
  207.34 @@ -102,7 +107,65 @@
  207.35      }
  207.36  
  207.37      public void mouseDragged(MouseEvent e) {
  207.38 -        if ((initialEvent != null) && (initialEvent.getPoint().distance(e.getPoint()) >= 5)) {
  207.39 +        if (initialEvent != null && resizingVertex == null) {
  207.40 +            int x = e.getX();
  207.41 +            int y = e.getY();
  207.42 +            
  207.43 +            CanvasSearchResult searchResult = getCanvas().find(x, y);
  207.44 +
  207.45 +            if (searchResult != null) {
  207.46 +                GraphItem item = searchResult.getGraphItem();
  207.47 +                Rectangle r = null;
  207.48 +
  207.49 +                if (item instanceof Function) {
  207.50 +                    r = ((Function) item).getBounds();
  207.51 +                }
  207.52 +                
  207.53 +                if (item instanceof VertexItem &&
  207.54 +                        ((VertexItem) item).getVertex() instanceof Constant) {
  207.55 +                    r = ((VertexItem) item).getVertex().getBounds();
  207.56 +                }
  207.57 +                
  207.58 +                if (r != null) {
  207.59 +                    int tx = r.x + r.width;
  207.60 +                    int ty = r.y + r.height;
  207.61 +
  207.62 +                    int step = getCanvas().getStep();
  207.63 +                    int graphY = getCanvas().toGraphY(y);
  207.64 +
  207.65 +                    graphY = graphY + (step - 1) / 2 + 1;
  207.66 +
  207.67 +                    tx = getCanvas().toCanvas(tx * step);
  207.68 +                    ty = ty * step + graphY;
  207.69 +
  207.70 +                    int dx = tx - x;
  207.71 +                    int dy = ty - y;
  207.72 +
  207.73 +                    if (dx > 0 && dy > 0 && dx + dy < step) {
  207.74 +                        if (item instanceof Vertex) {
  207.75 +                            resizingVertex = (Vertex) item;
  207.76 +                        } else {
  207.77 +                            resizingVertex = ((VertexItem) item).getVertex();
  207.78 +                        }
  207.79 +                    }
  207.80 +                }
  207.81 +            }
  207.82 +        }
  207.83 +    
  207.84 +        
  207.85 +        if (resizingVertex != null) {
  207.86 +            int step = getCanvas().getStep();
  207.87 +            
  207.88 +            int x =  getCanvas().toGraph(e.getX()) / step;
  207.89 +            int x0 = resizingVertex.getX();
  207.90 +            
  207.91 +            resizingVertex.setWidth(x - x0);
  207.92 +            
  207.93 +            getCanvas().repaint();
  207.94 +            return;
  207.95 +       }
  207.96 +
  207.97 +       if ((initialEvent != null) && (initialEvent.getPoint().distance(e.getPoint()) >= 5)) {
  207.98  
  207.99              LinkTool linkTool = getMapper().getLinkTool();
 207.100              MoveTool moveTool = getMapper().getMoveTool();
 207.101 @@ -160,6 +223,54 @@
 207.102          }
 207.103      }
 207.104  
 207.105 +    @Override
 207.106 +    public void mouseMoved(MouseEvent e) {
 207.107 +        int x = e.getX();
 207.108 +        int y = e.getY();
 207.109 +        
 207.110 +        CanvasSearchResult searchResult = getCanvas().find(x, y);
 207.111 +
 207.112 +        if (searchResult != null) {
 207.113 +            GraphItem item = searchResult.getGraphItem();
 207.114 +            Rectangle r = null;
 207.115 +
 207.116 +            if (item instanceof Function) {
 207.117 +                r = ((Function) item).getBounds();
 207.118 +            }
 207.119 +
 207.120 +            if (item instanceof VertexItem &&
 207.121 +                    ((VertexItem) item).getVertex() instanceof Constant) {
 207.122 +                r = ((VertexItem) item).getVertex().getBounds();
 207.123 +            }
 207.124 +
 207.125 +            if (r != null) {
 207.126 +
 207.127 +                int tx = r.x + r.width;
 207.128 +                int ty = r.y + r.height;
 207.129 +
 207.130 +                int step = getCanvas().getStep();
 207.131 +                int graphY = getCanvas().toGraphY(y);
 207.132 +                                
 207.133 +                graphY = graphY + (step - 1) / 2 + 1;
 207.134 +                
 207.135 +                tx = getCanvas().toCanvas(tx * step);
 207.136 +                ty = ty * step + graphY;
 207.137 +                
 207.138 +                int dx = tx - x;
 207.139 +                int dy = ty - y;
 207.140 +                
 207.141 +                if (dx > 0 && dy > 0 && dx + dy < step) {
 207.142 +                    getCanvas().setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));
 207.143 +                    return;
 207.144 +                }
 207.145 +            }
 207.146 +            getCanvas().setCursor(null);
 207.147 +        }
 207.148 +    }
 207.149 +
 207.150 +
 207.151 +
 207.152 +    
 207.153  
 207.154      @Override
 207.155      public void mouseClicked(MouseEvent e) {
   208.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/RightTreeEventHandler.java	Thu Apr 17 10:51:04 2008 +0200
   208.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/RightTreeEventHandler.java	Thu Apr 17 15:50:14 2008 +0200
   208.3 @@ -130,7 +130,6 @@
   208.4      public void mouseDragged(MouseEvent e) {
   208.5          if ((initialEvent != null) && (initialEvent.getPoint().distance(e.getPoint()) >= 5)) {
   208.6              
   208.7 -            LeftTree leftTree = getLeftTree();
   208.8              LinkTool linkTool = getMapper().getLinkTool();
   208.9              Transferable transferable = null;
  208.10              Link link = null;
  208.11 @@ -145,7 +144,9 @@
  208.12                      transferable = linkTool.activateOutgoing(source, 
  208.13                              link, initialPath);
  208.14                  }
  208.15 -                if (link.getSource() instanceof Vertex) {
  208.16 +                if (link.getSource() instanceof Vertex  && 
  208.17 +                        getMapper().getNode(initialPath, true).isGraphExpanded()) 
  208.18 +                {
  208.19                      Vertex vertex = (Vertex) link.getSource();
  208.20                      transferable = linkTool.activateOutgoing(initialPath, vertex);
  208.21                  }
   209.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Constant.java	Thu Apr 17 10:51:04 2008 +0200
   209.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Constant.java	Thu Apr 17 15:50:14 2008 +0200
   209.3 @@ -30,6 +30,7 @@
   209.4  import org.netbeans.modules.soa.mappercore.CanvasRendererContext;
   209.5  import org.netbeans.modules.soa.mappercore.MapperStyle;
   209.6  import org.netbeans.modules.soa.mappercore.graphics.RRectangle;
   209.7 +import org.netbeans.modules.soa.mappercore.graphics.Triangle;
   209.8  import org.netbeans.modules.soa.mappercore.icons.Icon2D;
   209.9  
  209.10  /**
  209.11 @@ -122,6 +123,9 @@
  209.12              g2.draw(rrect);
  209.13          }
  209.14          
  209.15 +        g2.fill(new Triangle(width - step, height, 
  209.16 +                width, height - step, width, height));
  209.17 +        
  209.18          g2.translate(-tx, -ty);
  209.19          g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
  209.20                  RenderingHints.VALUE_STROKE_NORMALIZE);
  209.21 @@ -150,4 +154,9 @@
  209.22          setHeight(Math.max(y, 2));
  209.23          super.layout();        
  209.24      }
  209.25 +
  209.26 +    @Override
  209.27 +    public int getMaximumWidth() {
  209.28 +        return 30;
  209.29 +    }
  209.30  }
   210.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Function.java	Thu Apr 17 10:51:04 2008 +0200
   210.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Function.java	Thu Apr 17 15:50:14 2008 +0200
   210.3 @@ -32,6 +32,7 @@
   210.4  import org.netbeans.modules.soa.mappercore.CanvasRendererContext;
   210.5  import org.netbeans.modules.soa.mappercore.MapperStyle;
   210.6  import org.netbeans.modules.soa.mappercore.graphics.RRectangle;
   210.7 +import org.netbeans.modules.soa.mappercore.graphics.Triangle;
   210.8  import org.netbeans.modules.soa.mappercore.icons.Icon2D;
   210.9  
  210.10  /**
  210.11 @@ -157,6 +158,10 @@
  210.12              g2.setPaint(MapperStyle.VERTEX_BORDER_COLOR);
  210.13              g2.draw(rrect);
  210.14          }
  210.15 +        
  210.16 +        g2.fill(new Triangle(width - step, height, 
  210.17 +        width, height - step, width, height));
  210.18 +        
  210.19          g2.setStroke(oldStroke);
  210.20          g2.translate(-tx, -ty);
  210.21          g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
  210.22 @@ -176,7 +181,7 @@
  210.23          if (resultText != null) {
  210.24              JLabel label = rendererContext.getTextRenderer();
  210.25              
  210.26 -            int labelWidth = width - 5;
  210.27 +            int labelWidth = width - 5 - step;
  210.28              
  210.29              if (labelWidth > 0) {
  210.30                  int labelHeight = 2 * step - 1;
   211.1 --- a/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Graph.java	Thu Apr 17 10:51:04 2008 +0200
   211.2 +++ b/soa.mappercore/src/org/netbeans/modules/soa/mappercore/model/Graph.java	Thu Apr 17 15:50:14 2008 +0200
   211.3 @@ -45,12 +45,14 @@
   211.4  
   211.5      private List<Link> ingoingLinks = null;
   211.6      private boolean hasOutgoingLinks = false;
   211.7 +    private Link outgoingLink = null;
   211.8      
   211.9      private Set<Link> connectedIngoingLinks = null;
  211.10      private Set<Link> connectedOutgoingLinks = null;
  211.11      
  211.12      private boolean validLinks = false;
  211.13      private boolean validBounds = false;
  211.14 +    private boolean validOutgoingLinks = false;
  211.15      
  211.16      private Rectangle bounds = null;
  211.17      
  211.18 @@ -192,10 +194,18 @@
  211.19      
  211.20      
  211.21      public boolean hasOutgoingLinks() {
  211.22 -        validateLinks();
  211.23 +        validateOutgoingLinks();
  211.24          return hasOutgoingLinks;
  211.25      }
  211.26      
  211.27 +    public List<Link> getOutgoingLinks() {
  211.28 +        return null;
  211.29 +    }
  211.30 +    
  211.31 +    public Link getOutgoingLink() {
  211.32 +        validateOutgoingLinks();
  211.33 +        return outgoingLink;
  211.34 +    }
  211.35      
  211.36      public boolean hasConnectedOutgoingLinks() {
  211.37          validateLinks();
  211.38 @@ -574,6 +584,23 @@
  211.39          return (maxVertex != null) ? maxVertex : currentVertex;
  211.40      }
  211.41      
  211.42 +    private void validateOutgoingLinks() {
  211.43 +        if (validOutgoingLinks) {return; }
  211.44 +        
  211.45 +        for (int i = getLinkCount() - 1; i >= 0; i--) {
  211.46 +            Link link = getLink(i);
  211.47 +            if (link.getTarget() == this) {
  211.48 +                outgoingLink = link;
  211.49 +                validOutgoingLinks = true;
  211.50 +                hasOutgoingLinks = true;
  211.51 +                return;
  211.52 +            }
  211.53 +        }
  211.54 +        
  211.55 +        hasOutgoingLinks = false;
  211.56 +        validOutgoingLinks = true;
  211.57 +        outgoingLink = null;
  211.58 +    }
  211.59      
  211.60      private void validateLinks() {
  211.61          if (validLinks) return;
  211.62 @@ -627,6 +654,10 @@
  211.63                  : connectedOutgoingLinks;
  211.64          
  211.65          this.validLinks = true;
  211.66 +        validOutgoingLinks = true;
  211.67 +        if (!outgoingLinks.isEmpty()) {
  211.68 +            outgoingLink = outgoingLinks.iterator().next();
  211.69 +        }
  211.70      }
  211.71      
  211.72      
  211.73 @@ -636,7 +667,9 @@
  211.74              ingoingLinks = null;
  211.75              connectedIngoingLinks = null;
  211.76              connectedOutgoingLinks = null;
  211.77 +            outgoingLink = null;
  211.78              validLinks = false;
  211.79 +            validOutgoingLinks = false;
  211.80              fireGraphLinksChanges();
  211.81          }
  211.82      }
   212.1 --- a/soa.ui/nbproject/project.properties	Thu Apr 17 10:51:04 2008 +0200
   212.2 +++ b/soa.ui/nbproject/project.properties	Thu Apr 17 15:50:14 2008 +0200
   212.3 @@ -17,3 +17,4 @@
   212.4  # Microsystems, Inc. All Rights Reserved.
   212.5  
   212.6  javac.source=1.5
   212.7 +javac.compilerargs=-Xlint:unchecked
   213.1 --- a/soa.ui/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   213.2 +++ b/soa.ui/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   213.3 @@ -150,20 +150,18 @@
   213.4                  </dependency>
   213.5              </module-dependencies>
   213.6              <friend-packages>
   213.7 -                <friend>org.netbeans.modules.etl.editor</friend>
   213.8                  <friend>org.netbeans.modules.bpel.core</friend>
   213.9 +                <friend>org.netbeans.modules.bpel.model</friend>
  213.10                  <friend>org.netbeans.modules.bpel.debugger.ui</friend>
  213.11                  <friend>org.netbeans.modules.bpel.editors</friend>
  213.12                  <friend>org.netbeans.modules.bpel.editors.api</friend>
  213.13                  <friend>org.netbeans.modules.bpel.mapper</friend>
  213.14 -                <friend>org.netbeans.modules.bpel.refactoring</friend>
  213.15 -                <friend>org.netbeans.modules.bpel.search</friend>
  213.16 -                <friend>org.netbeans.modules.bpel.validation</friend>
  213.17                  <friend>org.netbeans.modules.soa.mapper</friend>
  213.18                  <friend>org.netbeans.modules.xslt.core</friend>
  213.19                  <friend>org.netbeans.modules.xslt.mapper</friend>
  213.20                  <friend>org.netbeans.modules.xslt.project</friend>
  213.21                  <friend>org.netbeans.modules.xslt.tmap</friend>
  213.22 +                <friend>org.netbeans.modules.etl.editor</friend>
  213.23                  <package>org.netbeans.modules.soa.ui</package>
  213.24                  <package>org.netbeans.modules.soa.ui.axinodes</package>
  213.25                  <package>org.netbeans.modules.soa.ui.form</package>
  213.26 @@ -171,7 +169,6 @@
  213.27                  <package>org.netbeans.modules.soa.ui.nodes</package>
  213.28                  <package>org.netbeans.modules.soa.ui.tnv.api</package>
  213.29                  <package>org.netbeans.modules.soa.ui.tnv.scrollpane</package>
  213.30 -                <package>org.netbeans.modules.soa.ui.util</package>
  213.31              </friend-packages>
  213.32          </data>
  213.33      </configuration>
   214.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/SoaUiUtil.java	Thu Apr 17 10:51:04 2008 +0200
   214.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   214.3 @@ -1,399 +0,0 @@
   214.4 -/*
   214.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   214.6 - *
   214.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   214.8 - *
   214.9 - * The contents of this file are subject to the terms of either the GNU
  214.10 - * General Public License Version 2 only ("GPL") or the Common
  214.11 - * Development and Distribution License("CDDL") (collectively, the
  214.12 - * "License"). You may not use this file except in compliance with the
  214.13 - * License. You can obtain a copy of the License at
  214.14 - * http://www.netbeans.org/cddl-gplv2.html
  214.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  214.16 - * specific language governing permissions and limitations under the
  214.17 - * License.  When distributing the software, include this License Header
  214.18 - * Notice in each file and include the License file at
  214.19 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  214.20 - * particular file as subject to the "Classpath" exception as provided
  214.21 - * by Sun in the GPL Version 2 section of the License file that
  214.22 - * accompanied this code. If applicable, add the following below the
  214.23 - * License Header, with the fields enclosed by brackets [] replaced by
  214.24 - * your own identifying information:
  214.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  214.26 - *
  214.27 - * Contributor(s):
  214.28 - *
  214.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  214.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  214.31 - * Microsystems, Inc. All Rights Reserved.
  214.32 - *
  214.33 - * If you wish your version of this file to be governed by only the CDDL
  214.34 - * or only the GPL Version 2, indicate your decision by adding
  214.35 - * "[Contributor] elects to include this software in this distribution
  214.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  214.37 - * single choice of license, a recipient has the option to distribute
  214.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  214.39 - * to extend the choice of license to its licensees as provided above.
  214.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  214.41 - * Version 2 license, then the option applies only if the new code is
  214.42 - * made subject to such option by the copyright holder.
  214.43 - */
  214.44 -package org.netbeans.modules.soa.ui;
  214.45 -
  214.46 -import java.awt.Color;
  214.47 -import java.awt.Component;
  214.48 -import java.awt.Container;
  214.49 -import java.awt.Image;
  214.50 -import java.beans.PropertyChangeEvent;
  214.51 -import java.beans.PropertyChangeListener;
  214.52 -import java.io.IOException;
  214.53 -import java.lang.reflect.InvocationTargetException;
  214.54 -import java.util.ArrayList;
  214.55 -import java.util.Collection;
  214.56 -import javax.swing.AbstractButton;
  214.57 -import javax.swing.JLabel;
  214.58 -import javax.swing.SwingUtilities;
  214.59 -import org.openide.filesystems.FileObject;
  214.60 -import org.openide.awt.UndoRedo;
  214.61 -import org.netbeans.modules.soa.ui.form.InitialFocusProvider;
  214.62 -import org.openide.cookies.SaveCookie;
  214.63 -import org.openide.cookies.EditorCookie;
  214.64 -import org.netbeans.modules.xml.api.EncodingUtil;
  214.65 -import javax.swing.text.Document;
  214.66 -import javax.swing.text.BadLocationException;
  214.67 -import org.openide.DialogDescriptor;
  214.68 -import org.openide.ErrorManager;
  214.69 -import org.openide.awt.Mnemonics;
  214.70 -import org.openide.loaders.DataFolder;
  214.71 -import org.openide.loaders.DataObject;
  214.72 -import org.openide.text.DataEditorSupport;
  214.73 -import org.openide.util.HelpCtx;
  214.74 -import org.openide.windows.TopComponent;
  214.75 -import org.openide.windows.WindowManager;
  214.76 -
  214.77 -/**
  214.78 - * @author nk160297
  214.79 - */
  214.80 -public class SoaUiUtil {
  214.81 -    
  214.82 -    public static Color MISTAKE_RED = new Color(204, 0, 0);
  214.83 -    public static Color INACTIVE_BLUE = new Color(0, 102, 153);
  214.84 -    public static Color HTML_GRAY = new Color(153, 153, 153);
  214.85 -    
  214.86 -    private static String GRAY_COLOR = "#999999";
  214.87 -    
  214.88 -    private SoaUiUtil() {}
  214.89 -
  214.90 -    public static String getGrayString(String message) {
  214.91 -        return getGrayString("", message);
  214.92 -    }
  214.93 -    
  214.94 -    public static String getGrayString(String nonGrayPrefix, String message) {
  214.95 -        return message == null ? nonGrayPrefix : "<html>"+getCorrectedHtmlRenderedString(nonGrayPrefix) // NOI18N
  214.96 -        +"<font color='"+GRAY_COLOR+"'>"+getCorrectedHtmlRenderedString(message)+"</font></html>";// NOI18N
  214.97 -    }
  214.98 -    
  214.99 -    public static String getGrayString(String nonGrayPrefix, String message
 214.100 -            , String nonGraySuffix) {
 214.101 -        return getGrayString(nonGrayPrefix,message,nonGraySuffix, true);
 214.102 -    }
 214.103 -    
 214.104 -    public static String getGrayString(String nonGrayPrefix, String message
 214.105 -            , String nonGraySuffix, boolean isSetHtmlHeader) {
 214.106 -        String htmlHeader = isSetHtmlHeader ? "<html>" : ""; // NOI18N
 214.107 -        String htmlFooter = isSetHtmlHeader ? "</html>" : ""; // NOI18N
 214.108 -        return message == null ? nonGrayPrefix : htmlHeader
 214.109 -                +getCorrectedHtmlRenderedString(nonGrayPrefix)
 214.110 -                +"<font color='"+GRAY_COLOR+"'>" // NOI18N
 214.111 -                +getCorrectedHtmlRenderedString(message)
 214.112 -                +"</font>" // NOI18N
 214.113 -                +(nonGraySuffix == null ? ""
 214.114 -                : getCorrectedHtmlRenderedString(nonGraySuffix))
 214.115 -                +htmlFooter;// NOI18N
 214.116 -    }
 214.117 -    
 214.118 -    public static String getFormattedHtmlString(
 214.119 -            boolean isSetHtmlHeader, TextChunk... chunkArr) {
 214.120 -        String htmlHeader = isSetHtmlHeader ? "<html>" : ""; // NOI18N
 214.121 -        String htmlFooter = isSetHtmlHeader ? "</html>" : ""; // NOI18N
 214.122 -        //
 214.123 -        StringBuffer sb = new StringBuffer();
 214.124 -        boolean isFirst = true;
 214.125 -        TextChunk prevTextChunk = null;
 214.126 -        boolean isPrevChunkStyled = false;
 214.127 -        for (TextChunk chunk : chunkArr) {
 214.128 -            if (chunk.myText == null || chunk.myText.length() == 0) {
 214.129 -                continue;
 214.130 -            }
 214.131 -            //
 214.132 -            boolean hasSameTextAttributes = prevTextChunk == null ? false :
 214.133 -                prevTextChunk.hasSameTextAttributes(chunk);
 214.134 -            if (isPrevChunkStyled && !hasSameTextAttributes) {
 214.135 -                sb.append("</font>");  // NOI18N
 214.136 -            }
 214.137 -            //
 214.138 -            if (isFirst) {
 214.139 -                isFirst = false;
 214.140 -            } else {
 214.141 -                sb.append(" "); // NOI18N
 214.142 -            }
 214.143 -            //
 214.144 -            if (chunk.myColor == null) {
 214.145 -                sb.append(getCorrectedHtmlRenderedString(chunk.myText));
 214.146 -                isPrevChunkStyled = false;
 214.147 -            } else {
 214.148 -                if (!isPrevChunkStyled || 
 214.149 -                        (isPrevChunkStyled && !hasSameTextAttributes)) {
 214.150 -                    sb.append("<font color='" + getHtmlColor(chunk.myColor) + "'>"); // NOI18N
 214.151 -                }
 214.152 -                sb.append(getCorrectedHtmlRenderedString(chunk.myText));
 214.153 -                isPrevChunkStyled = true;
 214.154 -            }
 214.155 -            //
 214.156 -            prevTextChunk = chunk;
 214.157 -        }
 214.158 -        //
 214.159 -        if (isPrevChunkStyled) {
 214.160 -            sb.append("</font>");  // NOI18N
 214.161 -        }
 214.162 -        //
 214.163 -        return htmlHeader + sb.toString() + htmlFooter;
 214.164 -    }
 214.165 -    
 214.166 -    public static class TextChunk {
 214.167 -        String myText = null;
 214.168 -        Color myColor = null;
 214.169 -        
 214.170 -        public TextChunk(String text) {
 214.171 -            myText = text;
 214.172 -        }
 214.173 -        
 214.174 -        public TextChunk(String text, Color color) {
 214.175 -            myText = text;
 214.176 -            myColor = color;
 214.177 -        }
 214.178 -        
 214.179 -        public boolean hasSameTextAttributes(TextChunk anotherChunk) {
 214.180 -            if (anotherChunk == null) {
 214.181 -                return false;
 214.182 -            }
 214.183 -            //
 214.184 -            return anotherChunk.myColor == this.myColor;
 214.185 -        }
 214.186 -    }
 214.187 -    
 214.188 -    public static String getHtmlColor(Color color) {
 214.189 -        int redValue = color.getRed();
 214.190 -        String red = redValue == 0 ? "00" : Integer.toHexString(redValue);
 214.191 -        //
 214.192 -        int greenValue = color.getGreen();
 214.193 -        String green = greenValue == 0 ? "00" : Integer.toHexString(greenValue);
 214.194 -        //
 214.195 -        int blueValue = color.getBlue();
 214.196 -        String blue = blueValue == 0 ? "00" : Integer.toHexString(blueValue);
 214.197 -        //
 214.198 -        return "#" + red + green + blue; // NOI18N
 214.199 -    }
 214.200 -    
 214.201 -    public static Image getBadgedIcon(Image originalImage, Image badgeImage) {
 214.202 -        return getBadgedIcon(originalImage, badgeImage, 9, 0);
 214.203 -    }
 214.204 -    
 214.205 -    public static Image getBadgedIcon(Image originalImage, Image badgeImage, int x, int y) {
 214.206 -        if (originalImage == null) {
 214.207 -            return null;
 214.208 -        }
 214.209 -        if (badgeImage == null) {
 214.210 -            return originalImage;
 214.211 -        }
 214.212 -        Image image = org.openide.util.Utilities.mergeImages(originalImage, badgeImage, x, y );
 214.213 -        return image;
 214.214 -    }
 214.215 -    
 214.216 -    public static final String getCorrectedHtmlRenderedString(String htmlString) {
 214.217 -        if (htmlString == null) {
 214.218 -            return null;
 214.219 -        }
 214.220 -        htmlString = htmlString.replaceAll("&amp;","&"); // NOI18n
 214.221 -        htmlString = htmlString.replaceAll("&gt;",">;"); // NOI18n
 214.222 -        htmlString = htmlString.replaceAll("&lt;","<"); // NOI18n
 214.223 -        
 214.224 -        htmlString = htmlString.replaceAll("&","&amp;"); // NOI18n
 214.225 -        htmlString = htmlString.replaceAll(">","&gt;"); // NOI18n
 214.226 -        htmlString = htmlString.replaceAll("<","&lt;"); // NOI18n
 214.227 -        return htmlString;
 214.228 -    }
 214.229 -    
 214.230 -    public static <T> T lookForChildByClass(Container parent, Class<T> clazz) {
 214.231 -        for (Component child : parent.getComponents()) {
 214.232 -            if (clazz.isInstance(child)) {
 214.233 -                return clazz.cast(child);
 214.234 -            }
 214.235 -            if (child instanceof Container) {
 214.236 -                return lookForChildByClass((Container)child, clazz);
 214.237 -            }
 214.238 -        }
 214.239 -        return null;
 214.240 -    }
 214.241 -    
 214.242 -    public static <T> Collection<T> lookForChildrenByClass(
 214.243 -            Container parent, Class<T> clazz) {
 214.244 -        ArrayList<T> result = new ArrayList<T>();
 214.245 -        lookForChildrenByClass(parent, clazz, result);
 214.246 -        return result;
 214.247 -    }
 214.248 -    
 214.249 -    private static <T> void lookForChildrenByClass(
 214.250 -            Container parent, Class<T> clazz, Collection<T> candidates) {
 214.251 -        for (Component child : parent.getComponents()) {
 214.252 -            if (clazz.isInstance(child)) {
 214.253 -                T candidate = clazz.cast(child);
 214.254 -                candidates.add(candidate);
 214.255 -            }
 214.256 -            if (child instanceof Container) {
 214.257 -                lookForChildrenByClass((Container)child, clazz, candidates);
 214.258 -            }
 214.259 -        }
 214.260 -    }
 214.261 -    
 214.262 -    /**
 214.263 -     * Looks for the component to which the focus should be set initially.
 214.264 -     * @param container 
 214.265 -     * @return 
 214.266 -     */
 214.267 -    public static Component getInitialFocusComponent(Container container) {
 214.268 -        Collection<InitialFocusProvider> providers = lookForChildrenByClass(
 214.269 -                container, InitialFocusProvider.class);
 214.270 -        //
 214.271 -        int maxPriority = Integer.MIN_VALUE;
 214.272 -        Component resultComp = null;
 214.273 -        //
 214.274 -        for (InitialFocusProvider provider : providers) {
 214.275 -            int priority = provider.getProviderPriority();
 214.276 -            if (priority > maxPriority) {
 214.277 -                maxPriority = priority;
 214.278 -                resultComp = provider.getInitialFocusComponent();
 214.279 -            }
 214.280 -        }
 214.281 -        //
 214.282 -        return resultComp;
 214.283 -    }
 214.284 -    
 214.285 -    /**
 214.286 -     * This method has to be called after the pack() and before the setVisible() 
 214.287 -     * for the dialog or window.
 214.288 -     */ 
 214.289 -    public static boolean setInitialFocusComponentFor(Container container) {
 214.290 -        Component comp = SoaUiUtil.getInitialFocusComponent(container);
 214.291 -        if (comp != null) {
 214.292 -            return comp.requestFocusInWindow();
 214.293 -        }
 214.294 -        return false;
 214.295 -    }
 214.296 -    
 214.297 -    // vlv
 214.298 -    public static void fixEncoding(DataObject data, FileObject dir) throws IOException {
 214.299 -      DataEditorSupport support = data.getLookup().lookup(DataEditorSupport.class);
 214.300 -
 214.301 -      if ( !(support instanceof UndoRedoManagerProvider)) {
 214.302 -        return;
 214.303 -      }
 214.304 -      UndoRedo.Manager manager = ((UndoRedoManagerProvider) support).getUndoRedoManager();
 214.305 -      String encoding = EncodingUtil.getProjectEncoding(DataFolder.findFolder(dir).getPrimaryFile());
 214.306 -
 214.307 -      // # 115502
 214.308 -      if (encoding == null || !EncodingUtil.isValidEncoding(encoding)) {
 214.309 -        encoding = "UTF-8"; // NOI18N
 214.310 -      }
 214.311 -      EditorCookie editor = data.getCookie(EditorCookie.class);
 214.312 -      Document document = (Document) editor.openDocument();
 214.313 -      
 214.314 -      try {
 214.315 -        document.insertString(19, " encoding=\"" + encoding + "\"", null);
 214.316 -      }
 214.317 -      catch (BadLocationException e) {
 214.318 -        ErrorManager.getDefault().notify(e);
 214.319 -      }
 214.320 -
 214.321 -      SaveCookie save = data.getCookie(SaveCookie.class);
 214.322 -      
 214.323 -      if (save != null) {
 214.324 -        save.save();
 214.325 -      }
 214.326 -      // # 119057 after changes for # 115502
 214.327 -      if (manager == null) {
 214.328 -        return;
 214.329 -      }
 214.330 -      manager.discardAllEdits();
 214.331 -    }
 214.332 -    
 214.333 -    public static TopComponent safeFindTopComponent(final String tcId) {
 214.334 -        if (tcId == null || "".equals(tcId)) { // NOI18N
 214.335 -            return null;
 214.336 -        }
 214.337 -        TopComponent tc = null;
 214.338 -        if (SwingUtilities.isEventDispatchThread()) {
 214.339 -            tc = WindowManager.getDefault().findTopComponent(tcId);
 214.340 -        } else {
 214.341 -            class SafeFindTopComponent implements Runnable {
 214.342 -                private TopComponent myTopComponent;
 214.343 -                public void run() {
 214.344 -                    myTopComponent = WindowManager.getDefault().findTopComponent(tcId);
 214.345 -                }
 214.346 -                
 214.347 -                public TopComponent getTopComponent() {
 214.348 -                    return myTopComponent;
 214.349 -                }
 214.350 -            }
 214.351 -            SafeFindTopComponent findTc = new SafeFindTopComponent();
 214.352 -            try {
 214.353 -                SwingUtilities.invokeAndWait(findTc);
 214.354 -                tc = findTc.getTopComponent();
 214.355 -            } catch(InterruptedException ex) {
 214.356 -                ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ex);
 214.357 -                return null;
 214.358 -            } catch (InvocationTargetException ex) {
 214.359 -                ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ex);
 214.360 -                return null;
 214.361 -            }
 214.362 -        }
 214.363 -        
 214.364 -        return tc;
 214.365 -    }
 214.366 -
 214.367 -    public static void activateInlineMnemonics(Container owner) {
 214.368 -        for (Component comp : owner.getComponents()) {
 214.369 -            if (comp instanceof JLabel) {
 214.370 -                JLabel label = (JLabel)comp;
 214.371 -                Mnemonics.setLocalizedText(label, label.getText());
 214.372 -            } else if (comp instanceof AbstractButton) {
 214.373 -                AbstractButton button = (AbstractButton)comp;
 214.374 -                Mnemonics.setLocalizedText(button, button.getText());
 214.375 -            } else if (comp instanceof Container) {
 214.376 -                activateInlineMnemonics((Container)comp);
 214.377 -            }
 214.378 -        }
 214.379 -    }
 214.380 -    
 214.381 -    public static void fireHelpContextChange(Component comp, HelpCtx newHelpCtx) {
 214.382 -        Container parent = comp.getParent();
 214.383 -        if (parent != null) {
 214.384 -            PropertyChangeEvent event = new PropertyChangeEvent(
 214.385 -                    comp, DialogDescriptor.PROP_HELP_CTX,
 214.386 -                    null, newHelpCtx);
 214.387 -            //
 214.388 -            // notify all parents that the help context is changed
 214.389 -            while (true) {
 214.390 -                if (parent instanceof PropertyChangeListener) {
 214.391 -                    ((PropertyChangeListener) parent).propertyChange(event);
 214.392 -                }
 214.393 -                //
 214.394 -                Container newParent = parent.getParent();
 214.395 -                if (newParent == null || newParent == parent) {
 214.396 -                    break;
 214.397 -                }
 214.398 -                parent = newParent;
 214.399 -            }
 214.400 -        }
 214.401 -    }
 214.402 -}
   215.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   215.2 +++ b/soa.ui/src/org/netbeans/modules/soa/ui/SoaUtil.java	Thu Apr 17 15:50:14 2008 +0200
   215.3 @@ -0,0 +1,431 @@
   215.4 +/*
   215.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   215.6 + *
   215.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   215.8 + *
   215.9 + * The contents of this file are subject to the terms of either the GNU
  215.10 + * General Public License Version 2 only ("GPL") or the Common
  215.11 + * Development and Distribution License("CDDL") (collectively, the
  215.12 + * "License"). You may not use this file except in compliance with the
  215.13 + * License. You can obtain a copy of the License at
  215.14 + * http://www.netbeans.org/cddl-gplv2.html
  215.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  215.16 + * specific language governing permissions and limitations under the
  215.17 + * License.  When distributing the software, include this License Header
  215.18 + * Notice in each file and include the License file at
  215.19 + * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  215.20 + * particular file as subject to the "Classpath" exception as provided
  215.21 + * by Sun in the GPL Version 2 section of the License file that
  215.22 + * accompanied this code. If applicable, add the following below the
  215.23 + * License Header, with the fields enclosed by brackets [] replaced by
  215.24 + * your own identifying information:
  215.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  215.26 + *
  215.27 + * Contributor(s):
  215.28 + *
  215.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  215.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  215.31 + * Microsystems, Inc. All Rights Reserved.
  215.32 + *
  215.33 + * If you wish your version of this file to be governed by only the CDDL
  215.34 + * or only the GPL Version 2, indicate your decision by adding
  215.35 + * "[Contributor] elects to include this software in this distribution
  215.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  215.37 + * single choice of license, a recipient has the option to distribute
  215.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  215.39 + * to extend the choice of license to its licensees as provided above.
  215.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  215.41 + * Version 2 license, then the option applies only if the new code is
  215.42 + * made subject to such option by the copyright holder.
  215.43 + */
  215.44 +package org.netbeans.modules.soa.ui;
  215.45 +
  215.46 +import java.awt.Color;
  215.47 +import java.awt.Container;
  215.48 +import java.awt.Image;
  215.49 +import java.beans.PropertyChangeEvent;
  215.50 +import java.beans.PropertyChangeListener;
  215.51 +import java.io.IOException;
  215.52 +import java.lang.reflect.InvocationTargetException;
  215.53 +import java.util.ArrayList;
  215.54 +import java.util.Collection;
  215.55 +import javax.swing.AbstractButton;
  215.56 +import javax.swing.JLabel;
  215.57 +import javax.swing.SwingUtilities;
  215.58 +import org.openide.filesystems.FileObject;
  215.59 +import org.openide.awt.UndoRedo;
  215.60 +import org.netbeans.modules.soa.ui.form.InitialFocusProvider;
  215.61 +import org.openide.cookies.SaveCookie;
  215.62 +import org.openide.cookies.EditorCookie;
  215.63 +import org.netbeans.modules.xml.api.EncodingUtil;
  215.64 +import javax.swing.text.Document;
  215.65 +import javax.swing.text.BadLocationException;
  215.66 +import org.openide.DialogDescriptor;
  215.67 +import org.openide.ErrorManager;
  215.68 +import org.openide.awt.Mnemonics;
  215.69 +import org.openide.loaders.DataFolder;
  215.70 +import org.openide.loaders.DataObject;
  215.71 +import org.openide.text.DataEditorSupport;
  215.72 +import org.openide.util.HelpCtx;
  215.73 +import org.openide.windows.TopComponent;
  215.74 +import org.openide.windows.WindowManager;
  215.75 +import org.openide.text.Line;
  215.76 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  215.77 +import javax.swing.text.AbstractDocument;
  215.78 +import org.openide.cookies.LineCookie;
  215.79 +import org.openide.loaders.DataObjectNotFoundException;
  215.80 +import org.netbeans.modules.xml.xam.Model;
  215.81 +import org.netbeans.modules.xml.xam.ModelSource;
  215.82 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
  215.83 +import org.netbeans.modules.xml.xam.Component;
  215.84 +import org.netbeans.modules.xml.xam.dom.DocumentComponent;
  215.85 +import org.openide.text.NbDocument;
  215.86 +import org.openide.util.Lookup;
  215.87 +import javax.swing.text.StyledDocument;
  215.88 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
  215.89 +import org.w3c.dom.Element;
  215.90 +import org.w3c.dom.NodeList;
  215.91 +
  215.92 +/**
  215.93 + * @author nk160297
  215.94 + */
  215.95 +public class SoaUtil {
  215.96 +    
  215.97 +    public static Color MISTAKE_RED = new Color(204, 0, 0);
  215.98 +    public static Color INACTIVE_BLUE = new Color(0, 102, 153);
  215.99 +    public static Color HTML_GRAY = new Color(153, 153, 153);
 215.100 +    
 215.101 +    private static String GRAY_COLOR = "#999999";
 215.102 +    
 215.103 +    private SoaUtil() {}
 215.104 +
 215.105 +    public static String getGrayString(String message) {
 215.106 +        return getGrayString("", message);
 215.107 +    }
 215.108 +    
 215.109 +    public static String getGrayString(String nonGrayPrefix, String message) {
 215.110 +        return message == null ? nonGrayPrefix : "<html>"+getCorrectedHtmlRenderedString(nonGrayPrefix) // NOI18N
 215.111 +        +"<font color='"+GRAY_COLOR+"'>"+getCorrectedHtmlRenderedString(message)+"</font></html>";// NOI18N
 215.112 +    }
 215.113 +    
 215.114 +    public static String getGrayString(String nonGrayPrefix, String message
 215.115 +            , String nonGraySuffix) {
 215.116 +        return getGrayString(nonGrayPrefix,message,nonGraySuffix, true);
 215.117 +    }
 215.118 +    
 215.119 +    public static String getGrayString(String nonGrayPrefix, String message
 215.120 +            , String nonGraySuffix, boolean isSetHtmlHeader) {
 215.121 +        String htmlHeader = isSetHtmlHeader ? "<html>" : ""; // NOI18N
 215.122 +        String htmlFooter = isSetHtmlHeader ? "</html>" : ""; // NOI18N
 215.123 +        return message == null ? nonGrayPrefix : htmlHeader
 215.124 +                +getCorrectedHtmlRenderedString(nonGrayPrefix)
 215.125 +                +"<font color='"+GRAY_COLOR+"'>" // NOI18N
 215.126 +                +getCorrectedHtmlRenderedString(message)
 215.127 +                +"</font>" // NOI18N
 215.128 +                +(nonGraySuffix == null ? ""
 215.129 +                : getCorrectedHtmlRenderedString(nonGraySuffix))
 215.130 +                +htmlFooter;// NOI18N
 215.131 +    }
 215.132 +    
 215.133 +    public static String getFormattedHtmlString(
 215.134 +            boolean isSetHtmlHeader, TextChunk... chunkArr) {
 215.135 +        String htmlHeader = isSetHtmlHeader ? "<html>" : ""; // NOI18N
 215.136 +        String htmlFooter = isSetHtmlHeader ? "</html>" : ""; // NOI18N
 215.137 +        //
 215.138 +        StringBuffer sb = new StringBuffer();
 215.139 +        boolean isFirst = true;
 215.140 +        TextChunk prevTextChunk = null;
 215.141 +        boolean isPrevChunkStyled = false;
 215.142 +        for (TextChunk chunk : chunkArr) {
 215.143 +            if (chunk.myText == null || chunk.myText.length() == 0) {
 215.144 +                continue;
 215.145 +            }
 215.146 +            //
 215.147 +            boolean hasSameTextAttributes = prevTextChunk == null ? false :
 215.148 +                prevTextChunk.hasSameTextAttributes(chunk);
 215.149 +            if (isPrevChunkStyled && !hasSameTextAttributes) {
 215.150 +                sb.append("</font>");  // NOI18N
 215.151 +            }
 215.152 +            //
 215.153 +            if (isFirst) {
 215.154 +                isFirst = false;
 215.155 +            } else {
 215.156 +                sb.append(" "); // NOI18N
 215.157 +            }
 215.158 +            //
 215.159 +            if (chunk.myColor == null) {
 215.160 +                sb.append(getCorrectedHtmlRenderedString(chunk.myText));
 215.161 +                isPrevChunkStyled = false;
 215.162 +            } else {
 215.163 +                if (!isPrevChunkStyled || 
 215.164 +                        (isPrevChunkStyled && !hasSameTextAttributes)) {
 215.165 +                    sb.append("<font color='" + getHtmlColor(chunk.myColor) + "'>"); // NOI18N
 215.166 +                }
 215.167 +                sb.append(getCorrectedHtmlRenderedString(chunk.myText));
 215.168 +                isPrevChunkStyled = true;
 215.169 +            }
 215.170 +            //
 215.171 +            prevTextChunk = chunk;
 215.172 +        }
 215.173 +        //
 215.174 +        if (isPrevChunkStyled) {
 215.175 +            sb.append("</font>");  // NOI18N
 215.176 +        }
 215.177 +        //
 215.178 +        return htmlHeader + sb.toString() + htmlFooter;
 215.179 +    }
 215.180 +    
 215.181 +    public static class TextChunk {
 215.182 +        String myText = null;
 215.183 +        Color myColor = null;
 215.184 +        
 215.185 +        public TextChunk(String text) {
 215.186 +            myText = text;
 215.187 +        }
 215.188 +        
 215.189 +        public TextChunk(String text, Color color) {
 215.190 +            myText = text;
 215.191 +            myColor = color;
 215.192 +        }
 215.193 +        
 215.194 +        public boolean hasSameTextAttributes(TextChunk anotherChunk) {
 215.195 +            if (anotherChunk == null) {
 215.196 +                return false;
 215.197 +            }
 215.198 +            //
 215.199 +            return anotherChunk.myColor == this.myColor;
 215.200 +        }
 215.201 +    }
 215.202 +    
 215.203 +    public static String getHtmlColor(Color color) {
 215.204 +        int redValue = color.getRed();
 215.205 +        String red = redValue == 0 ? "00" : Integer.toHexString(redValue);
 215.206 +        //
 215.207 +        int greenValue = color.getGreen();
 215.208 +        String green = greenValue == 0 ? "00" : Integer.toHexString(greenValue);
 215.209 +        //
 215.210 +        int blueValue = color.getBlue();
 215.211 +        String blue = blueValue == 0 ? "00" : Integer.toHexString(blueValue);
 215.212 +        //
 215.213 +        return "#" + red + green + blue; // NOI18N
 215.214 +    }
 215.215 +    
 215.216 +    public static Image getBadgedIcon(Image originalImage, Image badgeImage) {
 215.217 +        return getBadgedIcon(originalImage, badgeImage, 9, 0);
 215.218 +    }
 215.219 +    
 215.220 +    public static Image getBadgedIcon(Image originalImage, Image badgeImage, int x, int y) {
 215.221 +        if (originalImage == null) {
 215.222 +            return null;
 215.223 +        }
 215.224 +        if (badgeImage == null) {
 215.225 +            return originalImage;
 215.226 +        }
 215.227 +        Image image = org.openide.util.Utilities.mergeImages(originalImage, badgeImage, x, y );
 215.228 +        return image;
 215.229 +    }
 215.230 +    
 215.231 +    public static final String getCorrectedHtmlRenderedString(String htmlString) {
 215.232 +        if (htmlString == null) {
 215.233 +            return null;
 215.234 +        }
 215.235 +        htmlString = htmlString.replaceAll("&amp;","&"); // NOI18n
 215.236 +        htmlString = htmlString.replaceAll("&gt;",">;"); // NOI18n
 215.237 +        htmlString = htmlString.replaceAll("&lt;","<"); // NOI18n
 215.238 +        
 215.239 +        htmlString = htmlString.replaceAll("&","&amp;"); // NOI18n
 215.240 +        htmlString = htmlString.replaceAll(">","&gt;"); // NOI18n
 215.241 +        htmlString = htmlString.replaceAll("<","&lt;"); // NOI18n
 215.242 +        return htmlString;
 215.243 +    }
 215.244 +    
 215.245 +    public static <T> T lookForChildByClass(Container parent, Class<T> clazz) {
 215.246 +        for (java.awt.Component child : parent.getComponents()) {
 215.247 +            if (clazz.isInstance(child)) {
 215.248 +                return clazz.cast(child);
 215.249 +            }
 215.250 +            if (child instanceof Container) {
 215.251 +                return lookForChildByClass((Container)child, clazz);
 215.252 +            }
 215.253 +        }
 215.254 +        return null;
 215.255 +    }
 215.256 +    
 215.257 +    public static <T> Collection<T> lookForChildrenByClass(
 215.258 +            Container parent, Class<T> clazz) {
 215.259 +        ArrayList<T> result = new ArrayList<T>();
 215.260 +        lookForChildrenByClass(parent, clazz, result);
 215.261 +        return result;
 215.262 +    }
 215.263 +    
 215.264 +    private static <T> void lookForChildrenByClass(
 215.265 +            Container parent, Class<T> clazz, Collection<T> candidates) {
 215.266 +        for (java.awt.Component child : parent.getComponents()) {
 215.267 +            if (clazz.isInstance(child)) {
 215.268 +                T candidate = clazz.cast(child);
 215.269 +                candidates.add(candidate);
 215.270 +            }
 215.271 +            if (child instanceof Container) {
 215.272 +                lookForChildrenByClass((Container)child, clazz, candidates);
 215.273 +            }
 215.274 +        }
 215.275 +    }
 215.276 +    
 215.277 +    /**
 215.278 +     * Looks for the component to which the focus should be set initially.
 215.279 +     * @param container 
 215.280 +     * @return 
 215.281 +     */
 215.282 +    public static java.awt.Component getInitialFocusComponent(Container container) {
 215.283 +        Collection<InitialFocusProvider> providers = lookForChildrenByClass(
 215.284 +                container, InitialFocusProvider.class);
 215.285 +        //
 215.286 +        int maxPriority = Integer.MIN_VALUE;
 215.287 +        java.awt.Component resultComp = null;
 215.288 +        //
 215.289 +        for (InitialFocusProvider provider : providers) {
 215.290 +            int priority = provider.getProviderPriority();
 215.291 +            if (priority > maxPriority) {
 215.292 +                maxPriority = priority;
 215.293 +                resultComp = provider.getInitialFocusComponent();
 215.294 +            }
 215.295 +        }
 215.296 +        //
 215.297 +        return resultComp;
 215.298 +    }
 215.299 +    
 215.300 +    /**
 215.301 +     * This method has to be called after the pack() and before the setVisible() 
 215.302 +     * for the dialog or window.
 215.303 +     */ 
 215.304 +    public static boolean setInitialFocusComponentFor(Container container) {
 215.305 +        java.awt.Component comp = getInitialFocusComponent(container);
 215.306 +        if (comp != null) {
 215.307 +            return comp.requestFocusInWindow();
 215.308 +        }
 215.309 +        return false;
 215.310 +    }
 215.311 +    
 215.312 +    // vlv
 215.313 +    public static void fixEncoding(DataObject data, FileObject dir) throws IOException {
 215.314 +      DataEditorSupport support = data.getLookup().lookup(DataEditorSupport.class);
 215.315 +
 215.316 +      if ( !(support instanceof UndoRedoManagerProvider)) {
 215.317 +        return;
 215.318 +      }
 215.319 +      UndoRedo.Manager manager = ((UndoRedoManagerProvider) support).getUndoRedoManager();
 215.320 +      String encoding = EncodingUtil.getProjectEncoding(DataFolder.findFolder(dir).getPrimaryFile());
 215.321 +
 215.322 +      // # 115502
 215.323 +      if (encoding == null || !EncodingUtil.isValidEncoding(encoding)) {
 215.324 +        encoding = "UTF-8"; // NOI18N
 215.325 +      }
 215.326 +      EditorCookie editor = data.getCookie(EditorCookie.class);
 215.327 +      Document document = (Document) editor.openDocument();
 215.328 +      
 215.329 +      try {
 215.330 +        document.insertString(19, " encoding=\"" + encoding + "\"", null);
 215.331 +      }
 215.332 +      catch (BadLocationException e) {
 215.333 +        ErrorManager.getDefault().notify(e);
 215.334 +      }
 215.335 +
 215.336 +      SaveCookie save = data.getCookie(SaveCookie.class);
 215.337 +      
 215.338 +      if (save != null) {
 215.339 +        save.save();
 215.340 +      }
 215.341 +      // # 119057 after changes for # 115502
 215.342 +      if (manager == null) {
 215.343 +        return;
 215.344 +      }
 215.345 +      manager.discardAllEdits();
 215.346 +    }
 215.347 +    
 215.348 +    public static TopComponent safeFindTopComponent(final String tcId) {
 215.349 +        if (tcId == null || "".equals(tcId)) { // NOI18N
 215.350 +            return null;
 215.351 +        }
 215.352 +        TopComponent tc = null;
 215.353 +        if (SwingUtilities.isEventDispatchThread()) {
 215.354 +            tc = WindowManager.getDefault().findTopComponent(tcId);
 215.355 +        } else {
 215.356 +            class SafeFindTopComponent implements Runnable {
 215.357 +                private TopComponent myTopComponent;
 215.358 +                public void run() {
 215.359 +                    myTopComponent = WindowManager.getDefault().findTopComponent(tcId);
 215.360 +                }
 215.361 +                
 215.362 +                public TopComponent getTopComponent() {
 215.363 +                    return myTopComponent;
 215.364 +                }
 215.365 +            }
 215.366 +            SafeFindTopComponent findTc = new SafeFindTopComponent();
 215.367 +            try {
 215.368 +                SwingUtilities.invokeAndWait(findTc);
 215.369 +                tc = findTc.getTopComponent();
 215.370 +            } catch(InterruptedException ex) {
 215.371 +                ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ex);
 215.372 +                return null;
 215.373 +            } catch (InvocationTargetException ex) {
 215.374 +                ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ex);
 215.375 +                return null;
 215.376 +            }
 215.377 +        }
 215.378 +        
 215.379 +        return tc;
 215.380 +    }
 215.381 +
 215.382 +    public static void activateInlineMnemonics(Container owner) {
 215.383 +        for (java.awt.Component comp : owner.getComponents()) {
 215.384 +            if (comp instanceof JLabel) {
 215.385 +                JLabel label = (JLabel)comp;
 215.386 +                Mnemonics.setLocalizedText(label, label.getText());
 215.387 +            } else if (comp instanceof AbstractButton) {
 215.388 +                AbstractButton button = (AbstractButton)comp;
 215.389 +                Mnemonics.setLocalizedText(button, button.getText());
 215.390 +            } else if (comp instanceof Container) {
 215.391 +                activateInlineMnemonics((Container)comp);
 215.392 +            }
 215.393 +        }
 215.394 +    }
 215.395 +    
 215.396 +    public static void fireHelpContextChange(java.awt.Component comp, HelpCtx newHelpCtx) {
 215.397 +        Container parent = comp.getParent();
 215.398 +        if (parent != null) {
 215.399 +            PropertyChangeEvent event = new PropertyChangeEvent(
 215.400 +                    comp, DialogDescriptor.PROP_HELP_CTX,
 215.401 +                    null, newHelpCtx);
 215.402 +            //
 215.403 +            // notify all parents that the help context is changed
 215.404 +            while (true) {
 215.405 +                if (parent instanceof PropertyChangeListener) {
 215.406 +                    ((PropertyChangeListener) parent).propertyChange(event);
 215.407 +                }
 215.408 +                //
 215.409 +                Container newParent = parent.getParent();
 215.410 +                if (newParent == null || newParent == parent) {
 215.411 +                    break;
 215.412 +                }
 215.413 +                parent = newParent;
 215.414 +            }
 215.415 +        }
 215.416 +    }
 215.417 +
 215.418 +    public static FileObject getFileObjectByModel(Model model) {
 215.419 +      if (model == null) {
 215.420 +        return null;
 215.421 +      }
 215.422 +      ModelSource src = model.getModelSource();
 215.423 +
 215.424 +      if (src == null) {
 215.425 +       return null;
 215.426 +      }
 215.427 +      Lookup lookup = src.getLookup();
 215.428 +
 215.429 +      if (lookup == null) {
 215.430 +        return null;
 215.431 +      }
 215.432 +      return lookup.lookup(FileObject.class);
 215.433 +    }
 215.434 +}
   216.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/axinodes/AxiomUtils.java	Thu Apr 17 10:51:04 2008 +0200
   216.2 +++ b/soa.ui/src/org/netbeans/modules/soa/ui/axinodes/AxiomUtils.java	Thu Apr 17 15:50:14 2008 +0200
   216.3 @@ -27,7 +27,7 @@
   216.4  import java.util.ListIterator;
   216.5  import java.util.Map;
   216.6  import javax.xml.namespace.QName;
   216.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   216.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   216.9  import org.netbeans.modules.soa.ui.axinodes.NodeType.BadgeModificator;
  216.10  import org.netbeans.modules.soa.ui.nodes.NodeFactory;
  216.11  import org.netbeans.modules.xml.axi.AXIComponent;
  216.12 @@ -500,10 +500,10 @@
  216.13          if (typeName == null) {
  216.14              result = attribute.getName(); // NOI18N
  216.15          } else {
  216.16 -            result = SoaUiUtil.getFormattedHtmlString(true,
  216.17 -                    new SoaUiUtil.TextChunk(attribute.getName()),
  216.18 -                    new SoaUiUtil.TextChunk(isOptionalText, SoaUiUtil.HTML_GRAY),
  216.19 -                    new SoaUiUtil.TextChunk(typeName, SoaUiUtil.HTML_GRAY));
  216.20 +            result = SoaUtil.getFormattedHtmlString(true,
  216.21 +                    new SoaUtil.TextChunk(attribute.getName()),
  216.22 +                    new SoaUtil.TextChunk(isOptionalText, SoaUtil.HTML_GRAY),
  216.23 +                    new SoaUtil.TextChunk(typeName, SoaUtil.HTML_GRAY));
  216.24          }
  216.25          //
  216.26          return result;
  216.27 @@ -519,10 +519,10 @@
  216.28          String typeName = type != null ? type.getName() : null;
  216.29          String multiplisity = getElementMultiplicityStr(element);
  216.30          //
  216.31 -        result = SoaUiUtil.getFormattedHtmlString(true,
  216.32 -                new SoaUiUtil.TextChunk(element.getName()),
  216.33 -                new SoaUiUtil.TextChunk(multiplisity, SoaUiUtil.HTML_GRAY),
  216.34 -                new SoaUiUtil.TextChunk(typeName, SoaUiUtil.HTML_GRAY));
  216.35 +        result = SoaUtil.getFormattedHtmlString(true,
  216.36 +                new SoaUtil.TextChunk(element.getName()),
  216.37 +                new SoaUtil.TextChunk(multiplisity, SoaUtil.HTML_GRAY),
  216.38 +                new SoaUtil.TextChunk(typeName, SoaUtil.HTML_GRAY));
  216.39          //
  216.40          return result;
  216.41      }
   217.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/util/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   217.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   217.3 @@ -1,81 +0,0 @@
   217.4 -#
   217.5 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   217.6 -#
   217.7 -# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   217.8 -#
   217.9 -# The contents of this file are subject to the terms of either the GNU
  217.10 -# General Public License Version 2 only ("GPL") or the Common
  217.11 -# Development and Distribution License("CDDL") (collectively, the
  217.12 -# "License"). You may not use this file except in compliance with the
  217.13 -# License. You can obtain a copy of the License at
  217.14 -# http://www.netbeans.org/cddl-gplv2.html
  217.15 -# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  217.16 -# specific language governing permissions and limitations under the
  217.17 -# License. When distributing the software, include this License Header
  217.18 -# Notice in each file and include the License file at
  217.19 -# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  217.20 -# particular file as subject to the "Classpath" exception as provided
  217.21 -# by Sun in the GPL Version 2 section of the License file that
  217.22 -# accompanied this code. If applicable, add the following below the
  217.23 -# License Header, with the fields enclosed by brackets [] replaced by
  217.24 -# your own identifying information:
  217.25 -# "Portions Copyrighted [year] [name of copyright owner]"
  217.26 -#
  217.27 -# Contributor(s):
  217.28 -#
  217.29 -# The Original Software is NetBeans. The Initial Developer of the Original
  217.30 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  217.31 -# Microsystems, Inc. All Rights Reserved.
  217.32 -#
  217.33 -# If you wish your version of this file to be governed by only the CDDL
  217.34 -# or only the GPL Version 2, indicate your decision by adding
  217.35 -# "[Contributor] elects to include this software in this distribution
  217.36 -# under the [CDDL or GPL Version 2] license." If you do not indicate a
  217.37 -# single choice of license, a recipient has the option to distribute
  217.38 -# your version of this file under either the CDDL, the GPL Version 2 or
  217.39 -# to extend the choice of license to its licensees as provided above.
  217.40 -# However, if you add GPL Version 2 code and therefore, elected the GPL
  217.41 -# Version 2 license, then the option applies only if the new code is
  217.42 -# made subject to such option by the copyright holder.
  217.43 -
  217.44 -# DurationDialog
  217.45 -LBL_Duration=Duration
  217.46 -ACS_Duration=Duration
  217.47 -LBL_OK=OK
  217.48 -ACS_OK=OK
  217.49 -LBL_Cancel=Cancel
  217.50 -ACS_Cancel=Cancel
  217.51 -LBL_Year=&Years:
  217.52 -ACS_Year=Years
  217.53 -LBL_Month=&Months:
  217.54 -ACS_Month=Months
  217.55 -LBL_Day=&Days:
  217.56 -ACS_Day=Days
  217.57 -LBL_Hour=&Hours:
  217.58 -ACS_Hour=Hours
  217.59 -LBL_Minute=M&inutes:
  217.60 -ACS_Minute=Minutes
  217.61 -LBL_Second=&Seconds:
  217.62 -ACS_Second=Seconds
  217.63 -# {0} - value
  217.64 -ERR_invalid_year=Invalid value of years: {0}
  217.65 -ERR_invalid_month=Invalid value of months: {0}
  217.66 -ERR_invalid_day=Invalid value of days: {0}
  217.67 -ERR_invalid_hour=Invalid value of hours: {0}
  217.68 -ERR_invalid_minute=Invalid value of minutes: {0}
  217.69 -ERR_invalid_second=Invalid value of seconds: {0}
  217.70 -
  217.71 -# DurationUtil
  217.72 -# {0} - value
  217.73 -FIX_Invalid_Value=invalid value "{0}"
  217.74 -FIX_Empty_Value=value can not be empty
  217.75 -FIX_P_symbol=symbol 'P' is absent
  217.76 -FIX_Year=years is invalid
  217.77 -FIX_Months=months is invalid
  217.78 -FIX_Days=days is invalid
  217.79 -FIX_Hours=hours is invalid
  217.80 -FIX_Minutes=minutes is invalid
  217.81 -FIX_Seconds=seconds is invalid
  217.82 -FIX_T_symbol=symbol 'T' is expected
  217.83 -FIX_Absent_T_symbol=the designator 'T' must be absent if and only if all of the time items are absent
  217.84 -FIX_Designator=At least one number and its designator must be present
   218.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/util/Duration.java	Thu Apr 17 10:51:04 2008 +0200
   218.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   218.3 @@ -1,108 +0,0 @@
   218.4 -/*
   218.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   218.6 - *
   218.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   218.8 - *
   218.9 - * The contents of this file are subject to the terms of either the GNU
  218.10 - * General Public License Version 2 only ("GPL") or the Common
  218.11 - * Development and Distribution License("CDDL") (collectively, the
  218.12 - * "License"). You may not use this file except in compliance with the
  218.13 - * License. You can obtain a copy of the License at
  218.14 - * http://www.netbeans.org/cddl-gplv2.html
  218.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  218.16 - * specific language governing permissions and limitations under the
  218.17 - * License. When distributing the software, include this License Header
  218.18 - * Notice in each file and include the License file at
  218.19 - * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  218.20 - * particular file as subject to the "Classpath" exception as provided
  218.21 - * by Sun in the GPL Version 2 section of the License file that
  218.22 - * accompanied this code. If applicable, add the following below the
  218.23 - * License Header, with the fields enclosed by brackets [] replaced by
  218.24 - * your own identifying information:
  218.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  218.26 - *
  218.27 - * Contributor(s):
  218.28 - *
  218.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  218.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  218.31 - * Microsystems, Inc. All Rights Reserved.
  218.32 - *
  218.33 - * If you wish your version of this file to be governed by only the CDDL
  218.34 - * or only the GPL Version 2, indicate your decision by adding
  218.35 - * "[Contributor] elects to include this software in this distribution
  218.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  218.37 - * single choice of license, a recipient has the option to distribute
  218.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  218.39 - * to extend the choice of license to its licensees as provided above.
  218.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  218.41 - * Version 2 license, then the option applies only if the new code is
  218.42 - * made subject to such option by the copyright holder.
  218.43 - */
  218.44 -package org.netbeans.modules.soa.ui.util;
  218.45 -
  218.46 -import static org.netbeans.modules.soa.ui.util.UI.*;
  218.47 -
  218.48 -/**
  218.49 - * @author Vladimir Yaroslavskiy
  218.50 - * @version 2007.11.27
  218.51 - */
  218.52 -public class Duration {
  218.53 -  public Duration(
  218.54 -    boolean hasMinus,
  218.55 -    int years,
  218.56 -    int months,
  218.57 -    int days,
  218.58 -    int hours,
  218.59 -    int minutes,
  218.60 -    double seconds
  218.61 -  ) {
  218.62 -    myHasMinus = hasMinus;
  218.63 -    myYears = years;
  218.64 -    myMonths = months;
  218.65 -    myDays = days;
  218.66 -    myHours = hours;
  218.67 -    myMinutes = minutes;
  218.68 -    mySeconds = seconds;
  218.69 -  }
  218.70 -
  218.71 -  public boolean hasMinus() {
  218.72 -    return myHasMinus;
  218.73 -  }
  218.74 -
  218.75 -  public int getYears() {
  218.76 -    return myYears;
  218.77 -  }
  218.78 -
  218.79 -  public int getMonths() {
  218.80 -    return myMonths;
  218.81 -  }
  218.82 -
  218.83 -  public int getDays() {
  218.84 -    return myDays;
  218.85 -  }
  218.86 -
  218.87 -  public int getHours() {
  218.88 -    return myHours;
  218.89 -  }
  218.90 -
  218.91 -  public int getMinutes() {
  218.92 -    return myMinutes;
  218.93 -  }
  218.94 -
  218.95 -  public double getSeconds() {
  218.96 -    return mySeconds;
  218.97 -  }
  218.98 -
  218.99 -  @Override
 218.100 -  public String toString() {
 218.101 -    return myYears + " " + myMonths + " " + myDays + " " + myHours + " " + myMinutes + " " + mySeconds; // NOI18N
 218.102 -  }
 218.103 -
 218.104 -  private boolean myHasMinus;
 218.105 -  private int myYears;
 218.106 -  private int myMonths;
 218.107 -  private int myDays;
 218.108 -  private int myHours;
 218.109 -  private int myMinutes;
 218.110 -  private double mySeconds;
 218.111 -}
   219.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/util/DurationDialog.java	Thu Apr 17 10:51:04 2008 +0200
   219.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   219.3 @@ -1,241 +0,0 @@
   219.4 -/*
   219.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   219.6 - *
   219.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   219.8 - *
   219.9 - * The contents of this file are subject to the terms of either the GNU
  219.10 - * General Public License Version 2 only ("GPL") or the Common
  219.11 - * Development and Distribution License("CDDL") (collectively, the
  219.12 - * "License"). You may not use this file except in compliance with the
  219.13 - * License. You can obtain a copy of the License at
  219.14 - * http://www.netbeans.org/cddl-gplv2.html
  219.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  219.16 - * specific language governing permissions and limitations under the
  219.17 - * License. When distributing the software, include this License Header
  219.18 - * Notice in each file and include the License file at
  219.19 - * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  219.20 - * particular file as subject to the "Classpath" exception as provided
  219.21 - * by Sun in the GPL Version 2 section of the License file that
  219.22 - * accompanied this code. If applicable, add the following below the
  219.23 - * License Header, with the fields enclosed by brackets [] replaced by
  219.24 - * your own identifying information:
  219.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  219.26 - *
  219.27 - * Contributor(s):
  219.28 - *
  219.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  219.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  219.31 - * Microsystems, Inc. All Rights Reserved.
  219.32 - *
  219.33 - * If you wish your version of this file to be governed by only the CDDL
  219.34 - * or only the GPL Version 2, indicate your decision by adding
  219.35 - * "[Contributor] elects to include this software in this distribution
  219.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  219.37 - * single choice of license, a recipient has the option to distribute
  219.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  219.39 - * to extend the choice of license to its licensees as provided above.
  219.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  219.41 - * Version 2 license, then the option applies only if the new code is
  219.42 - * made subject to such option by the copyright holder.
  219.43 - */
  219.44 -package org.netbeans.modules.soa.ui.util;
  219.45 -
  219.46 -import java.awt.BorderLayout;
  219.47 -import java.awt.Component;
  219.48 -import java.awt.Dimension;
  219.49 -import java.awt.FlowLayout;
  219.50 -import java.awt.Frame;
  219.51 -import java.awt.GridBagConstraints;
  219.52 -import java.awt.GridBagLayout;
  219.53 -import java.awt.Insets;
  219.54 -import java.awt.Rectangle;
  219.55 -import java.awt.event.ActionEvent;
  219.56 -import java.awt.event.ActionListener;
  219.57 -import java.awt.event.KeyEvent;
  219.58 -import java.util.List;
  219.59 -
  219.60 -import javax.swing.AbstractAction;
  219.61 -import javax.swing.Action;
  219.62 -import javax.swing.InputMap;
  219.63 -import javax.swing.JComponent;
  219.64 -import javax.swing.KeyStroke;
  219.65 -
  219.66 -import javax.swing.JButton;
  219.67 -import javax.swing.JCheckBox;
  219.68 -import javax.swing.JComboBox;
  219.69 -import javax.swing.JComponent;
  219.70 -import javax.swing.JDialog;
  219.71 -import javax.swing.JLabel;
  219.72 -import javax.swing.JPanel;
  219.73 -import javax.swing.JTextField;
  219.74 -
  219.75 -import org.openide.util.Utilities;
  219.76 -
  219.77 -import static org.netbeans.modules.soa.ui.util.UI.*;
  219.78 -
  219.79 -/**
  219.80 - * @author Vladimir Yaroslavskiy
  219.81 - * @version 2007.11.27
  219.82 - */
  219.83 -public final class DurationDialog extends JDialog {
  219.84 -
  219.85 -  public DurationDialog() {
  219.86 -    super((Frame) null, i18n(DurationDialog.class, "LBL_Duration"), true); // NOI18N
  219.87 -    a11y(this, i18n(DurationDialog.class, "ACS_Duration")); // NOI18N
  219.88 -    setLayout(new BorderLayout());
  219.89 -    add(getResizable(createPanel()), BorderLayout.CENTER);
  219.90 -    add(createButtonPanel(), BorderLayout.SOUTH);
  219.91 -
  219.92 -    String cancel = "cancel"; // NOI18N
  219.93 -    KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
  219.94 -    getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(key, cancel);
  219.95 -
  219.96 -    Action action = new AbstractAction() {
  219.97 -      public void actionPerformed(ActionEvent event) {
  219.98 -        dispose();
  219.99 -      }
 219.100 -    };
 219.101 -    getRootPane().getActionMap().put(cancel, action);
 219.102 -    
 219.103 -    pack();
 219.104 -    
 219.105 -    Rectangle r = Utilities.getUsableScreenBounds();
 219.106 -    int maxW = (r.width * 9) / 10;
 219.107 -    int maxH = (r.height * 9) / 10;
 219.108 -    Dimension d = getPreferredSize();
 219.109 -    d.width = Math.min(d.width, maxW);
 219.110 -    d.height = Math.min(d.height, maxH);
 219.111 -    setBounds(Utilities.findCenterBounds(d));
 219.112 -  }
 219.113 -
 219.114 -  private JPanel createButtonPanel() {
 219.115 -    JPanel panel = new JPanel();
 219.116 -    panel.setLayout(new FlowLayout(FlowLayout.RIGHT));
 219.117 -    JButton button;
 219.118 -
 219.119 -    button = createButton("LBL_OK", "ACS_OK"); // NOI18N
 219.120 -    getRootPane().setDefaultButton(button);
 219.121 -    button.addActionListener(new ActionListener() {
 219.122 -      public void actionPerformed(ActionEvent event) {
 219.123 -        if (check()) {
 219.124 -          dispose();
 219.125 -        }
 219.126 -      }
 219.127 -    });
 219.128 -    panel.add(button);
 219.129 -
 219.130 -    button = createButton("LBL_Cancel", "ACS_Cancel"); // NOI18N
 219.131 -    button.addActionListener(new ActionListener() {
 219.132 -      public void actionPerformed(ActionEvent event) {
 219.133 -        dispose();
 219.134 -      }
 219.135 -    });
 219.136 -    panel.add(button);
 219.137 -
 219.138 -    return panel;
 219.139 -  }
 219.140 -
 219.141 -  private JButton createButton(String key, String a11y) {
 219.142 -    JButton button = new JButton(i18n(DurationDialog.class, key));
 219.143 -    a11y(button, i18n(DurationDialog.class, a11y));
 219.144 -    return button;
 219.145 -  }
 219.146 -
 219.147 -  private JPanel createPanel() {
 219.148 -    JPanel panel = new JPanel(new GridBagLayout());
 219.149 -    GridBagConstraints c = new GridBagConstraints();
 219.150 -    c.gridy = 0;
 219.151 -
 219.152 -    myYear = createField("LBL_Year", "ACS_Year", c, panel); // NOI18N
 219.153 -    myMonth = createField("LBL_Month", "ACS_Month", c, panel); // NOI18N
 219.154 -    myDay = createField("LBL_Day", "ACS_Day", c, panel); // NOI18N
 219.155 -
 219.156 -    c.gridy++;
 219.157 -
 219.158 -    myHour = createField("LBL_Hour", "ACS_Hour", c, panel); // NOI18N
 219.159 -    myMinute = createField("LBL_Minute", "ACS_Minute", c, panel); // NOI18N
 219.160 -    mySecond = createField("LBL_Second", "ACS_Second", c, panel); // NOI18N
 219.161 -
 219.162 -    return panel;
 219.163 -  }
 219.164 -
 219.165 -  private JTextField createField(String key, String a11y, GridBagConstraints c, JPanel panel) {
 219.166 -    c.weightx = 0.0;
 219.167 -    c.fill = GridBagConstraints.NONE;
 219.168 -    c.insets = new Insets(10, 10, 0, 0);
 219.169 -    c.anchor = GridBagConstraints.EAST;
 219.170 -    JLabel label = createLabel(i18n(DurationDialog.class, key));
 219.171 -    panel.add(label, c);
 219.172 -
 219.173 -    c.weightx = 1.0;
 219.174 -    c.fill = GridBagConstraints.HORIZONTAL;
 219.175 -    c.insets = new Insets(10, 10, 0, 0);
 219.176 -    c.anchor = GridBagConstraints.WEST;
 219.177 -    JTextField field = new JTextField(DEFAULT_VALUE);
 219.178 -    a11y(field, i18n(DurationDialog.class, a11y));
 219.179 -    setWidth(field, TEXT_WIDTH);
 219.180 -    panel.add(field, c);
 219.181 -    label.setLabelFor(field);
 219.182 -
 219.183 -    return field;
 219.184 -  }
 219.185 -
 219.186 -  public String getDuration() {
 219.187 -    return myDuration;
 219.188 -  }
 219.189 -
 219.190 -  private boolean check() {
 219.191 -    int year = getInt(myYear.getText());
 219.192 -    int month = getInt(myMonth.getText());
 219.193 -    int day = getInt(myDay.getText());
 219.194 -    int hour = getInt(myHour.getText());
 219.195 -    int minute = getInt(myMinute.getText());
 219.196 -    double second = getDouble(mySecond.getText());
 219.197 -
 219.198 -    if (
 219.199 -      check(year, "ERR_invalid_year", myYear) && // NOI18N
 219.200 -      check(month, "ERR_invalid_month", myMonth) && // NOI18N
 219.201 -      check(day, "ERR_invalid_day", myDay) && // NOI18N
 219.202 -      check(hour, "ERR_invalid_hour", myHour) && // NOI18N
 219.203 -      check(minute, "ERR_invalid_minute", myMinute) && // NOI18N
 219.204 -      check(second, "ERR_invalid_second", mySecond)) // NOI18N
 219.205 -    {
 219.206 -      myDuration = DurationUtil.getContent(true, year, month, day, hour, minute, second);
 219.207 -      return true;
 219.208 -    }
 219.209 -    else {
 219.210 -      myDuration = null;
 219.211 -      return false;
 219.212 -    }
 219.213 -  }
 219.214 -
 219.215 -  private boolean check(int value, String key, JTextField field) {
 219.216 -    return check(value >= 0, key, field);
 219.217 -  }
 219.218 -
 219.219 -  private boolean check(double value, String key, JTextField field) {
 219.220 -    return check(value >= 0.0, key, field);
 219.221 -  }
 219.222 -
 219.223 -  private boolean check(boolean condition, String key, JTextField field) {
 219.224 -    if (condition) {
 219.225 -      return true;
 219.226 -    }
 219.227 -    printError(i18n(DurationDialog.class, key, field.getText()));
 219.228 -    field.requestFocus();
 219.229 -    field.selectAll();
 219.230 -
 219.231 -    return false;
 219.232 -  }
 219.233 -
 219.234 -  private JTextField myYear;
 219.235 -  private JTextField myMonth;
 219.236 -  private JTextField myDay;
 219.237 -  private JTextField myHour;
 219.238 -  private JTextField myMinute;
 219.239 -  private JTextField mySecond;
 219.240 -  private String myDuration;
 219.241 -
 219.242 -  private static final int TEXT_WIDTH = 60;
 219.243 -  private static final String DEFAULT_VALUE = "0"; // NOI18N
 219.244 -}
   220.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/util/DurationUtil.java	Thu Apr 17 10:51:04 2008 +0200
   220.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   220.3 @@ -1,331 +0,0 @@
   220.4 -/*
   220.5 - * The contents of this file are subject to the terms of the Common Development
   220.6 - * and Distribution License (the License). You may not use this file except in
   220.7 - * compliance with the License.
   220.8 - * 
   220.9 - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
  220.10 - * or http://www.netbeans.org/cddl.txt.
  220.11 - * 
  220.12 - * When distributing Covered Code, include this CDDL Header Notice in each file
  220.13 - * and include the License file at http://www.netbeans.org/cddl.txt.
  220.14 - * If applicable, add the following below the CDDL Header, with the fields
  220.15 - * enclosed by brackets [] replaced by your own identifying information:
  220.16 - * "Portions Copyrighted [year] [name of copyright owner]"
  220.17 - * 
  220.18 - * The Original Software is NetBeans. The Initial Developer of the Original
  220.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  220.20 - * Microsystems, Inc. All Rights Reserved.
  220.21 - */
  220.22 -package org.netbeans.modules.soa.ui.util;
  220.23 -
  220.24 -import static org.netbeans.modules.soa.ui.util.UI.*;
  220.25 -
  220.26 -/**
  220.27 - * @author Vladimir Yaroslavskiy
  220.28 - * @version 2006.04.14
  220.29 - */
  220.30 -public final class DurationUtil {
  220.31 -
  220.32 -  private DurationUtil() {}
  220.33 -
  220.34 -  public static Duration parseDuration(String value, boolean throwException) {
  220.35 -//out();
  220.36 -//out("PARSE duration: " + value);
  220.37 -    boolean hasMinus = false;
  220.38 -    int years = 0;
  220.39 -    int months = 0;
  220.40 -    int days = 0;
  220.41 -    int hours = 0;
  220.42 -    int minutes = 0;
  220.43 -    double seconds = 0.0;
  220.44 -//out("1");
  220.45 -    if (value == null || value.length() == 0) {
  220.46 -      return throwException("FIX_Empty_Value", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.47 -    }
  220.48 -//out("2");
  220.49 -    if ( !value.startsWith(QUOTE) && !value.endsWith(QUOTE)) {
  220.50 -      if (throwException) {
  220.51 -        return null;
  220.52 -      }
  220.53 -      return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
  220.54 -    }
  220.55 -    if (value.length() == 1 && value.startsWith(QUOTE)) {
  220.56 -      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.57 -    }
  220.58 -    if (value.startsWith(QUOTE) && !value.endsWith(QUOTE)) {
  220.59 -      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.60 -    }
  220.61 -    if (!value.startsWith(QUOTE) && value.endsWith(QUOTE)) {
  220.62 -      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.63 -    }
  220.64 -    value = removeQuotes(value);
  220.65 -
  220.66 -    if (value.length() == 0) {
  220.67 -      return throwException("FIX_Empty_Value", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.68 -    }
  220.69 -//out("3");
  220.70 -    int k;
  220.71 -    boolean wasDesignator = false;
  220.72 -    boolean wasDesignatorT = false;
  220.73 -
  220.74 -    // minus
  220.75 -    if (value.charAt(0) == MINUS.charAt(0)) {
  220.76 -      hasMinus = true;
  220.77 -      value = value.substring(1);
  220.78 -    }
  220.79 -    // P
  220.80 -    if (value.charAt(0) != P_DELIM.charAt(0)) {
  220.81 -      return throwException("FIX_P_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.82 -    }
  220.83 -    value = value.substring(1);
  220.84 -
  220.85 -    // years 
  220.86 -    k = value.indexOf(Y_DELIM);
  220.87 -   
  220.88 -    if (k != -1) {
  220.89 -      wasDesignator = true;
  220.90 -      years = parseInt(value.substring(0, k));
  220.91 -       
  220.92 -      if (years < 0) {
  220.93 -        return throwException("FIX_Year", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  220.94 -      }
  220.95 -      value = value.substring(k + 1);
  220.96 -    }
  220.97 -    // months 
  220.98 -    k = value.indexOf(M_DELIM);
  220.99 -    int t = value.indexOf(T_DELIM);
 220.100 -//out("4");
 220.101 -    
 220.102 -    if (k != -1) {
 220.103 -      months = parseInt(value.substring(0, k));
 220.104 -
 220.105 -      if (months < 0) {
 220.106 -        if (t == -1 || k < t) {
 220.107 -          return throwException("FIX_Months", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.108 -        }
 220.109 -        months = 0;
 220.110 -      }
 220.111 -      else {
 220.112 -        wasDesignator = true;
 220.113 -        value = value.substring(k + 1);
 220.114 -      }
 220.115 -    }
 220.116 -    // days 
 220.117 -    k = value.indexOf(D_DELIM);
 220.118 -    
 220.119 -    if (k != -1) {
 220.120 -      wasDesignator = true;
 220.121 -      days = parseInt(value.substring(0, k));
 220.122 -        
 220.123 -      if (days < 0) {
 220.124 -        return throwException("FIX_Days", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.125 -      }
 220.126 -      value = value.substring(k + 1);
 220.127 -    }
 220.128 -    if (value.length() == 0) {
 220.129 -      if ( !wasDesignator) {
 220.130 -        return throwException("FIX_Designator", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.131 -      }
 220.132 -      return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 220.133 -    }
 220.134 -//out("T: " + value);
 220.135 -    // T
 220.136 -    if (value.charAt(0) != T_DELIM.charAt(0)) {
 220.137 -      return throwException("FIX_T_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.138 -    }
 220.139 -    value = value.substring(1);
 220.140 -
 220.141 -    // hours 
 220.142 -    k = value.indexOf(H_DELIM);
 220.143 -    
 220.144 -    if (k != -1) {
 220.145 -      wasDesignator = true;
 220.146 -      wasDesignatorT = true;
 220.147 -      hours = parseInt(value.substring(0, k));
 220.148 -        
 220.149 -      if (hours < 0) {
 220.150 -        return throwException("FIX_Hours", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.151 -      }
 220.152 -      value = value.substring(k + 1);
 220.153 -    }
 220.154 -    // minutes 
 220.155 -    k = value.indexOf(M_DELIM);
 220.156 -    
 220.157 -    if (k != -1) {
 220.158 -      wasDesignator = true;
 220.159 -      wasDesignatorT = true;
 220.160 -      minutes = parseInt(value.substring(0, k));
 220.161 -        
 220.162 -      if (minutes < 0) {
 220.163 -        return throwException("FIX_Minutes", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.164 -      }
 220.165 -      value = value.substring(k + 1);
 220.166 -    }
 220.167 -    // seconds 
 220.168 -    k = value.indexOf(S_DELIM);
 220.169 -    
 220.170 -    if (k != -1) {
 220.171 -      wasDesignator = true;
 220.172 -      wasDesignatorT = true;
 220.173 -      seconds = parseDouble(value.substring(0, k));
 220.174 -        
 220.175 -      if (seconds < 0) {
 220.176 -        return throwException("FIX_Seconds", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.177 -      }
 220.178 -      value = value.substring(k + 1);
 220.179 -    }
 220.180 -    if ( !wasDesignatorT) {
 220.181 -      return throwException("FIX_Absent_T_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.182 -    }
 220.183 -    if ( !wasDesignator) {
 220.184 -      return throwException("FIX_Designator", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 220.185 -    }
 220.186 -//out("6: " + years + " " + months + " " + days + " " + hours + " " + minutes + " " + seconds);
 220.187 -    return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 220.188 -  }
 220.189 -
 220.190 -  private static Duration throwException(String key, boolean throwException, 
 220.191 -    boolean hasMinus, int years, int months, int days, int hours, int minutes, double seconds)
 220.192 -  {
 220.193 -    return throwExceptionMsg(i18n(DurationUtil.class, key), throwException, hasMinus, years, months, days, hours, minutes, seconds);
 220.194 -  }
 220.195 -
 220.196 -  private static Duration throwException(String key, String param, boolean throwException, 
 220.197 -    boolean hasMinus, int years, int months, int days, int hours, int minutes, double seconds)
 220.198 -  {
 220.199 -    return throwExceptionMsg(i18n(DurationUtil.class, key, param), throwException, hasMinus, years, months, days, hours, minutes, seconds);
 220.200 -  }
 220.201 -
 220.202 -  private static Duration throwExceptionMsg(String message, boolean throwException, 
 220.203 -    boolean hasMinus,
 220.204 -    int years,
 220.205 -    int months,
 220.206 -    int days,
 220.207 -    int hours,
 220.208 -    int minutes,
 220.209 -    double seconds)
 220.210 -  {
 220.211 -//out("ERROR: " + message);
 220.212 -    if (throwException) {
 220.213 -      throw new IllegalArgumentException(message);
 220.214 -    }
 220.215 -    return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 220.216 -  }
 220.217 -
 220.218 -  public static String addQuotes(String value) {
 220.219 -    return QUOTE + value + QUOTE;
 220.220 -  }
 220.221 -
 220.222 -  public static String removeQuotes(String value) {
 220.223 -    if (value == null) {
 220.224 -      return null;
 220.225 -    }
 220.226 -    if (value.startsWith(QUOTE)) {
 220.227 -      value = value.substring(1);
 220.228 -    }
 220.229 -    if (value.endsWith(QUOTE)) {
 220.230 -      value = value.substring(0, value.length() - 1);
 220.231 -    }
 220.232 -    return value;
 220.233 -  }
 220.234 -
 220.235 -  public static String getContent(
 220.236 -    boolean isFor,
 220.237 -    int year,
 220.238 -    int month,
 220.239 -    int day,
 220.240 -    int hour,
 220.241 -    int minute,
 220.242 -    double second)
 220.243 -  {
 220.244 -    if (isFor) {
 220.245 -      StringBuffer content = new StringBuffer();
 220.246 -      content.append(P_DELIM);
 220.247 -      content.append(getStr(year));
 220.248 -      content.append(Y_DELIM);
 220.249 -      content.append(getStr(month));
 220.250 -      content.append(M_DELIM);
 220.251 -      content.append(getStr(day));
 220.252 -      content.append(D_DELIM);
 220.253 -      content.append(T_DELIM);
 220.254 -      content.append(getStr(hour));
 220.255 -      content.append(H_DELIM);
 220.256 -      content.append(getStr(minute));
 220.257 -      content.append(M_DELIM);
 220.258 -      content.append(getStr(second));
 220.259 -      content.append(S_DELIM);
 220.260 -      return content.toString();
 220.261 -    }
 220.262 -    else {
 220.263 -      return getParseUntil(
 220.264 -        getString(year),
 220.265 -        getString(month),
 220.266 -        getString(day),
 220.267 -        getString(hour),
 220.268 -        getString(minute),
 220.269 -        getStr(second));
 220.270 -    }
 220.271 -  }
 220.272 -
 220.273 -  public static String getParseUntil(
 220.274 -    String year,
 220.275 -    String month,
 220.276 -    String day,
 220.277 -    String hour,
 220.278 -    String minute,
 220.279 -    String second)
 220.280 -  {
 220.281 -    StringBuffer content = new StringBuffer();
 220.282 -    content.append(year);
 220.283 -    content.append(MINUS);
 220.284 -    content.append(month);
 220.285 -    content.append(MINUS);
 220.286 -    content.append(day);
 220.287 -    content.append(T_DELIM);
 220.288 -    content.append(hour);
 220.289 -    content.append(COLON);
 220.290 -    content.append(minute);
 220.291 -    content.append(COLON);
 220.292 -    content.append(second);
 220.293 -    return content.toString();
 220.294 -  }
 220.295 -
 220.296 -  public static int parseInt(String value) {
 220.297 -    return getInt(value);
 220.298 -  }
 220.299 -
 220.300 -  public static double parseDouble(String value) {
 220.301 -    return getDouble(value);
 220.302 -  }
 220.303 -
 220.304 -  private static String getString(int value) {
 220.305 -    if (0 <= value && value <= NINE) {
 220.306 -      return ZERO + value;
 220.307 -    }
 220.308 -    return getStr(value);
 220.309 -  }
 220.310 -
 220.311 -  private static String getStr(int value) {
 220.312 -    return EMPTY + value;
 220.313 -  }
 220.314 -  
 220.315 -  private static String getStr(double value) {
 220.316 -    return EMPTY + value;
 220.317 -  }
 220.318 -  
 220.319 -  private static final int NINE = 9;
 220.320 -
 220.321 -  private static final String EMPTY   =  ""; // NOI18N
 220.322 -  private static final String ZERO    = "0"; // NOI18N
 220.323 -  private static final String MINUS   = "-"; // NOI18N
 220.324 -  private static final String COLON   = ":"; // NOI18N
 220.325 -  private static final String QUOTE   = "'"; // NOI18N
 220.326 -
 220.327 -  private static final String D_DELIM = "D"; // NOI18N
 220.328 -  private static final String H_DELIM = "H"; // NOI18N
 220.329 -  private static final String M_DELIM = "M"; // NOI18N
 220.330 -  private static final String P_DELIM = "P"; // NOI18N
 220.331 -  private static final String S_DELIM = "S"; // NOI18N
 220.332 -  private static final String Y_DELIM = "Y"; // NOI18N
 220.333 -  public  static final String T_DELIM = "T"; // NOI18N
 220.334 -}
   221.1 --- a/soa.ui/src/org/netbeans/modules/soa/ui/util/UI.java	Thu Apr 17 10:51:04 2008 +0200
   221.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   221.3 @@ -1,873 +0,0 @@
   221.4 -/*
   221.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   221.6 - *
   221.7 - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   221.8 - *
   221.9 - * The contents of this file are subject to the terms of either the GNU
  221.10 - * General Public License Version 2 only ("GPL") or the Common
  221.11 - * Development and Distribution License("CDDL") (collectively, the
  221.12 - * "License"). You may not use this file except in compliance with the
  221.13 - * License. You can obtain a copy of the License at
  221.14 - * http://www.netbeans.org/cddl-gplv2.html
  221.15 - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  221.16 - * specific language governing permissions and limitations under the
  221.17 - * License. When distributing the software, include this License Header
  221.18 - * Notice in each file and include the License file at
  221.19 - * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  221.20 - * particular file as subject to the "Classpath" exception as provided
  221.21 - * by Sun in the GPL Version 2 section of the License file that
  221.22 - * accompanied this code. If applicable, add the following below the
  221.23 - * License Header, with the fields enclosed by brackets [] replaced by
  221.24 - * your own identifying information:
  221.25 - * "Portions Copyrighted [year] [name of copyright owner]"
  221.26 - *
  221.27 - * Contributor(s):
  221.28 - *
  221.29 - * The Original Software is NetBeans. The Initial Developer of the Original
  221.30 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  221.31 - * Microsystems, Inc. All Rights Reserved.
  221.32 - *
  221.33 - * If you wish your version of this file to be governed by only the CDDL
  221.34 - * or only the GPL Version 2, indicate your decision by adding
  221.35 - * "[Contributor] elects to include this software in this distribution
  221.36 - * under the [CDDL or GPL Version 2] license." If you do not indicate a
  221.37 - * single choice of license, a recipient has the option to distribute
  221.38 - * your version of this file under either the CDDL, the GPL Version 2 or
  221.39 - * to extend the choice of license to its licensees as provided above.
  221.40 - * However, if you add GPL Version 2 code and therefore, elected the GPL
  221.41 - * Version 2 license, then the option applies only if the new code is
  221.42 - * made subject to such option by the copyright holder.
  221.43 - */
  221.44 -package org.netbeans.modules.soa.ui.util;
  221.45 -
  221.46 -import java.awt.Component;
  221.47 -import java.awt.Dimension;
  221.48 -import java.awt.Insets;
  221.49 -import java.awt.Graphics;
  221.50 -import java.awt.GridBagConstraints;
  221.51 -import java.awt.GridBagLayout;
  221.52 -import java.awt.Event;
  221.53 -import java.awt.Toolkit;
  221.54 -import java.awt.datatransfer.Clipboard;
  221.55 -import java.awt.datatransfer.StringSelection;
  221.56 -import java.awt.event.ComponentAdapter;
  221.57 -import java.awt.event.ComponentEvent;
  221.58 -import java.awt.event.KeyEvent;
  221.59 -import java.awt.event.WindowAdapter;
  221.60 -import java.awt.event.WindowEvent;
  221.61 -import java.util.ArrayList;
  221.62 -import java.util.Collection;
  221.63 -import java.util.List;
  221.64 -import java.util.Stack;
  221.65 -
  221.66 -import javax.swing.Action;
  221.67 -import javax.swing.AbstractAction;
  221.68 -import javax.swing.AbstractButton;
  221.69 -import javax.swing.Icon;
  221.70 -import javax.swing.ImageIcon;
  221.71 -import javax.swing.JButton;
  221.72 -import javax.swing.JCheckBox;
  221.73 -import javax.swing.JComboBox;
  221.74 -import javax.swing.JComponent;
  221.75 -import javax.swing.JDialog;
  221.76 -import javax.swing.JLabel;
  221.77 -import javax.swing.JPanel;
  221.78 -import javax.swing.JRadioButton;
  221.79 -import javax.swing.JSeparator;
  221.80 -import javax.swing.JTextArea;
  221.81 -import javax.swing.JToggleButton;
  221.82 -import javax.swing.SwingUtilities;
  221.83 -import javax.swing.border.Border;
  221.84 -import javax.swing.border.EmptyBorder;
  221.85 -
  221.86 -import org.openide.DialogDescriptor;
  221.87 -import org.openide.DialogDisplayer;
  221.88 -import org.openide.NotifyDescriptor;
  221.89 -import org.openide.awt.Mnemonics;
  221.90 -import org.openide.loaders.DataObject;
  221.91 -import org.openide.nodes.Node;
  221.92 -import org.openide.windows.TopComponent;
  221.93 -import org.openide.util.Lookup;
  221.94 -import org.openide.util.NbBundle;
  221.95 -import org.openide.util.datatransfer.ExClipboard;
  221.96 -
  221.97 -/**
  221.98 - * @author Vladimir Yaroslavskiy
  221.99 - * @version 2005.12.14
 221.100 - */
 221.101 -public final class UI {
 221.102 -
 221.103 -  private UI() {}
 221.104 -
 221.105 -  public static boolean isAlt(int modifiers) {
 221.106 -    return isModifier(modifiers, KeyEvent.ALT_MASK);
 221.107 -  }
 221.108 -
 221.109 -  public static boolean isShift(int modifiers) {
 221.110 -    return isModifier(modifiers, KeyEvent.SHIFT_MASK);
 221.111 -  }
 221.112 -
 221.113 -  public static boolean isCtrl(int modifiers) {
 221.114 -    return
 221.115 -      isModifier(modifiers, KeyEvent.CTRL_MASK) ||
 221.116 -      isModifier(modifiers, KeyEvent.META_MASK);
 221.117 -  }
 221.118 -
 221.119 -  private static boolean isModifier(int modifiers, int mask) {
 221.120 -    return (modifiers & mask) != 0;
 221.121 -  }
 221.122 -
 221.123 -  public static MyComboBox createComboBox(Object [] items) {
 221.124 -    return new MyComboBox(items);
 221.125 -  }
 221.126 -
 221.127 -  public static JLabel createLabel(String message) {
 221.128 -    JLabel label = new JLabel();
 221.129 -    Mnemonics.setLocalizedText(label, message);
 221.130 -    return label;
 221.131 -  }
 221.132 -
 221.133 -  public static JRadioButton createRadioButton(String text, String toolTip) {
 221.134 -    JRadioButton button = new JRadioButton();
 221.135 -    Mnemonics.setLocalizedText(button, text);
 221.136 -    button.setText(cutMnemonicAndAmpersand(text));
 221.137 -    button.setToolTipText(toolTip);
 221.138 -    return button;
 221.139 -  }
 221.140 -
 221.141 -  public static JButton createButton(Action action) {
 221.142 -    JButton button = (JButton) createAbstractButton(new JButton(), action);
 221.143 -    Object name = action.getValue(Action.NAME);
 221.144 -
 221.145 -    if (name == null) {
 221.146 -      setButtonSize(button);
 221.147 -    }
 221.148 -    return button;
 221.149 -  }
 221.150 -
 221.151 -  public static JCheckBox createCheckBox(Action action) {
 221.152 -    return (JCheckBox) createAbstractButton(new JCheckBox(), action);
 221.153 -  }
 221.154 -
 221.155 -  public static JToggleButton createToggleButton(Action action) {
 221.156 -    return (JToggleButton) createAbstractButton(new JToggleButton(), action);
 221.157 -  }
 221.158 -
 221.159 -  public static void setItems(JComboBox comboBox, Object [] items) {
 221.160 -    Object selected = comboBox.getSelectedItem();
 221.161 -    comboBox.removeAllItems();
 221.162 -    
 221.163 -    for (int i=0; i < items.length; i++) {
 221.164 -      comboBox.insertItemAt(items [i], i);
 221.165 -    }
 221.166 -    if (items.length > 0) {
 221.167 -      comboBox.setSelectedIndex(0);
 221.168 -    }
 221.169 -    if (selected != null) {
 221.170 -      comboBox.setSelectedItem(selected);
 221.171 -    }
 221.172 -  }
 221.173 -
 221.174 -  public static JPanel createSeparator(String message) {
 221.175 -    JPanel panel = new JPanel(new GridBagLayout());
 221.176 -    GridBagConstraints c = new GridBagConstraints();
 221.177 -    c.anchor = GridBagConstraints.WEST;
 221.178 -
 221.179 -    c.insets = new Insets(SMALL_INSET, 0, SMALL_INSET, 0);
 221.180 -    panel.add(createLabel(message), c);
 221.181 -
 221.182 -    c.weightx = 1.0;
 221.183 -    c.fill = GridBagConstraints.HORIZONTAL;
 221.184 -    c.insets = new Insets(SMALL_INSET, SMALL_INSET, SMALL_INSET, 0);
 221.185 -    panel.add(new JSeparator(), c);
 221.186 -
 221.187 -    return panel;
 221.188 -  }
 221.189 -
 221.190 -  private static AbstractButton createAbstractButton(
 221.191 -    AbstractButton button,
 221.192 -    Action action)
 221.193 -  {
 221.194 -    button.setAction(action);
 221.195 -    mnemonicAndToolTip(button, (String) action.getValue(Action.SHORT_DESCRIPTION));
 221.196 -    return button;
 221.197 -  }
 221.198 -
 221.199 -  private static void mnemonicAndToolTip(AbstractButton button, String toolTip) {
 221.200 -    String text = button.getText();
 221.201 -
 221.202 -    if (text == null) {
 221.203 -      Mnemonics.setLocalizedText(button, toolTip);
 221.204 -      button.setText(null);
 221.205 -    }
 221.206 -    else {
 221.207 -      Mnemonics.setLocalizedText(button, text);
 221.208 -      button.setText(cutMnemonicAndAmpersand(text));
 221.209 -    }
 221.210 -    button.setToolTipText(cutMnemonicAndAmpersand(toolTip));
 221.211 -  }
 221.212 -
 221.213 -  private static String cutMnemonicAndAmpersand(String value) {
 221.214 -    if (value == null) {
 221.215 -      return null;
 221.216 -    }
 221.217 -    int k = value.lastIndexOf(" // "); // NOI18N
 221.218 -
 221.219 -    if (k != -1) {
 221.220 -      value = value.substring(0, k);
 221.221 -    }
 221.222 -    k = value.indexOf("&"); // NOI18N
 221.223 -
 221.224 -    if (k == -1) {
 221.225 -      return value;
 221.226 -    }
 221.227 -    return value.substring(0, k) + value.substring(k + 1);
 221.228 -  }
 221.229 -
 221.230 -  public static JTextArea createTextArea(int columns, String message) {
 221.231 -    JTextArea text = new JTextArea(message);
 221.232 -    text.setBackground(null);
 221.233 -    text.setEditable(false);
 221.234 -    text.setColumns(columns);
 221.235 -    text.setLineWrap(true);
 221.236 -    text.setWrapStyleWord(true);
 221.237 -    return text;
 221.238 -  }
 221.239 -
 221.240 -  public static void a11y(Component component, String a11y) {
 221.241 -      a11y(component, a11y, a11y);
 221.242 -  }
 221.243 -
 221.244 -  public static void a11y(Component component, String a11yN, String a11yD) {
 221.245 -    if (a11yN != null) {  
 221.246 -        component.getAccessibleContext().setAccessibleName(a11yN);
 221.247 -    }
 221.248 -    if (a11yD != null) {
 221.249 -        component.getAccessibleContext().setAccessibleDescription(a11yD);
 221.250 -    }
 221.251 -  }
 221.252 -
 221.253 -  public static String i18n(Class clazz, String key) {
 221.254 -    if (key == null) {
 221.255 -      return null;
 221.256 -    }
 221.257 -    return NbBundle.getMessage(clazz, key);
 221.258 -  }
 221.259 -
 221.260 -  public static String i18n(Class clazz, String key, String param) {
 221.261 -    if (key == null) {
 221.262 -      return null;
 221.263 -    }
 221.264 -    return NbBundle.getMessage(clazz, key, param);
 221.265 -  }
 221.266 -
 221.267 -  public static String i18n(Class clazz, String key, String param1, String param2) {
 221.268 -    if (key == null) {
 221.269 -      return null;
 221.270 -    }
 221.271 -    return NbBundle.getMessage(clazz, key, param1, param2);
 221.272 -  }
 221.273 -
 221.274 -  public static String i18n(
 221.275 -    Class clazz,
 221.276 -    String key,
 221.277 -    String param1,
 221.278 -    String param2,
 221.279 -    String param3)
 221.280 -  {
 221.281 -    if (key == null) {
 221.282 -      return null;
 221.283 -    }
 221.284 -    return NbBundle.getMessage(clazz, key, param1, param2, param3);
 221.285 -  }
 221.286 -
 221.287 -  public static boolean printWarning(String message) {
 221.288 -    NotifyDescriptor confirm = new NotifyDescriptor.Confirmation(
 221.289 -      message,
 221.290 -      NotifyDescriptor.YES_NO_OPTION,
 221.291 -      NotifyDescriptor.WARNING_MESSAGE
 221.292 -    );
 221.293 -    DialogDisplayer.getDefault().notify(confirm);
 221.294 -
 221.295 -    return confirm.getValue() == NotifyDescriptor.YES_OPTION;
 221.296 -  }
 221.297 -
 221.298 -  public static boolean printConfirmation(String message) {
 221.299 -    return NotifyDescriptor.YES_OPTION.equals(
 221.300 -      DialogDisplayer.getDefault().notify(
 221.301 -        new NotifyDescriptor.Confirmation(message, NotifyDescriptor.YES_NO_OPTION)));
 221.302 -  }
 221.303 -
 221.304 -  public static void printInformation(String message) {
 221.305 -    print(message, NotifyDescriptor.INFORMATION_MESSAGE);
 221.306 -  }
 221.307 -
 221.308 -  public static void printError(String message) {
 221.309 -    print(message, NotifyDescriptor.ERROR_MESSAGE);
 221.310 -  }
 221.311 -
 221.312 -  private static void print(String message, int type) {
 221.313 -    DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, type));
 221.314 -  }
 221.315 -
 221.316 -  public static ImageIcon icon(Class clazz, String name) {
 221.317 -    if (name == null) {
 221.318 -      return null;
 221.319 -    }
 221.320 -    return new ImageIcon(clazz.getResource("image/"+ name +".gif")); // NOI18N
 221.321 -  }
 221.322 -
 221.323 -  public static Node getSelectedNode() {
 221.324 -    Node [] nodes = getSelectedNodes();
 221.325 -
 221.326 -    if (nodes == null) {
 221.327 -      return null;
 221.328 -    }
 221.329 -    return nodes [0];
 221.330 -  }
 221.331 -
 221.332 -  public static Node [] getSelectedNodes() {
 221.333 -//out();
 221.334 -    TopComponent top = getActivateTopComponent();
 221.335 -//out("top: " + top);
 221.336 -    if (top == null) {
 221.337 -      return null;
 221.338 -    }
 221.339 -    Node [] nodes = top.getActivatedNodes();
 221.340 -//out("nodes: " + nodes);
 221.341 -
 221.342 -    if (nodes == null || nodes.length == 0) {
 221.343 -      return null;
 221.344 -    }
 221.345 -    return nodes;
 221.346 -  }
 221.347 -
 221.348 -  public static TopComponent getActivateTopComponent() {
 221.349 -    return TopComponent.getRegistry().getActivated();
 221.350 -  }
 221.351 -  
 221.352 -  public static void setWidth(JComponent component, int width) {
 221.353 -    setDimension(component, new Dimension(width, component.getPreferredSize().height));
 221.354 -  }
 221.355 -
 221.356 -  public static void setHeight(JComponent component, int height) {
 221.357 -    setDimension(component, new Dimension(component.getPreferredSize().width, height));
 221.358 -  }
 221.359 -
 221.360 -  private static void setDimension(JComponent component, Dimension dimension) {
 221.361 -    component.setMinimumSize(dimension);
 221.362 -    component.setPreferredSize(dimension);
 221.363 -  }
 221.364 -
 221.365 -  public static int getInt(String value) {
 221.366 -    try {
 221.367 -      return Integer.parseInt(value);
 221.368 -    }
 221.369 -    catch (NumberFormatException e) {
 221.370 -      return -1;
 221.371 -    }
 221.372 -  }
 221.373 -
 221.374 -  public static double getDouble(String value) {
 221.375 -    try {
 221.376 -      return Double.parseDouble(value);
 221.377 -    }
 221.378 -    catch (NumberFormatException e) {
 221.379 -      return -1.0;
 221.380 -    }
 221.381 -  }
 221.382 -
 221.383 -  public static int round(double value) {
 221.384 -    return (int) Math.ceil(value);
 221.385 -  }
 221.386 -
 221.387 -  public static String replace(String source, String searchFor, String replaceWith) {
 221.388 -    if (source == null) {
 221.389 -      return null;
 221.390 -    }
 221.391 -    if (searchFor == null || searchFor.length() == 0) {
 221.392 -      return null;
 221.393 -    }
 221.394 -    int k = 0;
 221.395 -    int found = source.indexOf(searchFor, k);
 221.396 -    StringBuffer buffer = new StringBuffer();
 221.397 -
 221.398 -    while (true) {
 221.399 -      if (found == -1) {
 221.400 -        break;
 221.401 -      }
 221.402 -      buffer.append(source.substring(k, found));
 221.403 -      buffer.append(replaceWith);
 221.404 -
 221.405 -      k = found + searchFor.length();
 221.406 -      found = source.indexOf(searchFor, k);
 221.407 -    }
 221.408 -    if (k > 0) {
 221.409 -        buffer.append(source.substring(k));
 221.410 -        return buffer.toString();
 221.411 -    }
 221.412 -    else {
 221.413 -      return source;
 221.414 -    }
 221.415 -  }
 221.416 -
 221.417 -  public static DataObject getDataObject(Node node) {
 221.418 -    if (node == null) {
 221.419 -      return null;
 221.420 -    }
 221.421 -    return (DataObject) node.getLookup().lookup(DataObject.class);
 221.422 -  }
 221.423 -
 221.424 -  private static void setButtonSize(JButton button) {
 221.425 -    button.setMaximumSize(BUTTON_SIZE);
 221.426 -    button.setMinimumSize(BUTTON_SIZE);
 221.427 -    button.setPreferredSize(BUTTON_SIZE);
 221.428 -  }
 221.429 -
 221.430 -  public static JComponent getResizable(JPanel panel) {
 221.431 -    JPanel p = new JPanel(new GridBagLayout());
 221.432 -    GridBagConstraints c = new GridBagConstraints();
 221.433 -
 221.434 -    c.weightx = 1.0;
 221.435 -    c.weighty = 1.0;
 221.436 -    c.insets = new Insets(TINY_INSET, MEDIUM_INSET, 0, MEDIUM_INSET);
 221.437 -    c.anchor = GridBagConstraints.NORTHWEST;
 221.438 -    c.fill = GridBagConstraints.HORIZONTAL;
 221.439 -    p.add(panel, c);
 221.440 -
 221.441 -    return p;
 221.442 -  }
 221.443 -
 221.444 -
 221.445 -  public static String removeHtml(String value) {
 221.446 -    if (value == null) {
 221.447 -      return null;
 221.448 -    }
 221.449 -    value = replace(value, "<b>", "'"); // NOI18N
 221.450 -    value = replace(value, "</b>", "'"); // NOI18N
 221.451 -    value = replace(value, "&nbsp;", " "); // NOI18N
 221.452 -    
 221.453 -    return value;
 221.454 -  }
 221.455 -
 221.456 -  public static String getHtml(String value) {
 221.457 -    return "<html>" + value + "</html>"; // NOI18N
 221.458 -  }
 221.459 -
 221.460 -  
 221.461 -  public static <T> List<T> getInstances(Class<T> clazz) {
 221.462 -    Collection<? extends T> collection = Lookup.getDefault().lookupAll(clazz);
 221.463 -    List<T> list = new ArrayList<T>();
 221.464 -
 221.465 -    for (Object object : collection) {
 221.466 -      list.add(clazz.cast(object));
 221.467 -    }
 221.468 -    return list;
 221.469 -  }
 221.470 -
 221.471 -  public static void copyToClipboard(String value) {
 221.472 -    getClipboard().setContents(new StringSelection(value), null);
 221.473 -  }
 221.474 -  
 221.475 -  private static Clipboard getClipboard() {
 221.476 -    Clipboard clipboard = Lookup.getDefault().lookup(ExClipboard.class);
 221.477 -
 221.478 -    if (clipboard == null) {
 221.479 -      clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
 221.480 -    }
 221.481 -    return clipboard;
 221.482 -  }
 221.483 -  
 221.484 -  public static void startTimeln() {
 221.485 -    tim();
 221.486 -    startTime();
 221.487 -  }
 221.488 -
 221.489 -  public static void startTime() {
 221.490 -    ourTimes.push(System.currentTimeMillis());
 221.491 -  }
 221.492 -
 221.493 -  public static void endTime(Object object) {
 221.494 -    long currentTime = System.currentTimeMillis();
 221.495 -    tim(object + ": " + ((currentTime - ourTimes.pop()) / MILLIS) + " sec."); // NOI18N
 221.496 -  }
 221.497 -
 221.498 -  public static void tim() {
 221.499 -    if (ENABLE_TIM) {
 221.500 -      System.out.println();
 221.501 -    }
 221.502 -  }
 221.503 -
 221.504 -  public static void tim(Object object) {
 221.505 -    if (ENABLE_TIM) {
 221.506 -      System.out.println("*** " + object); // NOI18N
 221.507 -    }
 221.508 -  }
 221.509 -  
 221.510 -  public static void log() {
 221.511 -    if (ENABLE_LOG) {
 221.512 -      System.out.println();
 221.513 -    }
 221.514 -  }
 221.515 -
 221.516 -  public static void log(Object object) {
 221.517 -    if (ENABLE_LOG) {
 221.518 -      System.out.println("*** " + object); // NOI18N
 221.519 -    }
 221.520 -  }
 221.521 -
 221.522 -  public static void stackTrace() {
 221.523 -    stackTrace(null);
 221.524 -  }
 221.525 -
 221.526 -  public static void stackTrace(Object object) {
 221.527 -    out();
 221.528 -    out();
 221.529 -
 221.530 -    if (object != null) {
 221.531 -      out(object);
 221.532 -    }
 221.533 -    new Exception("!!!").printStackTrace(); // NOI18N
 221.534 -  }
 221.535 -
 221.536 -  public static void out() {
 221.537 -    if (ENABLE_OUT) {
 221.538 -      System.out.println();
 221.539 -    }
 221.540 -  }
 221.541 -
 221.542 -  public static void out(Object object) {
 221.543 -    if (ENABLE_OUT) {
 221.544 -      System.out.println("*** " + object); // NOI18N
 221.545 -    }
 221.546 -  }
 221.547 -
 221.548 -  // ------------------------------------------------
 221.549 -  public static class MyComboBox extends JComboBox {
 221.550 -    public MyComboBox(Object [] items) {
 221.551 -      super(items);
 221.552 -      init();
 221.553 -    }
 221.554 -
 221.555 -    @Override
 221.556 -    public boolean selectWithKeyChar(char key)
 221.557 -    {
 221.558 -      processKey(key);
 221.559 -      setSelectedIndex(myIndex);
 221.560 -      return true;
 221.561 -    }
 221.562 -
 221.563 -    public void init() {
 221.564 -//out();
 221.565 -//out("init");
 221.566 -      myIndex = 0;
 221.567 -      myPrefix = ""; // NOI18N
 221.568 -    }
 221.569 -
 221.570 -    private void processKey(char key) {
 221.571 -//out("select: '" + key);
 221.572 -      if (((int) key) == Event.BACK_SPACE) {
 221.573 -        init();
 221.574 -        return;
 221.575 -      }
 221.576 -      myPrefix += key;
 221.577 -      myPrefix = myPrefix.toLowerCase();
 221.578 -
 221.579 -//out("prefix: " + myPrefix);
 221.580 -      for (int i=myIndex; i < getItemCount(); i++) {
 221.581 -        String item = getItemAt(i).toString().toLowerCase();
 221.582 -//out("  see: " + item);
 221.583 -
 221.584 -        if (item.startsWith(myPrefix)) {
 221.585 -          myIndex = i;
 221.586 -          return;
 221.587 -        }
 221.588 -      }
 221.589 -    }
 221.590 -
 221.591 -    private int myIndex;
 221.592 -    private String myPrefix;
 221.593 -  }
 221.594 -
 221.595 -  // -------------------------------------------------------------
 221.596 -  public abstract static class IconAction extends AbstractAction {
 221.597 -
 221.598 -    protected IconAction(String name, String toolTip, Icon icon) {
 221.599 -      super(name, icon);
 221.600 -      putValue(SHORT_DESCRIPTION, toolTip);
 221.601 -    }
 221.602 -
 221.603 -    protected final Node getLastNode() {
 221.604 -      Node node = getSelectedNode();
 221.605 -
 221.606 -      if (node == null) {
 221.607 -        node = myLastNode;
 221.608 -      }
 221.609 -      else {
 221.610 -        myLastNode = node;
 221.611 -      }
 221.612 -      return node;
 221.613 -    }
 221.614 -  
 221.615 -    private Node myLastNode;
 221.616 -  }
 221.617 -
 221.618 -  // ---------------------------------------------------------------
 221.619 -  public abstract static class ButtonAction extends AbstractAction {
 221.620 -
 221.621 -    public ButtonAction(String text, String toolTip) {
 221.622 -      this(text, null, toolTip);
 221.623 -    }
 221.624 -         
 221.625 -    public ButtonAction(Icon icon, String toolTip) {
 221.626 -      this(null, icon, toolTip);
 221.627 -    }
 221.628 -
 221.629 -    public ButtonAction(String text) {
 221.630 -      this(text, null, text);
 221.631 -    }
 221.632 -
 221.633 -    private ButtonAction(String text, Icon icon, String toolTip) {
 221.634 -      super(text, icon);
 221.635 -      putValue(SHORT_DESCRIPTION, toolTip);
 221.636 -    }
 221.637 -  }
 221.638 -
 221.639 -  // --------------------------------------------------------
 221.640 -  public abstract static class Dialog extends WindowAdapter {
 221.641 -
 221.642 -    protected void opened()  {}
 221.643 -    protected void resized() {}
 221.644 -    protected void updated() {}
 221.645 -   
 221.646 -    protected abstract DialogDescriptor createDescriptor();
 221.647 -
 221.648 -    public void show() {
 221.649 -      show(true);
 221.650 -    }
 221.651 -
 221.652 -    public void showAndWait() {
 221.653 -      show(false);
 221.654 -    }
 221.655 -
 221.656 -    private void show(boolean inSwingThread) {
 221.657 -      if (myDialog == null) {
 221.658 -        myDialog = DialogDisplayer.getDefault().createDialog(createDescriptor());
 221.659 -        myDialog.addWindowListener(this);
 221.660 -        setCorner();
 221.661 -        myDialog.addComponentListener(
 221.662 -          new ComponentAdapter() {
 221.663 -            public void componentResized(ComponentEvent event) {
 221.664 -              resized();
 221.665 -            }
 221.666 -          }
 221.667 -        );
 221.668 -      }
 221.669 -      else {
 221.670 -        opened();
 221.671 -      }
 221.672 -      updated();
 221.673 -
 221.674 -      if (inSwingThread) {
 221.675 -        SwingUtilities.invokeLater(new Runnable() { public void run() {
 221.676 -          myDialog.pack();
 221.677 -          myDialog.setVisible(true);
 221.678 -        }});
 221.679 -      }
 221.680 -      else {
 221.681 -        myDialog.pack();
 221.682 -        myDialog.setVisible(true);
 221.683 -      }
 221.684 -    }
 221.685 -
 221.686 -    public Component getUIComponent() {
 221.687 -      return myDialog;
 221.688 -    }
 221.689 -
 221.690 -    @Override
 221.691 -    public void windowOpened(WindowEvent event)
 221.692 -    {
 221.693 -      opened();
 221.694 -    }
 221.695 -
 221.696 -    protected final String i18n(String key) {
 221.697 -      return UI.i18n(getClass(), key);
 221.698 -    }
 221.699 -
 221.700 -    protected final String i18n(String key, String param) {
 221.701 -      return UI.i18n(getClass(), key, param);
 221.702 -    }
 221.703 -
 221.704 -    private void setCorner() {
 221.705 -      if (myDialog instanceof JDialog) {
 221.706 -        ((JDialog) myDialog).getRootPane().setBorder(CORNER_BORDER);
 221.707 -      }
 221.708 -    }
 221.709 -  
 221.710 -    private java.awt.Dialog myDialog;
 221.711 -  }
 221.712 -
 221.713 -  // ----------------------------------------------------------
 221.714 -  private static final class CornerBorder extends EmptyBorder {
 221.715 -
 221.716 -    public CornerBorder() {
 221.717 -      super(0, SMALL_INSET, SMALL_INSET, SMALL_INSET);
 221.718 -    }
 221.719 -
 221.720 -    @Override
 221.721 -    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
 221.722 -    {
 221.723 -      CORNER.paintIcon(c, g, w - CORNER.getIconWidth(), h - CORNER.getIconHeight());
 221.724 -    }
 221.725 -
 221.726 -    private static final Icon CORNER = new ImageIcon(new byte [] {
 221.727 -      (byte)0x47,(byte)0x49,(byte)0x46,(byte)0x38,(byte)0x39,(byte)0x61,(byte)0x0c,
 221.728 -      (byte)0x00,(byte)0x0c,(byte)0x00,(byte)0xf7,(byte)0x00,(byte)0x00,(byte)0x83,
 221.729 -      (byte)0x83,(byte)0x83,(byte)0xd3,(byte)0xd3,(byte)0xc8,(byte)0xfd,(byte)0xfd,
 221.730 -      (byte)0xfd,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.731 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.732 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.733 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.734 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.735 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.736 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.737 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.738 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.739 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.740 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.741 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.742 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.743 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.744 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.745 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.746 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.747 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.748 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.749 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.750 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.751 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.752 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.753 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.754 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.755 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.756 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.757 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.758 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.759 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.760 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.761 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.762 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.763 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.764 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.765 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.766 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.767 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.768 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.769 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.770 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.771 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.772 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.773 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.774 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.775 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.776 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.777 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.778 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.779 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.780 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.781 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.782 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.783 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.784 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.785 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.786 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.787 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.788 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.789 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.790 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.791 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.792 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.793 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.794 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.795 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.796 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.797 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.798 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.799 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.800 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.801 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.802 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.803 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.804 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.805 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.806 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.807 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.808 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.809 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.810 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.811 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.812 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.813 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.814 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.815 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.816 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.817 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.818 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.819 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.820 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.821 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.822 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.823 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.824 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.825 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.826 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.827 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.828 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.829 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.830 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.831 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.832 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.833 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.834 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.835 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.836 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.837 -      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 221.838 -      (byte)0x01,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x21,(byte)0xf9,(byte)0x04,
 221.839 -      (byte)0x01,(byte)0x00,(byte)0x00,(byte)0xff,(byte)0x00,(byte)0x2c,(byte)0x00,
 221.840 -      (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x0c,(byte)0x00,(byte)0x0c,(byte)0x00,
 221.841 -      (byte)0x40,(byte)0x08,(byte)0x34,(byte)0x00,(byte)0xff,(byte)0x09,(byte)0x1c,
 221.842 -      (byte)0x48,(byte)0xf0,(byte)0x9f,(byte)0x80,(byte)0x81,(byte)0x02,(byte)0x00,
 221.843 -      (byte)0x00,(byte)0x30,(byte)0xa8,(byte)0xd0,(byte)0x60,(byte)0x41,(byte)0x81,
 221.844 -      (byte)0x09,(byte)0x17,(byte)0x1e,(byte)0x7c,(byte)0x08,(byte)0xb1,(byte)0x21,
 221.845 -      (byte)0xc1,(byte)0x88,(byte)0x0c,(byte)0x25,(byte)0x36,(byte)0xc4,(byte)0x88,
 221.846 -      (byte)0x91,(byte)0x62,(byte)0x45,(byte)0x8f,(byte)0x1d,(byte)0x0b,(byte)0x72,
 221.847 -      (byte)0x5c,(byte)0x88,(byte)0x70,(byte)0xa3,(byte)0xc5,(byte)0x8c,(byte)0x28,
 221.848 -      (byte)0x13,(byte)0x8e,(byte)0xd4,(byte)0xb8,(byte)0x30,(byte)0x20,(byte)0x00,
 221.849 -      (byte)0x3b
 221.850 -    });
 221.851 -  }
 221.852 -
 221.853 -  private static Stack<Long> ourTimes = new Stack<Long>();
 221.854 -
 221.855 -  public static final int TINY_INSET = 2; // the 3-rd Fibonacci number
 221.856 -  public static final int SMALL_INSET = 8; // the 6-th Fibonacci number
 221.857 -  public static final int MEDIUM_INSET = 13; // the 7-th Fibonacci number
 221.858 -
 221.859 -  private static final double MILLIS = 1000.0;
 221.860 -  private static final Dimension BUTTON_SIZE = new Dimension(24, 24);
 221.861 -
 221.862 -  public static final String UH = System.getProperty("user.home"); // NOI18N
 221.863 -  public static final String LS = System.getProperty("line.separator"); // NOI18N
 221.864 -  public static final String FS = System.getProperty("file.separator"); // NOI18N
 221.865 -
 221.866 -  private static final Border CORNER_BORDER = new CornerBorder();
 221.867 -
 221.868 -  private static final boolean ENABLE_LOG =
 221.869 -    System.getProperty("org.netbeans.modules.log") != null; // NOI18N
 221.870 -  
 221.871 -  private static final boolean ENABLE_OUT =
 221.872 -    System.getProperty("org.netbeans.modules.out") != null; // NOI18N
 221.873 -
 221.874 -  private static final boolean ENABLE_TIM =
 221.875 -    System.getProperty("org.netbeans.modules.tim") != null; // NOI18N
 221.876 -}
   222.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   222.2 +++ b/soa.validation/build.xml	Thu Apr 17 15:50:14 2008 +0200
   222.3 @@ -0,0 +1,50 @@
   222.4 +<?xml version="1.0" encoding="UTF-8"?>
   222.5 +<!--
   222.6 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   222.7 +
   222.8 +  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   222.9 +
  222.10 +  The contents of this file are subject to the terms of either the GNU
  222.11 +  General Public License Version 2 only ("GPL") or the Common
  222.12 +  Development and Distribution License("CDDL") (collectively, the
  222.13 +  "License"). You may not use this file except in compliance with the
  222.14 +  License. You can obtain a copy of the License at
  222.15 +  http://www.netbeans.org/cddl-gplv2.html
  222.16 +  or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  222.17 +  specific language governing permissions and limitations under the
  222.18 +  License. When distributing the software, include this License Header
  222.19 +  Notice in each file and include the License file at
  222.20 +  nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  222.21 +  particular file as subject to the "Classpath" exception as provided
  222.22 +  by Sun in the GPL Version 2 section of the License file that
  222.23 +  accompanied this code. If applicable, add the following below the
  222.24 +  License Header, with the fields enclosed by brackets [] replaced by
  222.25 +  your own identifying information:
  222.26 +  "Portions Copyrighted [year] [name of copyright owner]"
  222.27 +
  222.28 +  Contributor(s):
  222.29 +
  222.30 +  The Original Software is NetBeans. The Initial Developer of the Original
  222.31 +  Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  222.32 +  Microsystems, Inc. All Rights Reserved.
  222.33 +
  222.34 +  If you wish your version of this file to be governed by only the CDDL
  222.35 +  or only the GPL Version 2, indicate your decision by adding
  222.36 +  "[Contributor] elects to include this software in this distribution
  222.37 +  under the [CDDL or GPL Version 2] license." If you do not indicate a
  222.38 +  single choice of license, a recipient has the option to distribute
  222.39 +  your version of this file under either the CDDL, the GPL Version 2 or
  222.40 +  to extend the choice of license to its licensees as provided above.
  222.41 +  However, if you add GPL Version 2 code and therefore, elected the GPL
  222.42 +  Version 2 license, then the option applies only if the new code is
  222.43 +  made subject to such option by the copyright holder.
  222.44 +-->
  222.45 +<project name="validation" default="netbeans" basedir=".">
  222.46 +    <import file="../nbbuild/templates/projectized.xml"/>
  222.47 +
  222.48 +    <target name="check">
  222.49 +        <ant dir="../../_code" inheritAll="true">
  222.50 +            <property name="check.dir" value="${basedir}"/>
  222.51 +        </ant>
  222.52 +    </target>
  222.53 +</project>
   223.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   223.2 +++ b/soa.validation/manifest.mf	Thu Apr 17 15:50:14 2008 +0200
   223.3 @@ -0,0 +1,6 @@
   223.4 +Manifest-Version: 1.0
   223.5 +AutoUpdate-Show-In-Client: false
   223.6 +OpenIDE-Module-Specification-Version: 1.1
   223.7 +OpenIDE-Module: org.netbeans.modules.soa.validation/1
   223.8 +OpenIDE-Module-Layer: org/netbeans/modules/soa/resources/layer.xml
   223.9 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/soa/resources/Bundle.properties
   224.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   224.2 +++ b/soa.validation/nbproject/project.properties	Thu Apr 17 15:50:14 2008 +0200
   224.3 @@ -0,0 +1,42 @@
   224.4 +#
   224.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   224.6 +#
   224.7 +# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   224.8 +#
   224.9 +# The contents of this file are subject to the terms of either the GNU
  224.10 +# General Public License Version 2 only ("GPL") or the Common
  224.11 +# Development and Distribution License("CDDL") (collectively, the
  224.12 +# "License"). You may not use this file except in compliance with the
  224.13 +# License. You can obtain a copy of the License at
  224.14 +# http://www.netbeans.org/cddl-gplv2.html
  224.15 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  224.16 +# specific language governing permissions and limitations under the
  224.17 +# License. When distributing the software, include this License Header
  224.18 +# Notice in each file and include the License file at
  224.19 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  224.20 +# particular file as subject to the "Classpath" exception as provided
  224.21 +# by Sun in the GPL Version 2 section of the License file that
  224.22 +# accompanied this code. If applicable, add the following below the
  224.23 +# License Header, with the fields enclosed by brackets [] replaced by
  224.24 +# your own identifying information:
  224.25 +# "Portions Copyrighted [year] [name of copyright owner]"
  224.26 +#
  224.27 +# Contributor(s):
  224.28 +#
  224.29 +# The Original Software is NetBeans. The Initial Developer of the Original
  224.30 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  224.31 +# Microsystems, Inc. All Rights Reserved.
  224.32 +#
  224.33 +# If you wish your version of this file to be governed by only the CDDL
  224.34 +# or only the GPL Version 2, indicate your decision by adding
  224.35 +# "[Contributor] elects to include this software in this distribution
  224.36 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  224.37 +# single choice of license, a recipient has the option to distribute
  224.38 +# your version of this file under either the CDDL, the GPL Version 2 or
  224.39 +# to extend the choice of license to its licensees as provided above.
  224.40 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  224.41 +# Version 2 license, then the option applies only if the new code is
  224.42 +# made subject to such option by the copyright holder.
  224.43 +
  224.44 +javac.source=1.5
  224.45 +javac.compilerargs=-Xlint:unchecked
   225.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   225.2 +++ b/soa.validation/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   225.3 @@ -0,0 +1,142 @@
   225.4 +<?xml version="1.0" encoding="UTF-8"?>
   225.5 +<!--
   225.6 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   225.7 +
   225.8 +  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   225.9 +
  225.10 +  The contents of this file are subject to the terms of either the GNU
  225.11 +  General Public License Version 2 only ("GPL") or the Common
  225.12 +  Development and Distribution License("CDDL") (collectively, the
  225.13 +  "License"). You may not use this file except in compliance with the
  225.14 +  License. You can obtain a copy of the License at
  225.15 +  http://www.netbeans.org/cddl-gplv2.html
  225.16 +  or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  225.17 +  specific language governing permissions and limitations under the
  225.18 +  License. When distributing the software, include this License Header
  225.19 +  Notice in each file and include the License file at
  225.20 +  nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  225.21 +  particular file as subject to the "Classpath" exception as provided
  225.22 +  by Sun in the GPL Version 2 section of the License file that
  225.23 +  accompanied this code. If applicable, add the following below the
  225.24 +  License Header, with the fields enclosed by brackets [] replaced by
  225.25 +  your own identifying information:
  225.26 +  "Portions Copyrighted [year] [name of copyright owner]"
  225.27 +
  225.28 +  Contributor(s):
  225.29 +
  225.30 +  The Original Software is NetBeans. The Initial Developer of the Original
  225.31 +  Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  225.32 +  Microsystems, Inc. All Rights Reserved.
  225.33 +
  225.34 +  If you wish your version of this file to be governed by only the CDDL
  225.35 +  or only the GPL Version 2, indicate your decision by adding
  225.36 +  "[Contributor] elects to include this software in this distribution
  225.37 +  under the [CDDL or GPL Version 2] license." If you do not indicate a
  225.38 +  single choice of license, a recipient has the option to distribute
  225.39 +  your version of this file under either the CDDL, the GPL Version 2 or
  225.40 +  to extend the choice of license to its licensees as provided above.
  225.41 +  However, if you add GPL Version 2 code and therefore, elected the GPL
  225.42 +  Version 2 license, then the option applies only if the new code is
  225.43 +  made subject to such option by the copyright holder.
  225.44 +-->
  225.45 +<project xmlns="http://www.netbeans.org/ns/project/1">
  225.46 +    <type>org.netbeans.modules.apisupport.project</type>
  225.47 +    <configuration>
  225.48 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
  225.49 +            <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
  225.50 +            <module-dependencies>
  225.51 +                <dependency>
  225.52 +                    <code-name-base>org.openide.awt</code-name-base>
  225.53 +                    <build-prerequisite/>
  225.54 +                    <compile-dependency/>
  225.55 +                    <run-dependency>
  225.56 +                        <specification-version>6.6.1</specification-version>
  225.57 +                    </run-dependency>
  225.58 +                </dependency>
  225.59 +                <dependency>
  225.60 +                    <code-name-base>org.openide.dialogs</code-name-base>
  225.61 +                    <build-prerequisite/>
  225.62 +                    <compile-dependency/>
  225.63 +                    <run-dependency>
  225.64 +                        <specification-version>6.5.1</specification-version>
  225.65 +                    </run-dependency>
  225.66 +                </dependency>
  225.67 +                <dependency>
  225.68 +                    <code-name-base>org.openide.filesystems</code-name-base>
  225.69 +                    <build-prerequisite/>
  225.70 +                    <compile-dependency/>
  225.71 +                    <run-dependency>
  225.72 +                        <specification-version>6.2</specification-version>
  225.73 +                    </run-dependency>
  225.74 +                </dependency>
  225.75 +                <dependency>
  225.76 +                    <code-name-base>org.openide.loaders</code-name-base>
  225.77 +                    <build-prerequisite/>
  225.78 +                    <compile-dependency/>
  225.79 +                    <run-dependency>
  225.80 +                        <specification-version>5.8.1</specification-version>
  225.81 +                    </run-dependency>
  225.82 +                </dependency>
  225.83 +                <dependency>
  225.84 +                    <code-name-base>org.openide.nodes</code-name-base>
  225.85 +                    <build-prerequisite/>
  225.86 +                    <compile-dependency/>
  225.87 +                    <run-dependency>
  225.88 +                        <specification-version>6.2</specification-version>
  225.89 +                    </run-dependency>
  225.90 +                </dependency>
  225.91 +                <dependency>
  225.92 +                    <code-name-base>org.openide.text</code-name-base>
  225.93 +                    <build-prerequisite/>
  225.94 +                    <compile-dependency/>
  225.95 +                    <run-dependency>
  225.96 +                        <specification-version>6.16</specification-version>
  225.97 +                    </run-dependency>
  225.98 +                </dependency>
  225.99 +                <dependency>
 225.100 +                    <code-name-base>org.openide.util</code-name-base>
 225.101 +                    <build-prerequisite/>
 225.102 +                    <compile-dependency/>
 225.103 +                    <run-dependency>
 225.104 +                        <specification-version>6.2</specification-version>
 225.105 +                    </run-dependency>
 225.106 +                </dependency>
 225.107 +                <dependency>
 225.108 +                    <code-name-base>org.openide.windows</code-name-base>
 225.109 +                    <build-prerequisite/>
 225.110 +                    <compile-dependency/>
 225.111 +                    <run-dependency>
 225.112 +                        <specification-version>6.2</specification-version>
 225.113 +                    </run-dependency>
 225.114 +                </dependency>
 225.115 +                <dependency>
 225.116 +                    <code-name-base>org.netbeans.modules.xml.validation</code-name-base>
 225.117 +                    <build-prerequisite/>
 225.118 +                    <compile-dependency/>
 225.119 +                    <run-dependency>
 225.120 +                        <specification-version>1.0</specification-version>
 225.121 +                    </run-dependency>
 225.122 +                </dependency>
 225.123 +                <dependency>
 225.124 +                    <code-name-base>org.netbeans.modules.xml.xam</code-name-base>
 225.125 +                    <build-prerequisite/>
 225.126 +                    <compile-dependency/>
 225.127 +                    <run-dependency>
 225.128 +                        <release-version>1</release-version>
 225.129 +                    </run-dependency>
 225.130 +                </dependency>
 225.131 +            </module-dependencies>
 225.132 +            <friend-packages>
 225.133 +                <friend>org.netbeans.modules.bpel.core</friend>
 225.134 +                <friend>org.netbeans.modules.bpel.editors</friend>
 225.135 +                <friend>org.netbeans.modules.bpel.mapper</friend>
 225.136 +                <friend>org.netbeans.modules.bpel.refactoring</friend>
 225.137 +                <friend>org.netbeans.modules.bpel.search</friend>
 225.138 +                <friend>org.netbeans.modules.bpel.validation</friend>
 225.139 +                <friend>org.netbeans.modules.xslt.project</friend>
 225.140 +                <package>org.netbeans.modules.soa.validation</package>
 225.141 +                <package>org.netbeans.modules.soa.ui</package>
 225.142 +            </friend-packages>
 225.143 +        </data>
 225.144 +    </configuration>
 225.145 +</project>
   226.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   226.2 +++ b/soa.validation/src/org/netbeans/modules/soa/resources/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   226.3 @@ -0,0 +1,48 @@
   226.4 +#
   226.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   226.6 +#
   226.7 +# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   226.8 +#
   226.9 +# The contents of this file are subject to the terms of either the GNU
  226.10 +# General Public License Version 2 only ("GPL") or the Common
  226.11 +# Development and Distribution License("CDDL") (collectively, the
  226.12 +# "License"). You may not use this file except in compliance with the
  226.13 +# License. You can obtain a copy of the License at
  226.14 +# http://www.netbeans.org/cddl-gplv2.html
  226.15 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  226.16 +# specific language governing permissions and limitations under the
  226.17 +# License. When distributing the software, include this License Header
  226.18 +# Notice in each file and include the License file at
  226.19 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  226.20 +# particular file as subject to the "Classpath" exception as provided
  226.21 +# by Sun in the GPL Version 2 section of the License file that
  226.22 +# accompanied this code. If applicable, add the following below the
  226.23 +# License Header, with the fields enclosed by brackets [] replaced by
  226.24 +# your own identifying information:
  226.25 +# "Portions Copyrighted [year] [name of copyright owner]"
  226.26 +#
  226.27 +# Contributor(s):
  226.28 +#
  226.29 +# The Original Software is NetBeans. The Initial Developer of the Original
  226.30 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  226.31 +# Microsystems, Inc. All Rights Reserved.
  226.32 +#
  226.33 +# If you wish your version of this file to be governed by only the CDDL
  226.34 +# or only the GPL Version 2, indicate your decision by adding
  226.35 +# "[Contributor] elects to include this software in this distribution
  226.36 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  226.37 +# single choice of license, a recipient has the option to distribute
  226.38 +# your version of this file under either the CDDL, the GPL Version 2 or
  226.39 +# to extend the choice of license to its licensees as provided above.
  226.40 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  226.41 +# Version 2 license, then the option applies only if the new code is
  226.42 +# made subject to such option by the copyright holder.
  226.43 +
  226.44 +# manifest
  226.45 +OpenIDE-Module-Name=SOA Validation
  226.46 +OpenIDE-Module-Display-Category=SOA
  226.47 +OpenIDE-Module-Short-Description=SOA Validation.
  226.48 +OpenIDE-Module-Long-Description=SOA Validation.
  226.49 +
  226.50 +# validation-annotation.xml
  226.51 +LBL_Validation_Annotation=Validation
   227.1 Binary file soa.validation/src/org/netbeans/modules/soa/resources/error.png has changed
   228.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   228.2 +++ b/soa.validation/src/org/netbeans/modules/soa/resources/layer.xml	Thu Apr 17 15:50:14 2008 +0200
   228.3 @@ -0,0 +1,62 @@
   228.4 +<?xml version="1.0"?>
   228.5 +<!--
   228.6 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   228.7 +
   228.8 +  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   228.9 +
  228.10 +  The contents of this file are subject to the terms of either the GNU
  228.11 +  General Public License Version 2 only ("GPL") or the Common
  228.12 +  Development and Distribution License("CDDL") (collectively, the
  228.13 +  "License"). You may not use this file except in compliance with the
  228.14 +  License. You can obtain a copy of the License at
  228.15 +  http://www.netbeans.org/cddl-gplv2.html
  228.16 +  or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  228.17 +  specific language governing permissions and limitations under the
  228.18 +  License. When distributing the software, include this License Header
  228.19 +  Notice in each file and include the License file at
  228.20 +  nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  228.21 +  particular file as subject to the "Classpath" exception as provided
  228.22 +  by Sun in the GPL Version 2 section of the License file that
  228.23 +  accompanied this code. If applicable, add the following below the
  228.24 +  License Header, with the fields enclosed by brackets [] replaced by
  228.25 +  your own identifying information:
  228.26 +  "Portions Copyrighted [year] [name of copyright owner]"
  228.27 +
  228.28 +  Contributor(s):
  228.29 +
  228.30 +  The Original Software is NetBeans. The Initial Developer of the Original
  228.31 +  Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  228.32 +  Microsystems, Inc. All Rights Reserved.
  228.33 +
  228.34 +  If you wish your version of this file to be governed by only the CDDL
  228.35 +  or only the GPL Version 2, indicate your decision by adding
  228.36 +  "[Contributor] elects to include this software in this distribution
  228.37 +  under the [CDDL or GPL Version 2] license." If you do not indicate a
  228.38 +  single choice of license, a recipient has the option to distribute
  228.39 +  your version of this file under either the CDDL, the GPL Version 2 or
  228.40 +  to extend the choice of license to its licensees as provided above.
  228.41 +  However, if you add GPL Version 2 code and therefore, elected the GPL
  228.42 +  Version 2 license, then the option applies only if the new code is
  228.43 +  made subject to such option by the copyright holder.
  228.44 +-->
  228.45 +<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
  228.46 +<filesystem>
  228.47 +    <folder name="Editors">
  228.48 +        <folder name="AnnotationTypes">
  228.49 +            <file name="validation-annotation.xml" url="validation-annotation.xml"/>
  228.50 +        </folder>
  228.51 +    </folder>    
  228.52 +    <folder name="Editors">
  228.53 +        <folder name="text">
  228.54 +            <!--folder name="x-bpel+xml"> todo r
  228.55 +                <folder name="Toolbars">
  228.56 +                    <folder name="Default">
  228.57 +                        <file name="org-netbeans-modules-bpel-validation-action-QuickFixAction.instance">
  228.58 +                            <attr name="position" intvalue="19291"/>
  228.59 +                        </file>
  228.60 +                    </folder>
  228.61 +                </folder>
  228.62 +            </folder-->
  228.63 +        </folder>
  228.64 +    </folder>
  228.65 +</filesystem>
   229.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   229.2 +++ b/soa.validation/src/org/netbeans/modules/soa/resources/validation-annotation.xml	Thu Apr 17 15:50:14 2008 +0200
   229.3 @@ -0,0 +1,52 @@
   229.4 +<?xml version="1.0" encoding="UTF-8"?>
   229.5 +<!--
   229.6 +  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   229.7 +
   229.8 +  Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   229.9 +
  229.10 +  The contents of this file are subject to the terms of either the GNU
  229.11 +  General Public License Version 2 only ("GPL") or the Common
  229.12 +  Development and Distribution License("CDDL") (collectively, the
  229.13 +  "License"). You may not use this file except in compliance with the
  229.14 +  License. You can obtain a copy of the License at
  229.15 +  http://www.netbeans.org/cddl-gplv2.html
  229.16 +  or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  229.17 +  specific language governing permissions and limitations under the
  229.18 +  License. When distributing the software, include this License Header
  229.19 +  Notice in each file and include the License file at
  229.20 +  nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  229.21 +  particular file as subject to the "Classpath" exception as provided
  229.22 +  by Sun in the GPL Version 2 section of the License file that
  229.23 +  accompanied this code. If applicable, add the following below the
  229.24 +  License Header, with the fields enclosed by brackets [] replaced by
  229.25 +  your own identifying information:
  229.26 +  "Portions Copyrighted [year] [name of copyright owner]"
  229.27 +
  229.28 +  Contributor(s):
  229.29 +
  229.30 +  The Original Software is NetBeans. The Initial Developer of the Original
  229.31 +  Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  229.32 +  Microsystems, Inc. All Rights Reserved.
  229.33 +
  229.34 +  If you wish your version of this file to be governed by only the CDDL
  229.35 +  or only the GPL Version 2, indicate your decision by adding
  229.36 +  "[Contributor] elects to include this software in this distribution
  229.37 +  under the [CDDL or GPL Version 2] license." If you do not indicate a
  229.38 +  single choice of license, a recipient has the option to distribute
  229.39 +  your version of this file under either the CDDL, the GPL Version 2 or
  229.40 +  to extend the choice of license to its licensees as provided above.
  229.41 +  However, if you add GPL Version 2 code and therefore, elected the GPL
  229.42 +  Version 2 license, then the option applies only if the new code is
  229.43 +  made subject to such option by the copyright holder.
  229.44 +-->
  229.45 +<!DOCTYPE type PUBLIC "-//NetBeans//DTD annotation type 1.0//EN" "http://www.netbeans.org/dtds/annotation-type-1_0.dtd">
  229.46 +
  229.47 +<type
  229.48 +    name="validation-annotation"
  229.49 +    description_key="LBL_Validation_Annotation"
  229.50 +    localizing_bundle="org.netbeans.modules.soa.validation.resources.Bundle"
  229.51 +    glyph="nbresloc:/org/netbeans/modules/soa/validation/resources/error.png"
  229.52 +    waveunderline="#FF00FF"
  229.53 +    type="linepart"
  229.54 +    visible="true"
  229.55 +/>
   230.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   230.2 +++ b/soa.validation/src/org/netbeans/modules/soa/ui/UI.java	Thu Apr 17 15:50:14 2008 +0200
   230.3 @@ -0,0 +1,873 @@
   230.4 +/*
   230.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   230.6 + *
   230.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   230.8 + *
   230.9 + * The contents of this file are subject to the terms of either the GNU
  230.10 + * General Public License Version 2 only ("GPL") or the Common
  230.11 + * Development and Distribution License("CDDL") (collectively, the
  230.12 + * "License"). You may not use this file except in compliance with the
  230.13 + * License. You can obtain a copy of the License at
  230.14 + * http://www.netbeans.org/cddl-gplv2.html
  230.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  230.16 + * specific language governing permissions and limitations under the
  230.17 + * License. When distributing the software, include this License Header
  230.18 + * Notice in each file and include the License file at
  230.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  230.20 + * particular file as subject to the "Classpath" exception as provided
  230.21 + * by Sun in the GPL Version 2 section of the License file that
  230.22 + * accompanied this code. If applicable, add the following below the
  230.23 + * License Header, with the fields enclosed by brackets [] replaced by
  230.24 + * your own identifying information:
  230.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  230.26 + *
  230.27 + * Contributor(s):
  230.28 + *
  230.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  230.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  230.31 + * Microsystems, Inc. All Rights Reserved.
  230.32 + *
  230.33 + * If you wish your version of this file to be governed by only the CDDL
  230.34 + * or only the GPL Version 2, indicate your decision by adding
  230.35 + * "[Contributor] elects to include this software in this distribution
  230.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  230.37 + * single choice of license, a recipient has the option to distribute
  230.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  230.39 + * to extend the choice of license to its licensees as provided above.
  230.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  230.41 + * Version 2 license, then the option applies only if the new code is
  230.42 + * made subject to such option by the copyright holder.
  230.43 + */
  230.44 +package org.netbeans.modules.soa.ui;
  230.45 +
  230.46 +import java.awt.Component;
  230.47 +import java.awt.Dimension;
  230.48 +import java.awt.Insets;
  230.49 +import java.awt.Graphics;
  230.50 +import java.awt.GridBagConstraints;
  230.51 +import java.awt.GridBagLayout;
  230.52 +import java.awt.Event;
  230.53 +import java.awt.Toolkit;
  230.54 +import java.awt.datatransfer.Clipboard;
  230.55 +import java.awt.datatransfer.StringSelection;
  230.56 +import java.awt.event.ComponentAdapter;
  230.57 +import java.awt.event.ComponentEvent;
  230.58 +import java.awt.event.KeyEvent;
  230.59 +import java.awt.event.WindowAdapter;
  230.60 +import java.awt.event.WindowEvent;
  230.61 +import java.util.ArrayList;
  230.62 +import java.util.Collection;
  230.63 +import java.util.List;
  230.64 +import java.util.Stack;
  230.65 +
  230.66 +import javax.swing.Action;
  230.67 +import javax.swing.AbstractAction;
  230.68 +import javax.swing.AbstractButton;
  230.69 +import javax.swing.Icon;
  230.70 +import javax.swing.ImageIcon;
  230.71 +import javax.swing.JButton;
  230.72 +import javax.swing.JCheckBox;
  230.73 +import javax.swing.JComboBox;
  230.74 +import javax.swing.JComponent;
  230.75 +import javax.swing.JDialog;
  230.76 +import javax.swing.JLabel;
  230.77 +import javax.swing.JPanel;
  230.78 +import javax.swing.JRadioButton;
  230.79 +import javax.swing.JSeparator;
  230.80 +import javax.swing.JTextArea;
  230.81 +import javax.swing.JToggleButton;
  230.82 +import javax.swing.SwingUtilities;
  230.83 +import javax.swing.border.Border;
  230.84 +import javax.swing.border.EmptyBorder;
  230.85 +
  230.86 +import org.openide.DialogDescriptor;
  230.87 +import org.openide.DialogDisplayer;
  230.88 +import org.openide.NotifyDescriptor;
  230.89 +import org.openide.awt.Mnemonics;
  230.90 +import org.openide.loaders.DataObject;
  230.91 +import org.openide.nodes.Node;
  230.92 +import org.openide.windows.TopComponent;
  230.93 +import org.openide.util.Lookup;
  230.94 +import org.openide.util.NbBundle;
  230.95 +import org.openide.util.datatransfer.ExClipboard;
  230.96 +
  230.97 +/**
  230.98 + * @author Vladimir Yaroslavskiy
  230.99 + * @version 2005.12.14
 230.100 + */
 230.101 +public final class UI {
 230.102 +
 230.103 +  private UI() {}
 230.104 +
 230.105 +  public static boolean isAlt(int modifiers) {
 230.106 +    return isModifier(modifiers, KeyEvent.ALT_MASK);
 230.107 +  }
 230.108 +
 230.109 +  public static boolean isShift(int modifiers) {
 230.110 +    return isModifier(modifiers, KeyEvent.SHIFT_MASK);
 230.111 +  }
 230.112 +
 230.113 +  public static boolean isCtrl(int modifiers) {
 230.114 +    return
 230.115 +      isModifier(modifiers, KeyEvent.CTRL_MASK) ||
 230.116 +      isModifier(modifiers, KeyEvent.META_MASK);
 230.117 +  }
 230.118 +
 230.119 +  private static boolean isModifier(int modifiers, int mask) {
 230.120 +    return (modifiers & mask) != 0;
 230.121 +  }
 230.122 +
 230.123 +  public static MyComboBox createComboBox(Object [] items) {
 230.124 +    return new MyComboBox(items);
 230.125 +  }
 230.126 +
 230.127 +  public static JLabel createLabel(String message) {
 230.128 +    JLabel label = new JLabel();
 230.129 +    Mnemonics.setLocalizedText(label, message);
 230.130 +    return label;
 230.131 +  }
 230.132 +
 230.133 +  public static JRadioButton createRadioButton(String text, String toolTip) {
 230.134 +    JRadioButton button = new JRadioButton();
 230.135 +    Mnemonics.setLocalizedText(button, text);
 230.136 +    button.setText(cutMnemonicAndAmpersand(text));
 230.137 +    button.setToolTipText(toolTip);
 230.138 +    return button;
 230.139 +  }
 230.140 +
 230.141 +  public static JButton createButton(Action action) {
 230.142 +    JButton button = (JButton) createAbstractButton(new JButton(), action);
 230.143 +    Object name = action.getValue(Action.NAME);
 230.144 +
 230.145 +    if (name == null) {
 230.146 +      setButtonSize(button);
 230.147 +    }
 230.148 +    return button;
 230.149 +  }
 230.150 +
 230.151 +  public static JCheckBox createCheckBox(Action action) {
 230.152 +    return (JCheckBox) createAbstractButton(new JCheckBox(), action);
 230.153 +  }
 230.154 +
 230.155 +  public static JToggleButton createToggleButton(Action action) {
 230.156 +    return (JToggleButton) createAbstractButton(new JToggleButton(), action);
 230.157 +  }
 230.158 +
 230.159 +  public static void setItems(JComboBox comboBox, Object [] items) {
 230.160 +    Object selected = comboBox.getSelectedItem();
 230.161 +    comboBox.removeAllItems();
 230.162 +    
 230.163 +    for (int i=0; i < items.length; i++) {
 230.164 +      comboBox.insertItemAt(items [i], i);
 230.165 +    }
 230.166 +    if (items.length > 0) {
 230.167 +      comboBox.setSelectedIndex(0);
 230.168 +    }
 230.169 +    if (selected != null) {
 230.170 +      comboBox.setSelectedItem(selected);
 230.171 +    }
 230.172 +  }
 230.173 +
 230.174 +  public static JPanel createSeparator(String message) {
 230.175 +    JPanel panel = new JPanel(new GridBagLayout());
 230.176 +    GridBagConstraints c = new GridBagConstraints();
 230.177 +    c.anchor = GridBagConstraints.WEST;
 230.178 +
 230.179 +    c.insets = new Insets(SMALL_INSET, 0, SMALL_INSET, 0);
 230.180 +    panel.add(createLabel(message), c);
 230.181 +
 230.182 +    c.weightx = 1.0;
 230.183 +    c.fill = GridBagConstraints.HORIZONTAL;
 230.184 +    c.insets = new Insets(SMALL_INSET, SMALL_INSET, SMALL_INSET, 0);
 230.185 +    panel.add(new JSeparator(), c);
 230.186 +
 230.187 +    return panel;
 230.188 +  }
 230.189 +
 230.190 +  private static AbstractButton createAbstractButton(
 230.191 +    AbstractButton button,
 230.192 +    Action action)
 230.193 +  {
 230.194 +    button.setAction(action);
 230.195 +    mnemonicAndToolTip(button, (String) action.getValue(Action.SHORT_DESCRIPTION));
 230.196 +    return button;
 230.197 +  }
 230.198 +
 230.199 +  private static void mnemonicAndToolTip(AbstractButton button, String toolTip) {
 230.200 +    String text = button.getText();
 230.201 +
 230.202 +    if (text == null) {
 230.203 +      Mnemonics.setLocalizedText(button, toolTip);
 230.204 +      button.setText(null);
 230.205 +    }
 230.206 +    else {
 230.207 +      Mnemonics.setLocalizedText(button, text);
 230.208 +      button.setText(cutMnemonicAndAmpersand(text));
 230.209 +    }
 230.210 +    button.setToolTipText(cutMnemonicAndAmpersand(toolTip));
 230.211 +  }
 230.212 +
 230.213 +  private static String cutMnemonicAndAmpersand(String value) {
 230.214 +    if (value == null) {
 230.215 +      return null;
 230.216 +    }
 230.217 +    int k = value.lastIndexOf(" // "); // NOI18N
 230.218 +
 230.219 +    if (k != -1) {
 230.220 +      value = value.substring(0, k);
 230.221 +    }
 230.222 +    k = value.indexOf("&"); // NOI18N
 230.223 +
 230.224 +    if (k == -1) {
 230.225 +      return value;
 230.226 +    }
 230.227 +    return value.substring(0, k) + value.substring(k + 1);
 230.228 +  }
 230.229 +
 230.230 +  public static JTextArea createTextArea(int columns, String message) {
 230.231 +    JTextArea text = new JTextArea(message);
 230.232 +    text.setBackground(null);
 230.233 +    text.setEditable(false);
 230.234 +    text.setColumns(columns);
 230.235 +    text.setLineWrap(true);
 230.236 +    text.setWrapStyleWord(true);
 230.237 +    return text;
 230.238 +  }
 230.239 +
 230.240 +  public static void a11y(Component component, String a11y) {
 230.241 +      a11y(component, a11y, a11y);
 230.242 +  }
 230.243 +
 230.244 +  public static void a11y(Component component, String a11yN, String a11yD) {
 230.245 +    if (a11yN != null) {  
 230.246 +        component.getAccessibleContext().setAccessibleName(a11yN);
 230.247 +    }
 230.248 +    if (a11yD != null) {
 230.249 +        component.getAccessibleContext().setAccessibleDescription(a11yD);
 230.250 +    }
 230.251 +  }
 230.252 +
 230.253 +  public static String i18n(Class clazz, String key) {
 230.254 +    if (key == null) {
 230.255 +      return null;
 230.256 +    }
 230.257 +    return NbBundle.getMessage(clazz, key);
 230.258 +  }
 230.259 +
 230.260 +  public static String i18n(Class clazz, String key, String param) {
 230.261 +    if (key == null) {
 230.262 +      return null;
 230.263 +    }
 230.264 +    return NbBundle.getMessage(clazz, key, param);
 230.265 +  }
 230.266 +
 230.267 +  public static String i18n(Class clazz, String key, String param1, String param2) {
 230.268 +    if (key == null) {
 230.269 +      return null;
 230.270 +    }
 230.271 +    return NbBundle.getMessage(clazz, key, param1, param2);
 230.272 +  }
 230.273 +
 230.274 +  public static String i18n(
 230.275 +    Class clazz,
 230.276 +    String key,
 230.277 +    String param1,
 230.278 +    String param2,
 230.279 +    String param3)
 230.280 +  {
 230.281 +    if (key == null) {
 230.282 +      return null;
 230.283 +    }
 230.284 +    return NbBundle.getMessage(clazz, key, param1, param2, param3);
 230.285 +  }
 230.286 +
 230.287 +  public static boolean printWarning(String message) {
 230.288 +    NotifyDescriptor confirm = new NotifyDescriptor.Confirmation(
 230.289 +      message,
 230.290 +      NotifyDescriptor.YES_NO_OPTION,
 230.291 +      NotifyDescriptor.WARNING_MESSAGE
 230.292 +    );
 230.293 +    DialogDisplayer.getDefault().notify(confirm);
 230.294 +
 230.295 +    return confirm.getValue() == NotifyDescriptor.YES_OPTION;
 230.296 +  }
 230.297 +
 230.298 +  public static boolean printConfirmation(String message) {
 230.299 +    return NotifyDescriptor.YES_OPTION.equals(
 230.300 +      DialogDisplayer.getDefault().notify(
 230.301 +        new NotifyDescriptor.Confirmation(message, NotifyDescriptor.YES_NO_OPTION)));
 230.302 +  }
 230.303 +
 230.304 +  public static void printInformation(String message) {
 230.305 +    print(message, NotifyDescriptor.INFORMATION_MESSAGE);
 230.306 +  }
 230.307 +
 230.308 +  public static void printError(String message) {
 230.309 +    print(message, NotifyDescriptor.ERROR_MESSAGE);
 230.310 +  }
 230.311 +
 230.312 +  private static void print(String message, int type) {
 230.313 +    DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, type));
 230.314 +  }
 230.315 +
 230.316 +  public static ImageIcon icon(Class clazz, String name) {
 230.317 +    if (name == null) {
 230.318 +      return null;
 230.319 +    }
 230.320 +    return new ImageIcon(clazz.getResource("image/"+ name +".gif")); // NOI18N
 230.321 +  }
 230.322 +
 230.323 +  public static Node getSelectedNode() {
 230.324 +    Node [] nodes = getSelectedNodes();
 230.325 +
 230.326 +    if (nodes == null) {
 230.327 +      return null;
 230.328 +    }
 230.329 +    return nodes [0];
 230.330 +  }
 230.331 +
 230.332 +  public static Node [] getSelectedNodes() {
 230.333 +//out();
 230.334 +    TopComponent top = getActivateTopComponent();
 230.335 +//out("top: " + top);
 230.336 +    if (top == null) {
 230.337 +      return null;
 230.338 +    }
 230.339 +    Node [] nodes = top.getActivatedNodes();
 230.340 +//out("nodes: " + nodes);
 230.341 +
 230.342 +    if (nodes == null || nodes.length == 0) {
 230.343 +      return null;
 230.344 +    }
 230.345 +    return nodes;
 230.346 +  }
 230.347 +
 230.348 +  public static TopComponent getActivateTopComponent() {
 230.349 +    return TopComponent.getRegistry().getActivated();
 230.350 +  }
 230.351 +  
 230.352 +  public static void setWidth(JComponent component, int width) {
 230.353 +    setDimension(component, new Dimension(width, component.getPreferredSize().height));
 230.354 +  }
 230.355 +
 230.356 +  public static void setHeight(JComponent component, int height) {
 230.357 +    setDimension(component, new Dimension(component.getPreferredSize().width, height));
 230.358 +  }
 230.359 +
 230.360 +  private static void setDimension(JComponent component, Dimension dimension) {
 230.361 +    component.setMinimumSize(dimension);
 230.362 +    component.setPreferredSize(dimension);
 230.363 +  }
 230.364 +
 230.365 +  public static int getInt(String value) {
 230.366 +    try {
 230.367 +      return Integer.parseInt(value);
 230.368 +    }
 230.369 +    catch (NumberFormatException e) {
 230.370 +      return -1;
 230.371 +    }
 230.372 +  }
 230.373 +
 230.374 +  public static double getDouble(String value) {
 230.375 +    try {
 230.376 +      return Double.parseDouble(value);
 230.377 +    }
 230.378 +    catch (NumberFormatException e) {
 230.379 +      return -1.0;
 230.380 +    }
 230.381 +  }
 230.382 +
 230.383 +  public static int round(double value) {
 230.384 +    return (int) Math.ceil(value);
 230.385 +  }
 230.386 +
 230.387 +  public static String replace(String source, String searchFor, String replaceWith) {
 230.388 +    if (source == null) {
 230.389 +      return null;
 230.390 +    }
 230.391 +    if (searchFor == null || searchFor.length() == 0) {
 230.392 +      return null;
 230.393 +    }
 230.394 +    int k = 0;
 230.395 +    int found = source.indexOf(searchFor, k);
 230.396 +    StringBuffer buffer = new StringBuffer();
 230.397 +
 230.398 +    while (true) {
 230.399 +      if (found == -1) {
 230.400 +        break;
 230.401 +      }
 230.402 +      buffer.append(source.substring(k, found));
 230.403 +      buffer.append(replaceWith);
 230.404 +
 230.405 +      k = found + searchFor.length();
 230.406 +      found = source.indexOf(searchFor, k);
 230.407 +    }
 230.408 +    if (k > 0) {
 230.409 +        buffer.append(source.substring(k));
 230.410 +        return buffer.toString();
 230.411 +    }
 230.412 +    else {
 230.413 +      return source;
 230.414 +    }
 230.415 +  }
 230.416 +
 230.417 +  public static DataObject getDataObject(Node node) {
 230.418 +    if (node == null) {
 230.419 +      return null;
 230.420 +    }
 230.421 +    return (DataObject) node.getLookup().lookup(DataObject.class);
 230.422 +  }
 230.423 +
 230.424 +  private static void setButtonSize(JButton button) {
 230.425 +    button.setMaximumSize(BUTTON_SIZE);
 230.426 +    button.setMinimumSize(BUTTON_SIZE);
 230.427 +    button.setPreferredSize(BUTTON_SIZE);
 230.428 +  }
 230.429 +
 230.430 +  public static JComponent getResizable(JPanel panel) {
 230.431 +    JPanel p = new JPanel(new GridBagLayout());
 230.432 +    GridBagConstraints c = new GridBagConstraints();
 230.433 +
 230.434 +    c.weightx = 1.0;
 230.435 +    c.weighty = 1.0;
 230.436 +    c.insets = new Insets(TINY_INSET, MEDIUM_INSET, 0, MEDIUM_INSET);
 230.437 +    c.anchor = GridBagConstraints.NORTHWEST;
 230.438 +    c.fill = GridBagConstraints.HORIZONTAL;
 230.439 +    p.add(panel, c);
 230.440 +
 230.441 +    return p;
 230.442 +  }
 230.443 +
 230.444 +
 230.445 +  public static String removeHtml(String value) {
 230.446 +    if (value == null) {
 230.447 +      return null;
 230.448 +    }
 230.449 +    value = replace(value, "<b>", "'"); // NOI18N
 230.450 +    value = replace(value, "</b>", "'"); // NOI18N
 230.451 +    value = replace(value, "&nbsp;", " "); // NOI18N
 230.452 +    
 230.453 +    return value;
 230.454 +  }
 230.455 +
 230.456 +  public static String getHtml(String value) {
 230.457 +    return "<html>" + value + "</html>"; // NOI18N
 230.458 +  }
 230.459 +
 230.460 +  
 230.461 +  public static <T> List<T> getInstances(Class<T> clazz) {
 230.462 +    Collection<? extends T> collection = Lookup.getDefault().lookupAll(clazz);
 230.463 +    List<T> list = new ArrayList<T>();
 230.464 +
 230.465 +    for (Object object : collection) {
 230.466 +      list.add(clazz.cast(object));
 230.467 +    }
 230.468 +    return list;
 230.469 +  }
 230.470 +
 230.471 +  public static void copyToClipboard(String value) {
 230.472 +    getClipboard().setContents(new StringSelection(value), null);
 230.473 +  }
 230.474 +  
 230.475 +  private static Clipboard getClipboard() {
 230.476 +    Clipboard clipboard = Lookup.getDefault().lookup(ExClipboard.class);
 230.477 +
 230.478 +    if (clipboard == null) {
 230.479 +      clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
 230.480 +    }
 230.481 +    return clipboard;
 230.482 +  }
 230.483 +  
 230.484 +  public static void startTimeln() {
 230.485 +    tim();
 230.486 +    startTime();
 230.487 +  }
 230.488 +
 230.489 +  public static void startTime() {
 230.490 +    ourTimes.push(System.currentTimeMillis());
 230.491 +  }
 230.492 +
 230.493 +  public static void endTime(Object object) {
 230.494 +    long currentTime = System.currentTimeMillis();
 230.495 +    tim(object + ": " + ((currentTime - ourTimes.pop()) / MILLIS) + " sec."); // NOI18N
 230.496 +  }
 230.497 +
 230.498 +  public static void tim() {
 230.499 +    if (ENABLE_TIM) {
 230.500 +      System.out.println();
 230.501 +    }
 230.502 +  }
 230.503 +
 230.504 +  public static void tim(Object object) {
 230.505 +    if (ENABLE_TIM) {
 230.506 +      System.out.println("*** " + object); // NOI18N
 230.507 +    }
 230.508 +  }
 230.509 +  
 230.510 +  public static void log() {
 230.511 +    if (ENABLE_LOG) {
 230.512 +      System.out.println();
 230.513 +    }
 230.514 +  }
 230.515 +
 230.516 +  public static void log(Object object) {
 230.517 +    if (ENABLE_LOG) {
 230.518 +      System.out.println("*** " + object); // NOI18N
 230.519 +    }
 230.520 +  }
 230.521 +
 230.522 +  public static void stackTrace() {
 230.523 +    stackTrace(null);
 230.524 +  }
 230.525 +
 230.526 +  public static void stackTrace(Object object) {
 230.527 +    out();
 230.528 +    out();
 230.529 +
 230.530 +    if (object != null) {
 230.531 +      out(object);
 230.532 +    }
 230.533 +    new Exception("!!!").printStackTrace(); // NOI18N
 230.534 +  }
 230.535 +
 230.536 +  public static void out() {
 230.537 +    if (ENABLE_OUT) {
 230.538 +      System.out.println();
 230.539 +    }
 230.540 +  }
 230.541 +
 230.542 +  public static void out(Object object) {
 230.543 +    if (ENABLE_OUT) {
 230.544 +      System.out.println("*** " + object); // NOI18N
 230.545 +    }
 230.546 +  }
 230.547 +
 230.548 +  // ------------------------------------------------
 230.549 +  public static class MyComboBox extends JComboBox {
 230.550 +    public MyComboBox(Object [] items) {
 230.551 +      super(items);
 230.552 +      init();
 230.553 +    }
 230.554 +
 230.555 +    @Override
 230.556 +    public boolean selectWithKeyChar(char key)
 230.557 +    {
 230.558 +      processKey(key);
 230.559 +      setSelectedIndex(myIndex);
 230.560 +      return true;
 230.561 +    }
 230.562 +
 230.563 +    public void init() {
 230.564 +//out();
 230.565 +//out("init");
 230.566 +      myIndex = 0;
 230.567 +      myPrefix = ""; // NOI18N
 230.568 +    }
 230.569 +
 230.570 +    private void processKey(char key) {
 230.571 +//out("select: '" + key);
 230.572 +      if (((int) key) == Event.BACK_SPACE) {
 230.573 +        init();
 230.574 +        return;
 230.575 +      }
 230.576 +      myPrefix += key;
 230.577 +      myPrefix = myPrefix.toLowerCase();
 230.578 +
 230.579 +//out("prefix: " + myPrefix);
 230.580 +      for (int i=myIndex; i < getItemCount(); i++) {
 230.581 +        String item = getItemAt(i).toString().toLowerCase();
 230.582 +//out("  see: " + item);
 230.583 +
 230.584 +        if (item.startsWith(myPrefix)) {
 230.585 +          myIndex = i;
 230.586 +          return;
 230.587 +        }
 230.588 +      }
 230.589 +    }
 230.590 +
 230.591 +    private int myIndex;
 230.592 +    private String myPrefix;
 230.593 +  }
 230.594 +
 230.595 +  // -------------------------------------------------------------
 230.596 +  public abstract static class IconAction extends AbstractAction {
 230.597 +
 230.598 +    protected IconAction(String name, String toolTip, Icon icon) {
 230.599 +      super(name, icon);
 230.600 +      putValue(SHORT_DESCRIPTION, toolTip);
 230.601 +    }
 230.602 +
 230.603 +    protected final Node getLastNode() {
 230.604 +      Node node = getSelectedNode();
 230.605 +
 230.606 +      if (node == null) {
 230.607 +        node = myLastNode;
 230.608 +      }
 230.609 +      else {
 230.610 +        myLastNode = node;
 230.611 +      }
 230.612 +      return node;
 230.613 +    }
 230.614 +  
 230.615 +    private Node myLastNode;
 230.616 +  }
 230.617 +
 230.618 +  // ---------------------------------------------------------------
 230.619 +  public abstract static class ButtonAction extends AbstractAction {
 230.620 +
 230.621 +    public ButtonAction(String text, String toolTip) {
 230.622 +      this(text, null, toolTip);
 230.623 +    }
 230.624 +         
 230.625 +    public ButtonAction(Icon icon, String toolTip) {
 230.626 +      this(null, icon, toolTip);
 230.627 +    }
 230.628 +
 230.629 +    public ButtonAction(String text) {
 230.630 +      this(text, null, text);
 230.631 +    }
 230.632 +
 230.633 +    private ButtonAction(String text, Icon icon, String toolTip) {
 230.634 +      super(text, icon);
 230.635 +      putValue(SHORT_DESCRIPTION, toolTip);
 230.636 +    }
 230.637 +  }
 230.638 +
 230.639 +  // --------------------------------------------------------
 230.640 +  public abstract static class Dialog extends WindowAdapter {
 230.641 +
 230.642 +    protected void opened()  {}
 230.643 +    protected void resized() {}
 230.644 +    protected void updated() {}
 230.645 +   
 230.646 +    protected abstract DialogDescriptor createDescriptor();
 230.647 +
 230.648 +    public void show() {
 230.649 +      show(true);
 230.650 +    }
 230.651 +
 230.652 +    public void showAndWait() {
 230.653 +      show(false);
 230.654 +    }
 230.655 +
 230.656 +    private void show(boolean inSwingThread) {
 230.657 +      if (myDialog == null) {
 230.658 +        myDialog = DialogDisplayer.getDefault().createDialog(createDescriptor());
 230.659 +        myDialog.addWindowListener(this);
 230.660 +        setCorner();
 230.661 +        myDialog.addComponentListener(
 230.662 +          new ComponentAdapter() {
 230.663 +            public void componentResized(ComponentEvent event) {
 230.664 +              resized();
 230.665 +            }
 230.666 +          }
 230.667 +        );
 230.668 +      }
 230.669 +      else {
 230.670 +        opened();
 230.671 +      }
 230.672 +      updated();
 230.673 +
 230.674 +      if (inSwingThread) {
 230.675 +        SwingUtilities.invokeLater(new Runnable() { public void run() {
 230.676 +          myDialog.pack();
 230.677 +          myDialog.setVisible(true);
 230.678 +        }});
 230.679 +      }
 230.680 +      else {
 230.681 +        myDialog.pack();
 230.682 +        myDialog.setVisible(true);
 230.683 +      }
 230.684 +    }
 230.685 +
 230.686 +    public Component getUIComponent() {
 230.687 +      return myDialog;
 230.688 +    }
 230.689 +
 230.690 +    @Override
 230.691 +    public void windowOpened(WindowEvent event)
 230.692 +    {
 230.693 +      opened();
 230.694 +    }
 230.695 +
 230.696 +    protected final String i18n(String key) {
 230.697 +      return UI.i18n(getClass(), key);
 230.698 +    }
 230.699 +
 230.700 +    protected final String i18n(String key, String param) {
 230.701 +      return UI.i18n(getClass(), key, param);
 230.702 +    }
 230.703 +
 230.704 +    private void setCorner() {
 230.705 +      if (myDialog instanceof JDialog) {
 230.706 +        ((JDialog) myDialog).getRootPane().setBorder(CORNER_BORDER);
 230.707 +      }
 230.708 +    }
 230.709 +  
 230.710 +    private java.awt.Dialog myDialog;
 230.711 +  }
 230.712 +
 230.713 +  // ----------------------------------------------------------
 230.714 +  private static final class CornerBorder extends EmptyBorder {
 230.715 +
 230.716 +    public CornerBorder() {
 230.717 +      super(0, SMALL_INSET, SMALL_INSET, SMALL_INSET);
 230.718 +    }
 230.719 +
 230.720 +    @Override
 230.721 +    public void paintBorder(Component c, Graphics g, int x, int y, int w, int h)
 230.722 +    {
 230.723 +      CORNER.paintIcon(c, g, w - CORNER.getIconWidth(), h - CORNER.getIconHeight());
 230.724 +    }
 230.725 +
 230.726 +    private static final Icon CORNER = new ImageIcon(new byte [] {
 230.727 +      (byte)0x47,(byte)0x49,(byte)0x46,(byte)0x38,(byte)0x39,(byte)0x61,(byte)0x0c,
 230.728 +      (byte)0x00,(byte)0x0c,(byte)0x00,(byte)0xf7,(byte)0x00,(byte)0x00,(byte)0x83,
 230.729 +      (byte)0x83,(byte)0x83,(byte)0xd3,(byte)0xd3,(byte)0xc8,(byte)0xfd,(byte)0xfd,
 230.730 +      (byte)0xfd,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.731 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.732 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.733 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.734 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.735 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.736 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.737 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.738 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.739 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.740 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.741 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.742 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.743 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.744 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.745 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.746 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.747 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.748 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.749 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.750 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.751 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.752 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.753 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.754 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.755 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.756 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.757 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.758 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.759 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.760 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.761 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.762 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.763 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.764 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.765 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.766 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.767 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.768 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.769 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.770 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.771 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.772 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.773 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.774 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.775 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.776 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.777 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.778 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.779 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.780 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.781 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.782 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.783 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.784 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.785 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.786 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.787 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.788 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.789 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.790 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.791 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.792 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.793 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.794 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.795 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.796 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.797 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.798 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.799 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.800 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.801 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.802 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.803 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.804 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.805 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.806 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.807 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.808 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.809 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.810 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.811 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.812 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.813 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.814 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.815 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.816 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.817 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.818 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.819 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.820 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.821 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.822 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.823 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.824 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.825 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.826 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.827 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.828 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.829 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.830 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.831 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.832 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.833 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.834 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.835 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.836 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.837 +      (byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,(byte)0x01,
 230.838 +      (byte)0x01,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x21,(byte)0xf9,(byte)0x04,
 230.839 +      (byte)0x01,(byte)0x00,(byte)0x00,(byte)0xff,(byte)0x00,(byte)0x2c,(byte)0x00,
 230.840 +      (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x0c,(byte)0x00,(byte)0x0c,(byte)0x00,
 230.841 +      (byte)0x40,(byte)0x08,(byte)0x34,(byte)0x00,(byte)0xff,(byte)0x09,(byte)0x1c,
 230.842 +      (byte)0x48,(byte)0xf0,(byte)0x9f,(byte)0x80,(byte)0x81,(byte)0x02,(byte)0x00,
 230.843 +      (byte)0x00,(byte)0x30,(byte)0xa8,(byte)0xd0,(byte)0x60,(byte)0x41,(byte)0x81,
 230.844 +      (byte)0x09,(byte)0x17,(byte)0x1e,(byte)0x7c,(byte)0x08,(byte)0xb1,(byte)0x21,
 230.845 +      (byte)0xc1,(byte)0x88,(byte)0x0c,(byte)0x25,(byte)0x36,(byte)0xc4,(byte)0x88,
 230.846 +      (byte)0x91,(byte)0x62,(byte)0x45,(byte)0x8f,(byte)0x1d,(byte)0x0b,(byte)0x72,
 230.847 +      (byte)0x5c,(byte)0x88,(byte)0x70,(byte)0xa3,(byte)0xc5,(byte)0x8c,(byte)0x28,
 230.848 +      (byte)0x13,(byte)0x8e,(byte)0xd4,(byte)0xb8,(byte)0x30,(byte)0x20,(byte)0x00,
 230.849 +      (byte)0x3b
 230.850 +    });
 230.851 +  }
 230.852 +
 230.853 +  private static Stack<Long> ourTimes = new Stack<Long>();
 230.854 +
 230.855 +  public static final int TINY_INSET = 2; // the 3-rd Fibonacci number
 230.856 +  public static final int SMALL_INSET = 8; // the 6-th Fibonacci number
 230.857 +  public static final int MEDIUM_INSET = 13; // the 7-th Fibonacci number
 230.858 +
 230.859 +  private static final double MILLIS = 1000.0;
 230.860 +  private static final Dimension BUTTON_SIZE = new Dimension(24, 24);
 230.861 +
 230.862 +  public static final String UH = System.getProperty("user.home"); // NOI18N
 230.863 +  public static final String LS = System.getProperty("line.separator"); // NOI18N
 230.864 +  public static final String FS = System.getProperty("file.separator"); // NOI18N
 230.865 +
 230.866 +  private static final Border CORNER_BORDER = new CornerBorder();
 230.867 +
 230.868 +  private static final boolean ENABLE_LOG =
 230.869 +    System.getProperty("org.netbeans.modules.log") != null; // NOI18N
 230.870 +  
 230.871 +  private static final boolean ENABLE_OUT =
 230.872 +    System.getProperty("org.netbeans.modules.out") != null; // NOI18N
 230.873 +
 230.874 +  private static final boolean ENABLE_TIM =
 230.875 +    System.getProperty("org.netbeans.modules.tim") != null; // NOI18N
 230.876 +}
   231.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   231.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Action.java	Thu Apr 17 15:50:14 2008 +0200
   231.3 @@ -0,0 +1,63 @@
   231.4 +/*
   231.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   231.6 + *
   231.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   231.8 + *
   231.9 + * The contents of this file are subject to the terms of either the GNU
  231.10 + * General Public License Version 2 only ("GPL") or the Common
  231.11 + * Development and Distribution License("CDDL") (collectively, the
  231.12 + * "License"). You may not use this file except in compliance with the
  231.13 + * License. You can obtain a copy of the License at
  231.14 + * http://www.netbeans.org/cddl-gplv2.html
  231.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  231.16 + * specific language governing permissions and limitations under the
  231.17 + * License. When distributing the software, include this License Header
  231.18 + * Notice in each file and include the License file at
  231.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  231.20 + * particular file as subject to the "Classpath" exception as provided
  231.21 + * by Sun in the GPL Version 2 section of the License file that
  231.22 + * accompanied this code. If applicable, add the following below the
  231.23 + * License Header, with the fields enclosed by brackets [] replaced by
  231.24 + * your own identifying information:
  231.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  231.26 + *
  231.27 + * Contributor(s):
  231.28 + *
  231.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  231.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  231.31 + * Microsystems, Inc. All Rights Reserved.
  231.32 + *
  231.33 + * If you wish your version of this file to be governed by only the CDDL
  231.34 + * or only the GPL Version 2, indicate your decision by adding
  231.35 + * "[Contributor] elects to include this software in this distribution
  231.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  231.37 + * single choice of license, a recipient has the option to distribute
  231.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  231.39 + * to extend the choice of license to its licensees as provided above.
  231.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  231.41 + * Version 2 license, then the option applies only if the new code is
  231.42 + * made subject to such option by the copyright holder.
  231.43 + */
  231.44 +package org.netbeans.modules.soa.validation;
  231.45 +
  231.46 +import java.awt.event.ActionEvent;
  231.47 +import org.netbeans.modules.xml.validation.ValidateAction;
  231.48 +
  231.49 +/**
  231.50 + * @author Vladimir Yaroslavskiy
  231.51 + * @version 2008.04.15
  231.52 + */
  231.53 +public final class Action extends ValidateAction {
  231.54 +
  231.55 +  public Action(Controller controller) {
  231.56 +    super(null);
  231.57 +    myController = controller;
  231.58 +  }
  231.59 +
  231.60 +  @Override
  231.61 +  public void actionPerformed(ActionEvent event) {
  231.62 +    myController.startValidation();
  231.63 +  }
  231.64 +
  231.65 +  private Controller myController;
  231.66 +}
   232.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   232.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Annotation.java	Thu Apr 17 15:50:14 2008 +0200
   232.3 @@ -0,0 +1,85 @@
   232.4 +/*
   232.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   232.6 + *
   232.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   232.8 + *
   232.9 + * The contents of this file are subject to the terms of either the GNU
  232.10 + * General Public License Version 2 only ("GPL") or the Common
  232.11 + * Development and Distribution License("CDDL") (collectively, the
  232.12 + * "License"). You may not use this file except in compliance with the
  232.13 + * License. You can obtain a copy of the License at
  232.14 + * http://www.netbeans.org/cddl-gplv2.html
  232.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  232.16 + * specific language governing permissions and limitations under the
  232.17 + * License. When distributing the software, include this License Header
  232.18 + * Notice in each file and include the License file at
  232.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  232.20 + * particular file as subject to the "Classpath" exception as provided
  232.21 + * by Sun in the GPL Version 2 section of the License file that
  232.22 + * accompanied this code. If applicable, add the following below the
  232.23 + * License Header, with the fields enclosed by brackets [] replaced by
  232.24 + * your own identifying information:
  232.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  232.26 + *
  232.27 + * Contributor(s):
  232.28 + *
  232.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  232.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  232.31 + * Microsystems, Inc. All Rights Reserved.
  232.32 + *
  232.33 + * If you wish your version of this file to be governed by only the CDDL
  232.34 + * or only the GPL Version 2, indicate your decision by adding
  232.35 + * "[Contributor] elects to include this software in this distribution
  232.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  232.37 + * single choice of license, a recipient has the option to distribute
  232.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  232.39 + * to extend the choice of license to its licensees as provided above.
  232.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  232.41 + * Version 2 license, then the option applies only if the new code is
  232.42 + * made subject to such option by the copyright holder.
  232.43 + */
  232.44 +package org.netbeans.modules.soa.validation;
  232.45 +
  232.46 +import java.beans.PropertyChangeEvent;
  232.47 +import java.beans.PropertyChangeListener;
  232.48 +
  232.49 +import org.openide.text.Annotatable;
  232.50 +import org.openide.text.Line;
  232.51 +
  232.52 +/**
  232.53 + * @author Vladimir Yaroslavskiy
  232.54 + * @version 2008.02.01
  232.55 + */
  232.56 +final class Annotation extends org.openide.text.Annotation implements PropertyChangeListener {
  232.57 +    
  232.58 +  public Annotation(Annotatable annotatable, String message) {
  232.59 +    myMessage = message;
  232.60 +
  232.61 +    if (annotatable != null) {
  232.62 +      attach(annotatable);
  232.63 +      annotatable.addPropertyChangeListener(this);
  232.64 +    }
  232.65 +  }
  232.66 +
  232.67 +  public String getAnnotationType() {
  232.68 +    return "validation-annotation"; // NOI18N
  232.69 +  }
  232.70 +  
  232.71 +  public String getShortDescription() {
  232.72 +    return myMessage;
  232.73 +  }
  232.74 +  
  232.75 +  public void propertyChange( PropertyChangeEvent propertyChangeEvent ) {
  232.76 +    if (Annotatable.PROP_ANNOTATION_COUNT.equals(propertyChangeEvent.getPropertyName())) {
  232.77 +      return;
  232.78 +    }
  232.79 +    Annotatable annotatable = (Annotatable) propertyChangeEvent.getSource();
  232.80 +
  232.81 +    if (annotatable != null) {
  232.82 +      annotatable.removePropertyChangeListener(this);
  232.83 +      detach();
  232.84 +    }
  232.85 +  }
  232.86 +
  232.87 +  private String myMessage;
  232.88 +}
   233.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   233.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   233.3 @@ -0,0 +1,81 @@
   233.4 +#
   233.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   233.6 +#
   233.7 +# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   233.8 +#
   233.9 +# The contents of this file are subject to the terms of either the GNU
  233.10 +# General Public License Version 2 only ("GPL") or the Common
  233.11 +# Development and Distribution License("CDDL") (collectively, the
  233.12 +# "License"). You may not use this file except in compliance with the
  233.13 +# License. You can obtain a copy of the License at
  233.14 +# http://www.netbeans.org/cddl-gplv2.html
  233.15 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  233.16 +# specific language governing permissions and limitations under the
  233.17 +# License. When distributing the software, include this License Header
  233.18 +# Notice in each file and include the License file at
  233.19 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  233.20 +# particular file as subject to the "Classpath" exception as provided
  233.21 +# by Sun in the GPL Version 2 section of the License file that
  233.22 +# accompanied this code. If applicable, add the following below the
  233.23 +# License Header, with the fields enclosed by brackets [] replaced by
  233.24 +# your own identifying information:
  233.25 +# "Portions Copyrighted [year] [name of copyright owner]"
  233.26 +#
  233.27 +# Contributor(s):
  233.28 +#
  233.29 +# The Original Software is NetBeans. The Initial Developer of the Original
  233.30 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  233.31 +# Microsystems, Inc. All Rights Reserved.
  233.32 +#
  233.33 +# If you wish your version of this file to be governed by only the CDDL
  233.34 +# or only the GPL Version 2, indicate your decision by adding
  233.35 +# "[Contributor] elects to include this software in this distribution
  233.36 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
  233.37 +# single choice of license, a recipient has the option to distribute
  233.38 +# your version of this file under either the CDDL, the GPL Version 2 or
  233.39 +# to extend the choice of license to its licensees as provided above.
  233.40 +# However, if you add GPL Version 2 code and therefore, elected the GPL
  233.41 +# Version 2 license, then the option applies only if the new code is
  233.42 +# made subject to such option by the copyright holder.
  233.43 +
  233.44 +# DurationDialog
  233.45 +LBL_Duration=Duration
  233.46 +ACS_Duration=Duration
  233.47 +LBL_OK=OK
  233.48 +ACS_OK=OK
  233.49 +LBL_Cancel=Cancel
  233.50 +ACS_Cancel=Cancel
  233.51 +LBL_Year=&Years:
  233.52 +ACS_Year=Years
  233.53 +LBL_Month=&Months:
  233.54 +ACS_Month=Months
  233.55 +LBL_Day=&Days:
  233.56 +ACS_Day=Days
  233.57 +LBL_Hour=&Hours:
  233.58 +ACS_Hour=Hours
  233.59 +LBL_Minute=M&inutes:
  233.60 +ACS_Minute=Minutes
  233.61 +LBL_Second=&Seconds:
  233.62 +ACS_Second=Seconds
  233.63 +# {0} - value
  233.64 +ERR_invalid_year=Invalid value of years: {0}
  233.65 +ERR_invalid_month=Invalid value of months: {0}
  233.66 +ERR_invalid_day=Invalid value of days: {0}
  233.67 +ERR_invalid_hour=Invalid value of hours: {0}
  233.68 +ERR_invalid_minute=Invalid value of minutes: {0}
  233.69 +ERR_invalid_second=Invalid value of seconds: {0}
  233.70 +
  233.71 +# DurationUtil
  233.72 +# {0} - value
  233.73 +FIX_Invalid_Value=invalid value "{0}"
  233.74 +FIX_Empty_Value=value can not be empty
  233.75 +FIX_P_symbol=symbol 'P' is absent
  233.76 +FIX_Year=years is invalid
  233.77 +FIX_Months=months is invalid
  233.78 +FIX_Days=days is invalid
  233.79 +FIX_Hours=hours is invalid
  233.80 +FIX_Minutes=minutes is invalid
  233.81 +FIX_Seconds=seconds is invalid
  233.82 +FIX_T_symbol=symbol 'T' is expected
  233.83 +FIX_Absent_T_symbol=the designator 'T' must be absent if and only if all of the time items are absent
  233.84 +FIX_Designator=At least one number and its designator must be present
   234.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   234.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Controller.java	Thu Apr 17 15:50:14 2008 +0200
   234.3 @@ -0,0 +1,257 @@
   234.4 +/*
   234.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   234.6 + *
   234.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   234.8 + *
   234.9 + * The contents of this file are subject to the terms of either the GNU
  234.10 + * General Public License Version 2 only ("GPL") or the Common
  234.11 + * Development and Distribution License("CDDL") (collectively, the
  234.12 + * "License"). You may not use this file except in compliance with the
  234.13 + * License. You can obtain a copy of the License at
  234.14 + * http://www.netbeans.org/cddl-gplv2.html
  234.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  234.16 + * specific language governing permissions and limitations under the
  234.17 + * License. When distributing the software, include this License Header
  234.18 + * Notice in each file and include the License file at
  234.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  234.20 + * particular file as subject to the "Classpath" exception as provided
  234.21 + * by Sun in the GPL Version 2 section of the License file that
  234.22 + * accompanied this code. If applicable, add the following below the
  234.23 + * License Header, with the fields enclosed by brackets [] replaced by
  234.24 + * your own identifying information:
  234.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  234.26 + *
  234.27 + * Contributor(s):
  234.28 + *
  234.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  234.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  234.31 + * Microsystems, Inc. All Rights Reserved.
  234.32 + *
  234.33 + * If you wish your version of this file to be governed by only the CDDL
  234.34 + * or only the GPL Version 2, indicate your decision by adding
  234.35 + * "[Contributor] elects to include this software in this distribution
  234.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  234.37 + * single choice of license, a recipient has the option to distribute
  234.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  234.39 + * to extend the choice of license to its licensees as provided above.
  234.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  234.41 + * Version 2 license, then the option applies only if the new code is
  234.42 + * made subject to such option by the copyright holder.
  234.43 + */
  234.44 +package org.netbeans.modules.soa.validation;
  234.45 +
  234.46 +import java.util.HashMap;
  234.47 +import java.util.LinkedList;
  234.48 +import java.util.List;
  234.49 +import java.util.Map;
  234.50 +import java.util.Timer;
  234.51 +import java.util.TimerTask;
  234.52 +import java.util.WeakHashMap;
  234.53 +
  234.54 +import org.openide.text.Line;
  234.55 +import org.netbeans.modules.xml.validation.ValidateAction;
  234.56 +import org.netbeans.modules.xml.validation.ValidateAction.RunAction;
  234.57 +import org.netbeans.modules.xml.validation.ValidationOutputWindowController;
  234.58 +import org.netbeans.modules.xml.xam.Model;
  234.59 +import org.netbeans.modules.xml.xam.ComponentEvent;
  234.60 +import org.netbeans.modules.xml.xam.ComponentListener;
  234.61 +
  234.62 +import org.netbeans.modules.xml.xam.spi.Validation;
  234.63 +import org.netbeans.modules.xml.xam.spi.Validation.ValidationType;
  234.64 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  234.65 +import org.netbeans.modules.xml.xam.spi.Validator.ResultType;
  234.66 +import static org.netbeans.modules.soa.ui.UI.*;
  234.67 +
  234.68 +/**
  234.69 + * @author Vladimir Yaroslavskiy
  234.70 + * @version 2008.01.17
  234.71 + */
  234.72 +public final class Controller implements ComponentListener {
  234.73 +    
  234.74 +  public Controller(Model model) {
  234.75 +    myModel = model;
  234.76 +    myTimer = new Timer();
  234.77 +    myResult = new LinkedList<ResultItem>();
  234.78 +    myListeners = new WeakHashMap<Listener, Object>();
  234.79 +    myAnnotations = new LinkedList<Annotation>();
  234.80 +  }
  234.81 +
  234.82 +  public void attach() {
  234.83 +    myModel.addComponentListener(this);
  234.84 +  }
  234.85 +
  234.86 +  public void detach() {
  234.87 +    myModel.removeComponentListener(this);
  234.88 +  }
  234.89 +
  234.90 +  public void addListener(Listener listener) {
  234.91 +    synchronized(myListeners) {
  234.92 +      myListeners.put(listener, null);
  234.93 +    }
  234.94 +  }
  234.95 +  
  234.96 +  public void removeListener(Listener listener) {
  234.97 +    synchronized(myListeners) {
  234.98 +      myListeners.remove(listener);
  234.99 +    }
 234.100 +  }
 234.101 +  
 234.102 +  public List<ResultItem> getResult() {
 234.103 +    return myResult;
 234.104 +  }
 234.105 +
 234.106 +  public void startValidation() {
 234.107 +    log();
 234.108 +    log("START ..."); // NOI18N
 234.109 +    doValidation(true, true);
 234.110 +  }
 234.111 +
 234.112 +  public void runValidation() {
 234.113 +    log();
 234.114 +    log("RUN ..."); // NOI18N
 234.115 +    doValidation(true, false);
 234.116 +  }
 234.117 +
 234.118 +  public void triggerValidation() {
 234.119 +//stackTrace();
 234.120 +    log();
 234.121 +    log("TIMER-TRIGGER"); // NOI18N
 234.122 +    log();
 234.123 +
 234.124 +    cancelTimer();
 234.125 +    myTimer.schedule(new TimerTask() {
 234.126 +      public void run() {
 234.127 +        doValidation(false, false);
 234.128 +      }
 234.129 +    },
 234.130 +    DELAY);
 234.131 +  }
 234.132 +
 234.133 +  private synchronized void doValidation(boolean isComplete, boolean isOutput) {
 234.134 +    cancelTimer();
 234.135 +
 234.136 +    List<ResultItem> items;
 234.137 +    ValidationType type;
 234.138 +
 234.139 +    if (isComplete) {
 234.140 +      Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
 234.141 +      type = ValidationType.COMPLETE;
 234.142 +    }
 234.143 +    else {
 234.144 +      Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
 234.145 +      type = ValidationType.PARTIAL;
 234.146 +    }
 234.147 +    log();
 234.148 +    log("VALIDATION: " + type); // NOI18N
 234.149 +    startTimeln();
 234.150 +
 234.151 +    if (isOutput) {
 234.152 +      RunAction action = new ValidateAction(myModel).new RunAction();
 234.153 +      action.run();
 234.154 +      items = action.getValidationResults();
 234.155 +    }
 234.156 +    else {
 234.157 +      if (isComplete) {
 234.158 +        items = new ValidationOutputWindowController().validate(myModel);
 234.159 +      }
 234.160 +      else {
 234.161 +        Validation validation = new Validation();
 234.162 +        validation.validate(myModel, type);
 234.163 +        items = validation.getValidationResult();
 234.164 +      }
 234.165 +    }
 234.166 +    endTime("validation"); // NOI18N
 234.167 +    log("."); // NOI18N
 234.168 +
 234.169 +    notifyListeners(items);
 234.170 +  }
 234.171 +
 234.172 +  private void cancelTimer() {
 234.173 +    myTimer.cancel();
 234.174 +    myTimer = new Timer();
 234.175 +  }
 234.176 +
 234.177 +  private void notifyListeners(List<ResultItem> items) {
 234.178 +    myResult = new LinkedList<ResultItem>();
 234.179 +
 234.180 +    synchronized (items) {
 234.181 +      for (ResultItem item : items) {
 234.182 +        myResult.add(item);
 234.183 +      }
 234.184 +    }
 234.185 +    synchronized (myListeners) {
 234.186 +      for (Listener listener : myListeners.keySet()) {
 234.187 +        if (listener != null) {
 234.188 +          listener.validationUpdated(myResult);
 234.189 +        }
 234.190 +      }
 234.191 +    }
 234.192 +    showAnnotations();
 234.193 +  }
 234.194 +  
 234.195 +  private void showAnnotations() {
 234.196 +    synchronized (myAnnotations) {
 234.197 +      for (Annotation annotation : myAnnotations) {
 234.198 +        annotation.detach();
 234.199 +      }
 234.200 +//out();
 234.201 +//out("SHOW ANNOTATION IN EDITOR");
 234.202 +      myAnnotations.clear();
 234.203 +      Map<Line.Part, List<ResultItem>> map = new HashMap<Line.Part, List<ResultItem>>();
 234.204 +  
 234.205 +      for (ResultItem item : myResult) {
 234.206 +        if (item.getType() != ResultType.ERROR) {
 234.207 +          continue;
 234.208 +        }
 234.209 +        Line.Part part = LineUtil.getLinePart(item);
 234.210 +
 234.211 +        if (part == null) {
 234.212 +          continue;
 234.213 +        }
 234.214 +        List<ResultItem> list = map.get(part);
 234.215 +
 234.216 +        if (list == null) {
 234.217 +          list = new LinkedList<ResultItem>();
 234.218 +          map.put(part, list);
 234.219 +        }
 234.220 +        list.add(item);
 234.221 +      }
 234.222 +      for (Line.Part part : map.keySet()) {
 234.223 +        StringBuilder description = new StringBuilder();
 234.224 +        List<ResultItem> list = map.get(part);
 234.225 +
 234.226 +        for (int i=0; i < list.size(); i++) {
 234.227 +          description.append(list.get(i).getDescription());
 234.228 +          
 234.229 +          if (i < list.size() - 1) {
 234.230 +            description.append("\n\n"); // NOI18N
 234.231 +          }
 234.232 +        }
 234.233 +        myAnnotations.add(new Annotation(part, description.toString()));
 234.234 +      }
 234.235 +    }
 234.236 +  }
 234.237 +
 234.238 +  public void valueChanged(ComponentEvent event) {
 234.239 +//out("CHANGED");
 234.240 +    triggerValidation();
 234.241 +  }
 234.242 +  
 234.243 +  public void childrenAdded(ComponentEvent event) {
 234.244 +//out("ADDED");
 234.245 +    triggerValidation();
 234.246 +  }
 234.247 +  
 234.248 +  public void childrenDeleted(ComponentEvent event) {
 234.249 +//out("DELETED");
 234.250 +    triggerValidation();
 234.251 +  }
 234.252 +  
 234.253 +  private Model myModel;
 234.254 +  private Timer myTimer;
 234.255 +  private List<ResultItem> myResult;
 234.256 +  private List<Annotation> myAnnotations;
 234.257 +  private Map<Listener, Object> myListeners;
 234.258 +
 234.259 +  private static final long DELAY = 5432L;
 234.260 +}
   235.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   235.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Duration.java	Thu Apr 17 15:50:14 2008 +0200
   235.3 @@ -0,0 +1,108 @@
   235.4 +/*
   235.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   235.6 + *
   235.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   235.8 + *
   235.9 + * The contents of this file are subject to the terms of either the GNU
  235.10 + * General Public License Version 2 only ("GPL") or the Common
  235.11 + * Development and Distribution License("CDDL") (collectively, the
  235.12 + * "License"). You may not use this file except in compliance with the
  235.13 + * License. You can obtain a copy of the License at
  235.14 + * http://www.netbeans.org/cddl-gplv2.html
  235.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  235.16 + * specific language governing permissions and limitations under the
  235.17 + * License. When distributing the software, include this License Header
  235.18 + * Notice in each file and include the License file at
  235.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  235.20 + * particular file as subject to the "Classpath" exception as provided
  235.21 + * by Sun in the GPL Version 2 section of the License file that
  235.22 + * accompanied this code. If applicable, add the following below the
  235.23 + * License Header, with the fields enclosed by brackets [] replaced by
  235.24 + * your own identifying information:
  235.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  235.26 + *
  235.27 + * Contributor(s):
  235.28 + *
  235.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  235.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  235.31 + * Microsystems, Inc. All Rights Reserved.
  235.32 + *
  235.33 + * If you wish your version of this file to be governed by only the CDDL
  235.34 + * or only the GPL Version 2, indicate your decision by adding
  235.35 + * "[Contributor] elects to include this software in this distribution
  235.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  235.37 + * single choice of license, a recipient has the option to distribute
  235.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  235.39 + * to extend the choice of license to its licensees as provided above.
  235.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  235.41 + * Version 2 license, then the option applies only if the new code is
  235.42 + * made subject to such option by the copyright holder.
  235.43 + */
  235.44 +package org.netbeans.modules.soa.validation;
  235.45 +
  235.46 +import static org.netbeans.modules.soa.ui.UI.*;
  235.47 +
  235.48 +/**
  235.49 + * @author Vladimir Yaroslavskiy
  235.50 + * @version 2007.11.27
  235.51 + */
  235.52 +public class Duration {
  235.53 +  public Duration(
  235.54 +    boolean hasMinus,
  235.55 +    int years,
  235.56 +    int months,
  235.57 +    int days,
  235.58 +    int hours,
  235.59 +    int minutes,
  235.60 +    double seconds
  235.61 +  ) {
  235.62 +    myHasMinus = hasMinus;
  235.63 +    myYears = years;
  235.64 +    myMonths = months;
  235.65 +    myDays = days;
  235.66 +    myHours = hours;
  235.67 +    myMinutes = minutes;
  235.68 +    mySeconds = seconds;
  235.69 +  }
  235.70 +
  235.71 +  public boolean hasMinus() {
  235.72 +    return myHasMinus;
  235.73 +  }
  235.74 +
  235.75 +  public int getYears() {
  235.76 +    return myYears;
  235.77 +  }
  235.78 +
  235.79 +  public int getMonths() {
  235.80 +    return myMonths;
  235.81 +  }
  235.82 +
  235.83 +  public int getDays() {
  235.84 +    return myDays;
  235.85 +  }
  235.86 +
  235.87 +  public int getHours() {
  235.88 +    return myHours;
  235.89 +  }
  235.90 +
  235.91 +  public int getMinutes() {
  235.92 +    return myMinutes;
  235.93 +  }
  235.94 +
  235.95 +  public double getSeconds() {
  235.96 +    return mySeconds;
  235.97 +  }
  235.98 +
  235.99 +  @Override
 235.100 +  public String toString() {
 235.101 +    return myYears + " " + myMonths + " " + myDays + " " + myHours + " " + myMinutes + " " + mySeconds; // NOI18N
 235.102 +  }
 235.103 +
 235.104 +  private boolean myHasMinus;
 235.105 +  private int myYears;
 235.106 +  private int myMonths;
 235.107 +  private int myDays;
 235.108 +  private int myHours;
 235.109 +  private int myMinutes;
 235.110 +  private double mySeconds;
 235.111 +}
   236.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   236.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/DurationDialog.java	Thu Apr 17 15:50:14 2008 +0200
   236.3 @@ -0,0 +1,240 @@
   236.4 +/*
   236.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   236.6 + *
   236.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   236.8 + *
   236.9 + * The contents of this file are subject to the terms of either the GNU
  236.10 + * General Public License Version 2 only ("GPL") or the Common
  236.11 + * Development and Distribution License("CDDL") (collectively, the
  236.12 + * "License"). You may not use this file except in compliance with the
  236.13 + * License. You can obtain a copy of the License at
  236.14 + * http://www.netbeans.org/cddl-gplv2.html
  236.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  236.16 + * specific language governing permissions and limitations under the
  236.17 + * License. When distributing the software, include this License Header
  236.18 + * Notice in each file and include the License file at
  236.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  236.20 + * particular file as subject to the "Classpath" exception as provided
  236.21 + * by Sun in the GPL Version 2 section of the License file that
  236.22 + * accompanied this code. If applicable, add the following below the
  236.23 + * License Header, with the fields enclosed by brackets [] replaced by
  236.24 + * your own identifying information:
  236.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  236.26 + *
  236.27 + * Contributor(s):
  236.28 + *
  236.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  236.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  236.31 + * Microsystems, Inc. All Rights Reserved.
  236.32 + *
  236.33 + * If you wish your version of this file to be governed by only the CDDL
  236.34 + * or only the GPL Version 2, indicate your decision by adding
  236.35 + * "[Contributor] elects to include this software in this distribution
  236.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  236.37 + * single choice of license, a recipient has the option to distribute
  236.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  236.39 + * to extend the choice of license to its licensees as provided above.
  236.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  236.41 + * Version 2 license, then the option applies only if the new code is
  236.42 + * made subject to such option by the copyright holder.
  236.43 + */
  236.44 +package org.netbeans.modules.soa.validation;
  236.45 +
  236.46 +import java.awt.BorderLayout;
  236.47 +import java.awt.Component;
  236.48 +import java.awt.Dimension;
  236.49 +import java.awt.FlowLayout;
  236.50 +import java.awt.Frame;
  236.51 +import java.awt.GridBagConstraints;
  236.52 +import java.awt.GridBagLayout;
  236.53 +import java.awt.Insets;
  236.54 +import java.awt.Rectangle;
  236.55 +import java.awt.event.ActionEvent;
  236.56 +import java.awt.event.ActionListener;
  236.57 +import java.awt.event.KeyEvent;
  236.58 +import java.util.List;
  236.59 +
  236.60 +import javax.swing.AbstractAction;
  236.61 +import javax.swing.Action;
  236.62 +import javax.swing.InputMap;
  236.63 +import javax.swing.JComponent;
  236.64 +import javax.swing.KeyStroke;
  236.65 +
  236.66 +import javax.swing.JButton;
  236.67 +import javax.swing.JCheckBox;
  236.68 +import javax.swing.JComboBox;
  236.69 +import javax.swing.JComponent;
  236.70 +import javax.swing.JDialog;
  236.71 +import javax.swing.JLabel;
  236.72 +import javax.swing.JPanel;
  236.73 +import javax.swing.JTextField;
  236.74 +
  236.75 +import org.openide.util.Utilities;
  236.76 +import static org.netbeans.modules.soa.ui.UI.*;
  236.77 +
  236.78 +/**
  236.79 + * @author Vladimir Yaroslavskiy
  236.80 + * @version 2007.11.27
  236.81 + */
  236.82 +public final class DurationDialog extends JDialog {
  236.83 +
  236.84 +  public DurationDialog() {
  236.85 +    super((Frame) null, i18n(DurationDialog.class, "LBL_Duration"), true); // NOI18N
  236.86 +    a11y(this, i18n(DurationDialog.class, "ACS_Duration")); // NOI18N
  236.87 +    setLayout(new BorderLayout());
  236.88 +    add(getResizable(createPanel()), BorderLayout.CENTER);
  236.89 +    add(createButtonPanel(), BorderLayout.SOUTH);
  236.90 +
  236.91 +    String cancel = "cancel"; // NOI18N
  236.92 +    KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
  236.93 +    getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(key, cancel);
  236.94 +
  236.95 +    Action action = new AbstractAction() {
  236.96 +      public void actionPerformed(ActionEvent event) {
  236.97 +        dispose();
  236.98 +      }
  236.99 +    };
 236.100 +    getRootPane().getActionMap().put(cancel, action);
 236.101 +    
 236.102 +    pack();
 236.103 +    
 236.104 +    Rectangle r = Utilities.getUsableScreenBounds();
 236.105 +    int maxW = (r.width * 9) / 10;
 236.106 +    int maxH = (r.height * 9) / 10;
 236.107 +    Dimension d = getPreferredSize();
 236.108 +    d.width = Math.min(d.width, maxW);
 236.109 +    d.height = Math.min(d.height, maxH);
 236.110 +    setBounds(Utilities.findCenterBounds(d));
 236.111 +  }
 236.112 +
 236.113 +  private JPanel createButtonPanel() {
 236.114 +    JPanel panel = new JPanel();
 236.115 +    panel.setLayout(new FlowLayout(FlowLayout.RIGHT));
 236.116 +    JButton button;
 236.117 +
 236.118 +    button = createButton("LBL_OK", "ACS_OK"); // NOI18N
 236.119 +    getRootPane().setDefaultButton(button);
 236.120 +    button.addActionListener(new ActionListener() {
 236.121 +      public void actionPerformed(ActionEvent event) {
 236.122 +        if (check()) {
 236.123 +          dispose();
 236.124 +        }
 236.125 +      }
 236.126 +    });
 236.127 +    panel.add(button);
 236.128 +
 236.129 +    button = createButton("LBL_Cancel", "ACS_Cancel"); // NOI18N
 236.130 +    button.addActionListener(new ActionListener() {
 236.131 +      public void actionPerformed(ActionEvent event) {
 236.132 +        dispose();
 236.133 +      }
 236.134 +    });
 236.135 +    panel.add(button);
 236.136 +
 236.137 +    return panel;
 236.138 +  }
 236.139 +
 236.140 +  private JButton createButton(String key, String a11y) {
 236.141 +    JButton button = new JButton(i18n(DurationDialog.class, key));
 236.142 +    a11y(button, i18n(DurationDialog.class, a11y));
 236.143 +    return button;
 236.144 +  }
 236.145 +
 236.146 +  private JPanel createPanel() {
 236.147 +    JPanel panel = new JPanel(new GridBagLayout());
 236.148 +    GridBagConstraints c = new GridBagConstraints();
 236.149 +    c.gridy = 0;
 236.150 +
 236.151 +    myYear = createField("LBL_Year", "ACS_Year", c, panel); // NOI18N
 236.152 +    myMonth = createField("LBL_Month", "ACS_Month", c, panel); // NOI18N
 236.153 +    myDay = createField("LBL_Day", "ACS_Day", c, panel); // NOI18N
 236.154 +
 236.155 +    c.gridy++;
 236.156 +
 236.157 +    myHour = createField("LBL_Hour", "ACS_Hour", c, panel); // NOI18N
 236.158 +    myMinute = createField("LBL_Minute", "ACS_Minute", c, panel); // NOI18N
 236.159 +    mySecond = createField("LBL_Second", "ACS_Second", c, panel); // NOI18N
 236.160 +
 236.161 +    return panel;
 236.162 +  }
 236.163 +
 236.164 +  private JTextField createField(String key, String a11y, GridBagConstraints c, JPanel panel) {
 236.165 +    c.weightx = 0.0;
 236.166 +    c.fill = GridBagConstraints.NONE;
 236.167 +    c.insets = new Insets(10, 10, 0, 0);
 236.168 +    c.anchor = GridBagConstraints.EAST;
 236.169 +    JLabel label = createLabel(i18n(DurationDialog.class, key));
 236.170 +    panel.add(label, c);
 236.171 +
 236.172 +    c.weightx = 1.0;
 236.173 +    c.fill = GridBagConstraints.HORIZONTAL;
 236.174 +    c.insets = new Insets(10, 10, 0, 0);
 236.175 +    c.anchor = GridBagConstraints.WEST;
 236.176 +    JTextField field = new JTextField(DEFAULT_VALUE);
 236.177 +    a11y(field, i18n(DurationDialog.class, a11y));
 236.178 +    setWidth(field, TEXT_WIDTH);
 236.179 +    panel.add(field, c);
 236.180 +    label.setLabelFor(field);
 236.181 +
 236.182 +    return field;
 236.183 +  }
 236.184 +
 236.185 +  public String getDuration() {
 236.186 +    return myDuration;
 236.187 +  }
 236.188 +
 236.189 +  private boolean check() {
 236.190 +    int year = getInt(myYear.getText());
 236.191 +    int month = getInt(myMonth.getText());
 236.192 +    int day = getInt(myDay.getText());
 236.193 +    int hour = getInt(myHour.getText());
 236.194 +    int minute = getInt(myMinute.getText());
 236.195 +    double second = getDouble(mySecond.getText());
 236.196 +
 236.197 +    if (
 236.198 +      check(year, "ERR_invalid_year", myYear) && // NOI18N
 236.199 +      check(month, "ERR_invalid_month", myMonth) && // NOI18N
 236.200 +      check(day, "ERR_invalid_day", myDay) && // NOI18N
 236.201 +      check(hour, "ERR_invalid_hour", myHour) && // NOI18N
 236.202 +      check(minute, "ERR_invalid_minute", myMinute) && // NOI18N
 236.203 +      check(second, "ERR_invalid_second", mySecond)) // NOI18N
 236.204 +    {
 236.205 +      myDuration = DurationUtil.getContent(true, year, month, day, hour, minute, second);
 236.206 +      return true;
 236.207 +    }
 236.208 +    else {
 236.209 +      myDuration = null;
 236.210 +      return false;
 236.211 +    }
 236.212 +  }
 236.213 +
 236.214 +  private boolean check(int value, String key, JTextField field) {
 236.215 +    return check(value >= 0, key, field);
 236.216 +  }
 236.217 +
 236.218 +  private boolean check(double value, String key, JTextField field) {
 236.219 +    return check(value >= 0.0, key, field);
 236.220 +  }
 236.221 +
 236.222 +  private boolean check(boolean condition, String key, JTextField field) {
 236.223 +    if (condition) {
 236.224 +      return true;
 236.225 +    }
 236.226 +    printError(i18n(DurationDialog.class, key, field.getText()));
 236.227 +    field.requestFocus();
 236.228 +    field.selectAll();
 236.229 +
 236.230 +    return false;
 236.231 +  }
 236.232 +
 236.233 +  private JTextField myYear;
 236.234 +  private JTextField myMonth;
 236.235 +  private JTextField myDay;
 236.236 +  private JTextField myHour;
 236.237 +  private JTextField myMinute;
 236.238 +  private JTextField mySecond;
 236.239 +  private String myDuration;
 236.240 +
 236.241 +  private static final int TEXT_WIDTH = 60;
 236.242 +  private static final String DEFAULT_VALUE = "0"; // NOI18N
 236.243 +}
   237.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   237.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/DurationUtil.java	Thu Apr 17 15:50:14 2008 +0200
   237.3 @@ -0,0 +1,353 @@
   237.4 +/*
   237.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   237.6 + *
   237.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   237.8 + *
   237.9 + * The contents of this file are subject to the terms of either the GNU
  237.10 + * General Public License Version 2 only ("GPL") or the Common
  237.11 + * Development and Distribution License("CDDL") (collectively, the
  237.12 + * "License"). You may not use this file except in compliance with the
  237.13 + * License. You can obtain a copy of the License at
  237.14 + * http://www.netbeans.org/cddl-gplv2.html
  237.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  237.16 + * specific language governing permissions and limitations under the
  237.17 + * License. When distributing the software, include this License Header
  237.18 + * Notice in each file and include the License file at
  237.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  237.20 + * particular file as subject to the "Classpath" exception as provided
  237.21 + * by Sun in the GPL Version 2 section of the License file that
  237.22 + * accompanied this code. If applicable, add the following below the
  237.23 + * License Header, with the fields enclosed by brackets [] replaced by
  237.24 + * your own identifying information:
  237.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  237.26 + *
  237.27 + * Contributor(s):
  237.28 + *
  237.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  237.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  237.31 + * Microsystems, Inc. All Rights Reserved.
  237.32 + *
  237.33 + * If you wish your version of this file to be governed by only the CDDL
  237.34 + * or only the GPL Version 2, indicate your decision by adding
  237.35 + * "[Contributor] elects to include this software in this distribution
  237.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  237.37 + * single choice of license, a recipient has the option to distribute
  237.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  237.39 + * to extend the choice of license to its licensees as provided above.
  237.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  237.41 + * Version 2 license, then the option applies only if the new code is
  237.42 + * made subject to such option by the copyright holder.
  237.43 + */
  237.44 +package org.netbeans.modules.soa.validation;
  237.45 +
  237.46 +import static org.netbeans.modules.soa.ui.UI.*;
  237.47 +
  237.48 +/**
  237.49 + * @author Vladimir Yaroslavskiy
  237.50 + * @version 2006.04.14
  237.51 + */
  237.52 +public final class DurationUtil {
  237.53 +
  237.54 +  private DurationUtil() {}
  237.55 +
  237.56 +  public static Duration parseDuration(String value, boolean throwException) {
  237.57 +//out();
  237.58 +//out("PARSE duration: " + value);
  237.59 +    boolean hasMinus = false;
  237.60 +    int years = 0;
  237.61 +    int months = 0;
  237.62 +    int days = 0;
  237.63 +    int hours = 0;
  237.64 +    int minutes = 0;
  237.65 +    double seconds = 0.0;
  237.66 +//out("1");
  237.67 +    if (value == null || value.length() == 0) {
  237.68 +      return throwException("FIX_Empty_Value", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  237.69 +    }
  237.70 +//out("2");
  237.71 +    if ( !value.startsWith(QUOTE) && !value.endsWith(QUOTE)) {
  237.72 +      if (throwException) {
  237.73 +        return null;
  237.74 +      }
  237.75 +      return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
  237.76 +    }
  237.77 +    if (value.length() == 1 && value.startsWith(QUOTE)) {
  237.78 +      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  237.79 +    }
  237.80 +    if (value.startsWith(QUOTE) && !value.endsWith(QUOTE)) {
  237.81 +      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  237.82 +    }
  237.83 +    if (!value.startsWith(QUOTE) && value.endsWith(QUOTE)) {
  237.84 +      return throwException("FIX_Invalid_Value", value, throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  237.85 +    }
  237.86 +    value = removeQuotes(value);
  237.87 +
  237.88 +    if (value.length() == 0) {
  237.89 +      return throwException("FIX_Empty_Value", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
  237.90 +    }
  237.91 +//out("3");
  237.92 +    int k;
  237.93 +    boolean wasDesignator = false;
  237.94 +    boolean wasDesignatorT = false;
  237.95 +
  237.96 +    // minus
  237.97 +    if (value.charAt(0) == MINUS.charAt(0)) {
  237.98 +      hasMinus = true;
  237.99 +      value = value.substring(1);
 237.100 +    }
 237.101 +    // P
 237.102 +    if (value.charAt(0) != P_DELIM.charAt(0)) {
 237.103 +      return throwException("FIX_P_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.104 +    }
 237.105 +    value = value.substring(1);
 237.106 +
 237.107 +    // years 
 237.108 +    k = value.indexOf(Y_DELIM);
 237.109 +   
 237.110 +    if (k != -1) {
 237.111 +      wasDesignator = true;
 237.112 +      years = parseInt(value.substring(0, k));
 237.113 +       
 237.114 +      if (years < 0) {
 237.115 +        return throwException("FIX_Year", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.116 +      }
 237.117 +      value = value.substring(k + 1);
 237.118 +    }
 237.119 +    // months 
 237.120 +    k = value.indexOf(M_DELIM);
 237.121 +    int t = value.indexOf(T_DELIM);
 237.122 +//out("4");
 237.123 +    
 237.124 +    if (k != -1) {
 237.125 +      months = parseInt(value.substring(0, k));
 237.126 +
 237.127 +      if (months < 0) {
 237.128 +        if (t == -1 || k < t) {
 237.129 +          return throwException("FIX_Months", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.130 +        }
 237.131 +        months = 0;
 237.132 +      }
 237.133 +      else {
 237.134 +        wasDesignator = true;
 237.135 +        value = value.substring(k + 1);
 237.136 +      }
 237.137 +    }
 237.138 +    // days 
 237.139 +    k = value.indexOf(D_DELIM);
 237.140 +    
 237.141 +    if (k != -1) {
 237.142 +      wasDesignator = true;
 237.143 +      days = parseInt(value.substring(0, k));
 237.144 +        
 237.145 +      if (days < 0) {
 237.146 +        return throwException("FIX_Days", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.147 +      }
 237.148 +      value = value.substring(k + 1);
 237.149 +    }
 237.150 +    if (value.length() == 0) {
 237.151 +      if ( !wasDesignator) {
 237.152 +        return throwException("FIX_Designator", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.153 +      }
 237.154 +      return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 237.155 +    }
 237.156 +//out("T: " + value);
 237.157 +    // T
 237.158 +    if (value.charAt(0) != T_DELIM.charAt(0)) {
 237.159 +      return throwException("FIX_T_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.160 +    }
 237.161 +    value = value.substring(1);
 237.162 +
 237.163 +    // hours 
 237.164 +    k = value.indexOf(H_DELIM);
 237.165 +    
 237.166 +    if (k != -1) {
 237.167 +      wasDesignator = true;
 237.168 +      wasDesignatorT = true;
 237.169 +      hours = parseInt(value.substring(0, k));
 237.170 +        
 237.171 +      if (hours < 0) {
 237.172 +        return throwException("FIX_Hours", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.173 +      }
 237.174 +      value = value.substring(k + 1);
 237.175 +    }
 237.176 +    // minutes 
 237.177 +    k = value.indexOf(M_DELIM);
 237.178 +    
 237.179 +    if (k != -1) {
 237.180 +      wasDesignator = true;
 237.181 +      wasDesignatorT = true;
 237.182 +      minutes = parseInt(value.substring(0, k));
 237.183 +        
 237.184 +      if (minutes < 0) {
 237.185 +        return throwException("FIX_Minutes", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.186 +      }
 237.187 +      value = value.substring(k + 1);
 237.188 +    }
 237.189 +    // seconds 
 237.190 +    k = value.indexOf(S_DELIM);
 237.191 +    
 237.192 +    if (k != -1) {
 237.193 +      wasDesignator = true;
 237.194 +      wasDesignatorT = true;
 237.195 +      seconds = parseDouble(value.substring(0, k));
 237.196 +        
 237.197 +      if (seconds < 0) {
 237.198 +        return throwException("FIX_Seconds", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.199 +      }
 237.200 +      value = value.substring(k + 1);
 237.201 +    }
 237.202 +    if ( !wasDesignatorT) {
 237.203 +      return throwException("FIX_Absent_T_symbol", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.204 +    }
 237.205 +    if ( !wasDesignator) {
 237.206 +      return throwException("FIX_Designator", throwException, hasMinus, years, months, days, hours, minutes, seconds); // NOI18N
 237.207 +    }
 237.208 +//out("6: " + years + " " + months + " " + days + " " + hours + " " + minutes + " " + seconds);
 237.209 +    return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 237.210 +  }
 237.211 +
 237.212 +  private static Duration throwException(String key, boolean throwException, 
 237.213 +    boolean hasMinus, int years, int months, int days, int hours, int minutes, double seconds)
 237.214 +  {
 237.215 +    return throwExceptionMsg(i18n(DurationUtil.class, key), throwException, hasMinus, years, months, days, hours, minutes, seconds);
 237.216 +  }
 237.217 +
 237.218 +  private static Duration throwException(String key, String param, boolean throwException, 
 237.219 +    boolean hasMinus, int years, int months, int days, int hours, int minutes, double seconds)
 237.220 +  {
 237.221 +    return throwExceptionMsg(i18n(DurationUtil.class, key, param), throwException, hasMinus, years, months, days, hours, minutes, seconds);
 237.222 +  }
 237.223 +
 237.224 +  private static Duration throwExceptionMsg(String message, boolean throwException, 
 237.225 +    boolean hasMinus,
 237.226 +    int years,
 237.227 +    int months,
 237.228 +    int days,
 237.229 +    int hours,
 237.230 +    int minutes,
 237.231 +    double seconds)
 237.232 +  {
 237.233 +//out("ERROR: " + message);
 237.234 +    if (throwException) {
 237.235 +      throw new IllegalArgumentException(message);
 237.236 +    }
 237.237 +    return new Duration(hasMinus, years, months, days, hours, minutes, seconds);
 237.238 +  }
 237.239 +
 237.240 +  public static String addQuotes(String value) {
 237.241 +    return QUOTE + value + QUOTE;
 237.242 +  }
 237.243 +
 237.244 +  public static String removeQuotes(String value) {
 237.245 +    if (value == null) {
 237.246 +      return null;
 237.247 +    }
 237.248 +    if (value.startsWith(QUOTE)) {
 237.249 +      value = value.substring(1);
 237.250 +    }
 237.251 +    if (value.endsWith(QUOTE)) {
 237.252 +      value = value.substring(0, value.length() - 1);
 237.253 +    }
 237.254 +    return value;
 237.255 +  }
 237.256 +
 237.257 +  public static String getContent(
 237.258 +    boolean isFor,
 237.259 +    int year,
 237.260 +    int month,
 237.261 +    int day,
 237.262 +    int hour,
 237.263 +    int minute,
 237.264 +    double second)
 237.265 +  {
 237.266 +    if (isFor) {
 237.267 +      StringBuffer content = new StringBuffer();
 237.268 +      content.append(P_DELIM);
 237.269 +      content.append(getStr(year));
 237.270 +      content.append(Y_DELIM);
 237.271 +      content.append(getStr(month));
 237.272 +      content.append(M_DELIM);
 237.273 +      content.append(getStr(day));
 237.274 +      content.append(D_DELIM);
 237.275 +      content.append(T_DELIM);
 237.276 +      content.append(getStr(hour));
 237.277 +      content.append(H_DELIM);
 237.278 +      content.append(getStr(minute));
 237.279 +      content.append(M_DELIM);
 237.280 +      content.append(getStr(second));
 237.281 +      content.append(S_DELIM);
 237.282 +      return content.toString();
 237.283 +    }
 237.284 +    else {
 237.285 +      return getParseUntil(
 237.286 +        getString(year),
 237.287 +        getString(month),
 237.288 +        getString(day),
 237.289 +        getString(hour),
 237.290 +        getString(minute),
 237.291 +        getStr(second));
 237.292 +    }
 237.293 +  }
 237.294 +
 237.295 +  public static String getParseUntil(
 237.296 +    String year,
 237.297 +    String month,
 237.298 +    String day,
 237.299 +    String hour,
 237.300 +    String minute,
 237.301 +    String second)
 237.302 +  {
 237.303 +    StringBuffer content = new StringBuffer();
 237.304 +    content.append(year);
 237.305 +    content.append(MINUS);
 237.306 +    content.append(month);
 237.307 +    content.append(MINUS);
 237.308 +    content.append(day);
 237.309 +    content.append(T_DELIM);
 237.310 +    content.append(hour);
 237.311 +    content.append(COLON);
 237.312 +    content.append(minute);
 237.313 +    content.append(COLON);
 237.314 +    content.append(second);
 237.315 +    return content.toString();
 237.316 +  }
 237.317 +
 237.318 +  public static int parseInt(String value) {
 237.319 +    return getInt(value);
 237.320 +  }
 237.321 +
 237.322 +  public static double parseDouble(String value) {
 237.323 +    return getDouble(value);
 237.324 +  }
 237.325 +
 237.326 +  private static String getString(int value) {
 237.327 +    if (0 <= value && value <= NINE) {
 237.328 +      return ZERO + value;
 237.329 +    }
 237.330 +    return getStr(value);
 237.331 +  }
 237.332 +
 237.333 +  private static String getStr(int value) {
 237.334 +    return EMPTY + value;
 237.335 +  }
 237.336 +  
 237.337 +  private static String getStr(double value) {
 237.338 +    return EMPTY + value;
 237.339 +  }
 237.340 +  
 237.341 +  private static final int NINE = 9;
 237.342 +
 237.343 +  private static final String EMPTY   =  ""; // NOI18N
 237.344 +  private static final String ZERO    = "0"; // NOI18N
 237.345 +  private static final String MINUS   = "-"; // NOI18N
 237.346 +  private static final String COLON   = ":"; // NOI18N
 237.347 +  private static final String QUOTE   = "'"; // NOI18N
 237.348 +
 237.349 +  private static final String D_DELIM = "D"; // NOI18N
 237.350 +  private static final String H_DELIM = "H"; // NOI18N
 237.351 +  private static final String M_DELIM = "M"; // NOI18N
 237.352 +  private static final String P_DELIM = "P"; // NOI18N
 237.353 +  private static final String S_DELIM = "S"; // NOI18N
 237.354 +  private static final String Y_DELIM = "Y"; // NOI18N
 237.355 +  public  static final String T_DELIM = "T"; // NOI18N
 237.356 +}
   238.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   238.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/LineUtil.java	Thu Apr 17 15:50:14 2008 +0200
   238.3 @@ -0,0 +1,292 @@
   238.4 +/*
   238.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   238.6 + *
   238.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   238.8 + *
   238.9 + * The contents of this file are subject to the terms of either the GNU
  238.10 + * General Public License Version 2 only ("GPL") or the Common
  238.11 + * Development and Distribution License("CDDL") (collectively, the
  238.12 + * "License"). You may not use this file except in compliance with the
  238.13 + * License. You can obtain a copy of the License at
  238.14 + * http://www.netbeans.org/cddl-gplv2.html
  238.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  238.16 + * specific language governing permissions and limitations under the
  238.17 + * License. When distributing the software, include this License Header
  238.18 + * Notice in each file and include the License file at
  238.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  238.20 + * particular file as subject to the "Classpath" exception as provided
  238.21 + * by Sun in the GPL Version 2 section of the License file that
  238.22 + * accompanied this code. If applicable, add the following below the
  238.23 + * License Header, with the fields enclosed by brackets [] replaced by
  238.24 + * your own identifying information:
  238.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  238.26 + *
  238.27 + * Contributor(s):
  238.28 + *
  238.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  238.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  238.31 + * Microsystems, Inc. All Rights Reserved.
  238.32 + *
  238.33 + * If you wish your version of this file to be governed by only the CDDL
  238.34 + * or only the GPL Version 2, indicate your decision by adding
  238.35 + * "[Contributor] elects to include this software in this distribution
  238.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  238.37 + * single choice of license, a recipient has the option to distribute
  238.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  238.39 + * to extend the choice of license to its licensees as provided above.
  238.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  238.41 + * Version 2 license, then the option applies only if the new code is
  238.42 + * made subject to such option by the copyright holder.
  238.43 + */
  238.44 +package org.netbeans.modules.soa.validation;
  238.45 +
  238.46 +import javax.swing.text.AbstractDocument;
  238.47 +import javax.swing.text.BadLocationException;
  238.48 +import javax.swing.text.StyledDocument;
  238.49 +
  238.50 +import org.w3c.dom.Element;
  238.51 +import org.w3c.dom.NodeList;
  238.52 +
  238.53 +import org.netbeans.modules.xml.xam.Component;
  238.54 +import org.netbeans.modules.xml.xam.Model;
  238.55 +import org.netbeans.modules.xml.xam.ModelSource;
  238.56 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent;
  238.57 +import org.netbeans.modules.xml.xam.dom.AbstractDocumentModel;
  238.58 +import org.netbeans.modules.xml.xam.dom.DocumentComponent;
  238.59 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  238.60 +
  238.61 +import org.openide.cookies.LineCookie;
  238.62 +import org.openide.filesystems.FileObject;
  238.63 +import org.openide.loaders.DataObject;
  238.64 +import org.openide.loaders.DataObjectNotFoundException;
  238.65 +import org.openide.text.Line;
  238.66 +import org.openide.text.NbDocument;
  238.67 +import org.openide.util.Lookup;
  238.68 +
  238.69 +/**
  238.70 + * @author Vladimir Yaroslavskiy
  238.71 + * @version 2006.04.14
  238.72 + */
  238.73 +public final class LineUtil {
  238.74 +
  238.75 +  private LineUtil() {}
  238.76 +
  238.77 +    public static Line.Part getLinePart(ResultItem item) {
  238.78 +      Line line = getLine(item);
  238.79 +
  238.80 +      if (line == null) {
  238.81 +        return null;
  238.82 +      }
  238.83 +      int column = getColumn(item.getComponents());
  238.84 +
  238.85 +      if (column == -1) {
  238.86 +        column = 0;
  238.87 +      }
  238.88 +      int length = line.getText().length() - column;
  238.89 +
  238.90 +      return line.createPart(column, length);
  238.91 +    }
  238.92 +
  238.93 +    public static Line getLine(ResultItem item) {
  238.94 +      int number;
  238.95 +      Component component = item.getComponents();
  238.96 +
  238.97 +      if (component != null) {
  238.98 +        number = -1;
  238.99 +
 238.100 +        if (component instanceof DocumentComponent) {
 238.101 +          number = getLineNumber((DocumentComponent) item.getComponents());
 238.102 +        } 
 238.103 +      }
 238.104 +      else {
 238.105 +        number = item.getLineNumber() - 1;
 238.106 +      }
 238.107 +//System.out.println("  number: " + number);
 238.108 +
 238.109 +      if (number < 1) {
 238.110 +        return null;
 238.111 +      }
 238.112 +      FileObject file = getFileObjectByModel(component == null ? item.getModel() : component.getModel());
 238.113 +
 238.114 +      if (file == null) {
 238.115 +        return null;
 238.116 +      }
 238.117 +      LineCookie cookie = null;
 238.118 +
 238.119 +      try {
 238.120 +        DataObject data = DataObject.find(file);
 238.121 +        cookie = (LineCookie) data.getCookie(LineCookie.class);
 238.122 +      }
 238.123 +      catch (DataObjectNotFoundException e) {
 238.124 +        e.printStackTrace();
 238.125 +      }
 238.126 +      if (cookie == null) {
 238.127 +        return null;
 238.128 +      }
 238.129 +      Line line = cookie.getLineSet().getCurrent(number);
 238.130 +
 238.131 +      if (line == null) {
 238.132 +        return null;
 238.133 +      }
 238.134 +      return cookie.getLineSet().getCurrent(number);
 238.135 +    }
 238.136 +
 238.137 +    private static int getColumn(Component component) {
 238.138 +      AbstractDocument doc = getAbstractDocument(component);
 238.139 +
 238.140 +      if (doc == null) {
 238.141 +        return -1;
 238.142 +      }
 238.143 +      int position = findPosition((AbstractDocumentModel) component.getModel(), ((AbstractDocumentComponent) component).getPeer());
 238.144 +      return findColumn(doc, position);
 238.145 +    }
 238.146 +
 238.147 +    private static AbstractDocument getAbstractDocument(Component component) {
 238.148 +      if (component == null) {
 238.149 +        return null;
 238.150 +      }
 238.151 +      Model model = component.getModel();
 238.152 +
 238.153 +      if (model == null) {
 238.154 +        return null;
 238.155 +      }
 238.156 +      ModelSource source = model.getModelSource();
 238.157 +
 238.158 +      if (source == null) {
 238.159 +        return null;
 238.160 +      }
 238.161 +      return (AbstractDocument) source.getLookup().lookup(AbstractDocument.class);
 238.162 +    }
 238.163 +
 238.164 +    private static int getLineNumber(DocumentComponent entity) {
 238.165 +      if (entity == null) {
 238.166 +        return -1;
 238.167 +      }
 238.168 +      Model model = entity.getModel();
 238.169 +
 238.170 +      if (model == null) {
 238.171 +        return -1;
 238.172 +      }
 238.173 +      ModelSource source = model.getModelSource();
 238.174 +
 238.175 +      if (source == null) {
 238.176 +        return -1;
 238.177 +      }
 238.178 +      Lookup lookup = source.getLookup();
 238.179 +
 238.180 +      if (lookup == null) {
 238.181 +        return -1;
 238.182 +      }
 238.183 +      StyledDocument document = (StyledDocument) lookup.lookup(StyledDocument.class);
 238.184 +
 238.185 +      if (document == null) {
 238.186 +        return -1;
 238.187 +      }
 238.188 +      return NbDocument.findLineNumber(document, entity.findPosition());
 238.189 +    }
 238.190 +
 238.191 +    public static FileObject getFileObjectByModel(Model model) {
 238.192 +      if (model == null) {
 238.193 +        return null;
 238.194 +      }
 238.195 +      ModelSource src = model.getModelSource();
 238.196 +
 238.197 +      if (src == null) {
 238.198 +       return null;
 238.199 +      }
 238.200 +      Lookup lookup = src.getLookup();
 238.201 +
 238.202 +      if (lookup == null) {
 238.203 +        return null;
 238.204 +      }
 238.205 +      return lookup.lookup(FileObject.class);
 238.206 +    }
 238.207 +
 238.208 +    private static int findColumn(AbstractDocument doc, int argInt) {
 238.209 +      javax.swing.text.Element paragraphsParent = findLineRootElement(doc);
 238.210 +      int indx = paragraphsParent.getElementIndex(argInt);
 238.211 +      return argInt - paragraphsParent.getElement(indx).getStartOffset();
 238.212 +    }
 238.213 +
 238.214 +    private static int findPosition(AbstractDocumentModel model, org.w3c.dom.Node node) {
 238.215 +      Element root = ((DocumentComponent) model.getRootComponent()).getPeer();
 238.216 +      javax.swing.text.Document doc = model.getBaseDocument();
 238.217 +
 238.218 +      try {
 238.219 +        String buf = doc.getText(0, doc.getLength());
 238.220 +      
 238.221 +        if (node instanceof Element) {
 238.222 +          return findPosition((Element) node, buf, root, getRootElementPosition(buf, root));
 238.223 +        }
 238.224 +      }
 238.225 +      catch (BadLocationException e) {}
 238.226 +
 238.227 +      return -1;
 238.228 +    }
 238.229 +
 238.230 +    private static javax.swing.text.Element findLineRootElement(AbstractDocument doc) {
 238.231 +      javax.swing.text.Element element = doc.getParagraphElement(0).getParentElement();
 238.232 +
 238.233 +      if (element == null) {
 238.234 +        element = doc.getDefaultRootElement();
 238.235 +      }
 238.236 +      return element;
 238.237 +    }
 238.238 +
 238.239 +    private static int getRootElementPosition(String buf, Element root) {
 238.240 +      NodeList children = root.getOwnerDocument().getChildNodes();
 238.241 +      int pos = 0;
 238.242 +
 238.243 +      for (int i = 0; i < children.getLength(); i++) {
 238.244 +        org.w3c.dom.Node n = children.item(i);
 238.245 +
 238.246 +        if (n != root) {
 238.247 +          String s = n.getNodeValue();
 238.248 +        
 238.249 +          if (s != null) {
 238.250 +            pos += s.length();
 238.251 +          }
 238.252 +        }
 238.253 +        else {
 238.254 +          break;
 238.255 +        }
 238.256 +      }
 238.257 +      return buf.indexOf(root.getTagName(), pos);
 238.258 +    }
 238.259 +
 238.260 +    private static int findPosition(Element target, String buf, Element base, Integer fromPos) {
 238.261 +      if (target == base) {
 238.262 +        return fromPos;
 238.263 +      }
 238.264 +      NodeList children = base.getChildNodes();
 238.265 +
 238.266 +      for (int i = 0; i < children.getLength(); i++) {
 238.267 +        org.w3c.dom.Node node = children.item(i);
 238.268 +
 238.269 +        if ( !(node instanceof Element)) {
 238.270 +          String s = node.getNodeValue();
 238.271 +
 238.272 +          if (s == null) {
 238.273 +            s = node.getTextContent();
 238.274 +          }
 238.275 +          if (s != null) {
 238.276 +            fromPos += s.length();
 238.277 +          }
 238.278 +          continue;
 238.279 +        }
 238.280 +        Element current = (Element) children.item(i);
 238.281 +        String tag = "<" + current.getTagName();
 238.282 +        fromPos = buf.indexOf(tag, fromPos);
 238.283 +
 238.284 +        if (current == target) {
 238.285 +          return fromPos;
 238.286 +        }
 238.287 +        int found = findPosition(target, buf, current, fromPos);
 238.288 +
 238.289 +        if (found > -1) {
 238.290 +          return found;
 238.291 +        }
 238.292 +      }
 238.293 +      return -1;
 238.294 +    }
 238.295 +}
   239.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   239.2 +++ b/soa.validation/src/org/netbeans/modules/soa/validation/Listener.java	Thu Apr 17 15:50:14 2008 +0200
   239.3 @@ -0,0 +1,53 @@
   239.4 +/*
   239.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
   239.6 + *
   239.7 + * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
   239.8 + *
   239.9 + * The contents of this file are subject to the terms of either the GNU
  239.10 + * General Public License Version 2 only ("GPL") or the Common
  239.11 + * Development and Distribution License("CDDL") (collectively, the
  239.12 + * "License"). You may not use this file except in compliance with the
  239.13 + * License. You can obtain a copy of the License at
  239.14 + * http://www.netbeans.org/cddl-gplv2.html
  239.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
  239.16 + * specific language governing permissions and limitations under the
  239.17 + * License. When distributing the software, include this License Header
  239.18 + * Notice in each file and include the License file at
  239.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  239.20 + * particular file as subject to the "Classpath" exception as provided
  239.21 + * by Sun in the GPL Version 2 section of the License file that
  239.22 + * accompanied this code. If applicable, add the following below the
  239.23 + * License Header, with the fields enclosed by brackets [] replaced by
  239.24 + * your own identifying information:
  239.25 + * "Portions Copyrighted [year] [name of copyright owner]"
  239.26 + *
  239.27 + * Contributor(s):
  239.28 + *
  239.29 + * The Original Software is NetBeans. The Initial Developer of the Original
  239.30 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  239.31 + * Microsystems, Inc. All Rights Reserved.
  239.32 + *
  239.33 + * If you wish your version of this file to be governed by only the CDDL
  239.34 + * or only the GPL Version 2, indicate your decision by adding
  239.35 + * "[Contributor] elects to include this software in this distribution
  239.36 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
  239.37 + * single choice of license, a recipient has the option to distribute
  239.38 + * your version of this file under either the CDDL, the GPL Version 2 or
  239.39 + * to extend the choice of license to its licensees as provided above.
  239.40 + * However, if you add GPL Version 2 code and therefore, elected the GPL
  239.41 + * Version 2 license, then the option applies only if the new code is
  239.42 + * made subject to such option by the copyright holder.
  239.43 + */
  239.44 +package org.netbeans.modules.soa.validation;
  239.45 +
  239.46 +import java.util.List;
  239.47 +import org.netbeans.modules.xml.xam.spi.Validator.ResultItem;
  239.48 +
  239.49 +/**
  239.50 + * @author Vladimir Yaroslavskiy
  239.51 + * @version 2008.04.14
  239.52 + */
  239.53 +public interface Listener {
  239.54 +
  239.55 +  void validationUpdated(List<ResultItem> result);
  239.56 +}
   240.1 --- a/sql.project/src/org/netbeans/modules/sql/project/ui/wizards/PanelProjectLocationVisual.java	Thu Apr 17 10:51:04 2008 +0200
   240.2 +++ b/sql.project/src/org/netbeans/modules/sql/project/ui/wizards/PanelProjectLocationVisual.java	Thu Apr 17 15:50:14 2008 +0200
   240.3 @@ -231,7 +231,7 @@
   240.4          try {
   240.5              boolean bValid = true;
   240.6              File tempFile =  new File(fileName);
   240.7 -            String tempFileName =0+fileName;
   240.8 +            String tempFileName ="00"+fileName;
   240.9              File actualTempFile = File.createTempFile(tempFileName, null);
  240.10  
  240.11              if (!FileUtil.normalizeFile(tempFile).equals(tempFile.getCanonicalFile())) {
   241.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   241.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   241.3 @@ -44,8 +44,8 @@
   241.4  BTN_otd_edit=Edit...
   241.5  BTN_otd_new=New...
   241.6  
   241.7 -MNEMONIC_otd_edit_import=e
   241.8 -MNEMONIC_otd_new_import=w
   241.9 +MNE_otd_edit_import=e
  241.10 +MNE_otd_new_import=w
  241.11  
  241.12  
  241.13  #
  241.14 @@ -72,7 +72,7 @@
  241.15  LBL_otd_db_source_description=Select from the list of existing datasources or click New to create a new datasource.
  241.16  
  241.17  LBL_otd_db_filetreeview=Existing datasources and available tables:
  241.18 -MNEMONIC_otd_db_filetreeview=x
  241.19 +MNE_otd_db_filetreeview=x
  241.20  
  241.21  
  241.22  #
  241.23 @@ -93,8 +93,8 @@
  241.24  LBL_otd_file_source_step=Select Filesource
  241.25  LBL_otd_file_source_description=Select from the list of existing filesources or click New to create a new filesource.
  241.26  
  241.27 -LBL_otd_file_filetreeview=Existing filesources and imported files:
  241.28 -MNEMONIC_otd_file_filetreeview=x
  241.29 +LABEL_otd_file_filetreeview=Existing filesources and imported files:
  241.30 +MNE_otd_file_filetreeview=x
  241.31  
  241.32  
  241.33  #
  241.34 @@ -107,8 +107,9 @@
  241.35  
  241.36  ERROR_otd_name_exists=An OTD with the name "{0}" already exists.  Please choose a new name.
  241.37  
  241.38 -LBL_otd_editotd_name=OTD name
  241.39 -MNEMONIC_otd_editotd_name=n
  241.40 +LABEL_otd_editotd_name=OTD name
  241.41 +MNE_otd_editotd_name=n
  241.42 +LABEL_BrowseFolders=Browse Folders
  241.43  MNE_BrowseFolders_jLabel1=B
  241.44  
  241.45  
  241.46 @@ -202,15 +203,15 @@
  241.47  
  241.48  
  241.49  #Target chooser
  241.50 -LBL_TargetChooser_FileName_Label=File Name\:
  241.51 -LBL_TargetChooser_FolderName_Label=Folder Name\:
  241.52 -LBL_TargetChooser_Project_Label=Project\:
  241.53 -LBL_TargetChooser_Folder_Label=Folder\:
  241.54 -LBL_TargetChooser_ParentFolder_Label=Parent Folder\:
  241.55 -LBL_TargetChooser_Browse_Button=Browse...
  241.56 -LBL_TargetChooser_CreatedFile_Label=Created File\:
  241.57 -LBL_TargetChooser_CreatedFolder_Label=Created Folder\:
  241.58 -LBL_TargetChooser_Location_Label=Location\:
  241.59 +LABEL_TargetChooser_FileName_Label=File Name\:
  241.60 +LABEL_TargetChooser_FolderName_Label=Folder Name\:
  241.61 +LABEL_TargetChooser_Project_Label=Project\:
  241.62 +LABEL_TargetChooser_Folder_Label=Folder\:
  241.63 +LABEL_TargetChooser_ParentFolder_Label=Parent Folder\:
  241.64 +LABEL_TargetChooser_Browse_Button=Browse...
  241.65 +LABEL_TargetChooser_CreatedFile_Label=Created File\:
  241.66 +LABEL_TargetChooser_CreatedFolder_Label=Created Folder\:
  241.67 +LABEL_TargetChooser_Location_Label=Location\:
  241.68  MNE_TargetChooser_FileName_Label=N
  241.69  MNE_TargetChooser_FolderName_Label=N
  241.70  MNE_TargetChooser_Project_Label=P
  241.71 @@ -277,6 +278,7 @@
  241.72  AD_fileTextField=N/A
  241.73  
  241.74  BTN_BrowseFolders_Select_Option=Select
  241.75 +MNE_BrowseFolders_Select_Option=S
  241.76  BTN_BrowseFolders_Cancel_Option=Cancel
  241.77  ACSN_BrowseFolders_Select_Option=Select
  241.78  ACSN_BrowseFolders_Cancel_Option=Cancel
  241.79 @@ -284,7 +286,7 @@
  241.80  ACSD_BrowseFolders_Cancel_Option=Cancel
  241.81  HINT_group=Group
  241.82  HINT_project=Project
  241.83 -MNE_BrowseFolders_Select_Option=Select
  241.84 +
  241.85  LBL_TemplatesPanel_Name=Choose File Type
  241.86  LBL_TemplatesPanel_Dots=...
  241.87  
   242.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/ChosenColumnPanel.java	Thu Apr 17 10:51:04 2008 +0200
   242.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/ChosenColumnPanel.java	Thu Apr 17 15:50:14 2008 +0200
   242.3 @@ -488,9 +488,7 @@
   242.4          // set checkbox column size
   242.5          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
   242.6          column.setResizable(true);
   242.7 -        column.setMinWidth(40);
   242.8          column.setPreferredWidth(80);
   242.9 -        column.setMaxWidth(120);
  242.10      }
  242.11  
  242.12      public void addColumnTable(final List testList) {
  242.13 @@ -504,9 +502,7 @@
  242.14          // set checkbox column size
  242.15          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
  242.16          column.setResizable(true);
  242.17 -        column.setMinWidth(40);
  242.18          column.setPreferredWidth(80);
  242.19 -        column.setMaxWidth(120);
  242.20          this.tableScroll = new JScrollPane(this.metaDataTColumn);
  242.21          final javax.swing.border.Border inside = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3, 3, 3,
  242.22                  3), BorderFactory.createLineBorder(Color.GRAY));
   243.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/InsertColumnPanel.java	Thu Apr 17 10:51:04 2008 +0200
   243.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/InsertColumnPanel.java	Thu Apr 17 15:50:14 2008 +0200
   243.3 @@ -495,9 +495,7 @@
   243.4          // set checkbox column size
   243.5          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
   243.6          column.setResizable(true);
   243.7 -        column.setMinWidth(40);
   243.8          column.setPreferredWidth(80);
   243.9 -        column.setMaxWidth(120);
  243.10      }
  243.11  
  243.12      public void addColumnTable(final List testList) {
  243.13 @@ -511,9 +509,7 @@
  243.14          // set checkbox column size
  243.15          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
  243.16          column.setResizable(true);
  243.17 -        column.setMinWidth(40);
  243.18          column.setPreferredWidth(80);
  243.19 -        column.setMaxWidth(120);
  243.20          this.tableScroll = new JScrollPane(this.metaDataTColumn);
  243.21          final javax.swing.border.Border inside = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3, 3, 3,
  243.22                  3), BorderFactory.createLineBorder(Color.GRAY));
   244.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/JDBCWizardSelectionPanel.java	Thu Apr 17 10:51:04 2008 +0200
   244.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/JDBCWizardSelectionPanel.java	Thu Apr 17 15:50:14 2008 +0200
   244.3 @@ -201,7 +201,7 @@
   244.4          this.jLabel1.setText(NbBundle.getMessage(JDBCWizardSelectionPanel.class, "LBL_DS"));
   244.5  
   244.6          this.availableTablesLabel.setText(NbBundle.getMessage(JDBCWizardSelectionPanel.class, "LBL_AVLB_TAB"));
   244.7 -
   244.8 +        this.availableTablesLabel.setDisplayedMnemonic(NbBundle.getMessage(this.getClass(), "LBL_AVLB_TAB").charAt(0));
   244.9          this.selectedTablesLabel.setText(NbBundle.getMessage(JDBCWizardSelectionPanel.class, "LBL_SEL_TAB"));
  244.10          org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
  244.11          this.setLayout(layout);
   245.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/JDBCWizardTablePanel.java	Thu Apr 17 10:51:04 2008 +0200
   245.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/JDBCWizardTablePanel.java	Thu Apr 17 15:50:14 2008 +0200
   245.3 @@ -946,15 +946,11 @@
   245.4          // set checkbox column size
   245.5          final TableColumn column = this.metaDataTable.getColumnModel().getColumn(0);
   245.6          column.setResizable(true);
   245.7 -        column.setMinWidth(40);
   245.8          column.setPreferredWidth(80);
   245.9 -        column.setMaxWidth(120);
  245.10          
  245.11          final TableColumn columnAdv = this.metaDataTable.getColumnModel().getColumn(2);
  245.12          columnAdv.setResizable(true);
  245.13 -        columnAdv.setMinWidth(60);
  245.14          columnAdv.setPreferredWidth(80);
  245.15 -        columnAdv.setMaxWidth(100);
  245.16      }
  245.17  
  245.18      /**
  245.19 @@ -975,9 +971,7 @@
  245.20          // set checkbox column size
  245.21          final TableColumn column = this.metaDataTable.getColumnModel().getColumn(0);
  245.22          column.setResizable(true);
  245.23 -        column.setMinWidth(40);
  245.24          column.setPreferredWidth(40);
  245.25 -        column.setMaxWidth(80);
  245.26          this.tableScroll = new JScrollPane(this.metaDataTable);
  245.27          final javax.swing.border.Border inside = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3, 3, 3,
  245.28                  3), BorderFactory.createLineBorder(Color.GRAY));
   246.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/PolledColumnPanel.java	Thu Apr 17 10:51:04 2008 +0200
   246.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/PolledColumnPanel.java	Thu Apr 17 15:50:14 2008 +0200
   246.3 @@ -506,9 +506,7 @@
   246.4          // set checkbox column size
   246.5          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
   246.6          column.setResizable(true);
   246.7 -        column.setMinWidth(40);
   246.8          column.setPreferredWidth(80);
   246.9 -        column.setMaxWidth(120);
  246.10          this.tableScroll = new JScrollPane(this.metaDataTColumn);
  246.11          final javax.swing.border.Border inside = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3, 3, 3,
  246.12                  3), BorderFactory.createLineBorder(Color.GRAY));
   247.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/SimpleTargetChooserPanelGUI.java	Thu Apr 17 10:51:04 2008 +0200
   247.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/SimpleTargetChooserPanelGUI.java	Thu Apr 17 15:50:14 2008 +0200
   247.3 @@ -233,17 +233,17 @@
   247.4          if (isFolder) {
   247.5              jLabel3.setText(
   247.6                  NbBundle.getMessage(
   247.7 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_FolderName_Label"
   247.8 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_FolderName_Label"
   247.9                  )
  247.10              ); // NOI18N
  247.11              jLabel3.setDisplayedMnemonic(
  247.12                  NbBundle.getMessage(
  247.13 -                    SimpleTargetChooserPanelGUI.class, "MNE_TargetChooser_FolderName_Label"
  247.14 +                    SimpleTargetChooserPanelGUI.class, "MNE_TargetChooser_FileName_Label"
  247.15                  ).charAt(0)
  247.16              ); // NOI18N
  247.17              jLabel2.setText(
  247.18                  NbBundle.getMessage(
  247.19 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_ParentFolder_Label"
  247.20 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_ParentFolder_Label"
  247.21                  )
  247.22              ); // NOI18N
  247.23              jLabel2.setDisplayedMnemonic(
  247.24 @@ -253,7 +253,7 @@
  247.25              ); // NOI18N
  247.26              jLabel4.setText(
  247.27                  NbBundle.getMessage(
  247.28 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_CreatedFolder_Label"
  247.29 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_CreatedFolder_Label"
  247.30                  )
  247.31              ); // NOI18N
  247.32              jLabel4.setDisplayedMnemonic(
  247.33 @@ -264,17 +264,17 @@
  247.34          } else {
  247.35              jLabel3.setText(
  247.36                  NbBundle.getMessage(
  247.37 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_FileName_Label"
  247.38 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_FileName_Label"
  247.39                  )
  247.40              ); // NOI18N
  247.41              jLabel2.setText(
  247.42                  NbBundle.getMessage(
  247.43 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_Folder_Label"
  247.44 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_Folder_Label"
  247.45                  )
  247.46              ); // NOI18N
  247.47              jLabel4.setText(
  247.48                  NbBundle.getMessage(
  247.49 -                    SimpleTargetChooserPanelGUI.class, "LBL_TargetChooser_CreatedFile_Label"
  247.50 +                    SimpleTargetChooserPanelGUI.class, "LABEL_TargetChooser_CreatedFile_Label"
  247.51                  )
  247.52              ); // NOI18N
  247.53              jLabel3.setDisplayedMnemonic(
  247.54 @@ -415,7 +415,7 @@
  247.55                  "MNE_TargetChooser_FileName_Label").charAt(0));
  247.56          this.jLabel3.setLabelFor(this.documentNameTextField);
  247.57          this.jLabel3.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.58 -                "LBL_TargetChooser_FileName_Label"));
  247.59 +                "LABEL_TargetChooser_FileName_Label"));
  247.60          gridBagConstraints = new java.awt.GridBagConstraints();
  247.61          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  247.62          this.jPanel1.add(this.jLabel3, gridBagConstraints);
  247.63 @@ -439,7 +439,7 @@
  247.64          this.jLabel1.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.65                  "MNE_TargetChooser_Project_Label").charAt(0));
  247.66          this.jLabel1.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.67 -                "LBL_TargetChooser_Project_Label"));
  247.68 +                "LABEL_TargetChooser_Project_Label"));
  247.69          this.jLabel1.setLabelFor(this.projectTextField);
  247.70          gridBagConstraints = new java.awt.GridBagConstraints();
  247.71          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  247.72 @@ -459,7 +459,7 @@
  247.73                  "MNE_TargetChooser_Location_Label").charAt(0));
  247.74          this.locationLabel.setLabelFor(this.locationComboBox);
  247.75          this.locationLabel.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.76 -                "LBL_TargetChooser_Location_Label"));
  247.77 +                "LABEL_TargetChooser_Location_Label"));
  247.78          gridBagConstraints = new java.awt.GridBagConstraints();
  247.79          gridBagConstraints.gridy = 2;
  247.80          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
  247.81 @@ -479,7 +479,7 @@
  247.82                  "MNE_TargetChooser_ParentFolder_Label").charAt(0));
  247.83          this.jLabel2.setLabelFor(this.folderTextField);
  247.84          this.jLabel2.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.85 -                "LBL_TargetChooser_Folder_Label"));
  247.86 +                "LABEL_TargetChooser_Folder_Label"));
  247.87          gridBagConstraints = new java.awt.GridBagConstraints();
  247.88          gridBagConstraints.gridx = 0;
  247.89          gridBagConstraints.gridy = 3;
  247.90 @@ -499,7 +499,7 @@
  247.91          this.browseButton.setMnemonic(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.92                  "MNE_TargetChooser_Browse_Button").charAt(0));
  247.93          this.browseButton.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
  247.94 -                "LBL_TargetChooser_Browse_Button"));
  247.95 +                "LABEL_TargetChooser_Browse_Button"));
  247.96          gridBagConstraints = new java.awt.GridBagConstraints();
  247.97          gridBagConstraints.gridy = 3;
  247.98          gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
  247.99 @@ -511,7 +511,7 @@
 247.100          this.jLabel4.setDisplayedMnemonic(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
 247.101                  "MNE_TargetChooser_CreatedFile_Label").charAt(0));
 247.102          this.jLabel4.setText(org.openide.util.NbBundle.getMessage(SimpleTargetChooserPanelGUI.class,
 247.103 -                "LBL_TargetChooser_CreatedFile_Label"));
 247.104 +                "LABEL_TargetChooser_CreatedFile_Label"));
 247.105          this.jLabel4.setLabelFor(this.fileTextField);
 247.106          gridBagConstraints = new java.awt.GridBagConstraints();
 247.107          gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
   248.1 --- a/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/UpdateColumnPanel.java	Thu Apr 17 10:51:04 2008 +0200
   248.2 +++ b/sql.wizard/src/org/netbeans/modules/jdbcwizard/wizards/UpdateColumnPanel.java	Thu Apr 17 15:50:14 2008 +0200
   248.3 @@ -490,9 +490,7 @@
   248.4          // set checkbox column size
   248.5          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
   248.6          column.setResizable(true);
   248.7 -        column.setMinWidth(40);
   248.8          column.setPreferredWidth(80);
   248.9 -        column.setMaxWidth(120);
  248.10      }
  248.11  
  248.12      public void addColumnTable(final List testList) {
  248.13 @@ -506,9 +504,7 @@
  248.14          // set checkbox column size
  248.15          final TableColumn column = this.metaDataTColumn.getColumnModel().getColumn(0);
  248.16          column.setResizable(true);
  248.17 -        column.setMinWidth(40);
  248.18          column.setPreferredWidth(80);
  248.19 -        column.setMaxWidth(120);
  248.20          this.tableScroll = new JScrollPane(this.metaDataTColumn);
  248.21          final javax.swing.border.Border inside = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(3, 3, 3,
  248.22                  3), BorderFactory.createLineBorder(Color.GRAY));
   249.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/ValidateXSLSupport.java	Thu Apr 17 10:51:04 2008 +0200
   249.2 +++ b/xslt.core/src/org/netbeans/modules/xslt/core/ValidateXSLSupport.java	Thu Apr 17 15:50:14 2008 +0200
   249.3 @@ -25,7 +25,6 @@
   249.4  import org.netbeans.api.xml.cookies.*;
   249.5  import org.netbeans.spi.xml.cookies.*;
   249.6  import org.openide.util.NbBundle;
   249.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   249.8  
   249.9  /**
  249.10   * @author Vladimir Yaroslavskiy
   250.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataEditorSupport.java	Thu Apr 17 10:51:04 2008 +0200
   250.2 +++ b/xslt.core/src/org/netbeans/modules/xslt/core/XSLTDataEditorSupport.java	Thu Apr 17 15:50:14 2008 +0200
   250.3 @@ -73,7 +73,6 @@
   250.4  import org.openide.util.UserCancelException;
   250.5  import org.netbeans.modules.xml.xam.ComponentEvent;
   250.6  import org.netbeans.modules.xml.xam.ComponentListener;
   250.7 -import static org.netbeans.modules.soa.ui.util.UI.*;
   250.8  
   250.9  /**
  250.10   * @author Vitaly Bychkov
   251.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/context/MapperContextImpl.java	Thu Apr 17 10:51:04 2008 +0200
   251.2 +++ b/xslt.core/src/org/netbeans/modules/xslt/core/context/MapperContextImpl.java	Thu Apr 17 15:50:14 2008 +0200
   251.3 @@ -49,9 +49,9 @@
   251.4  import org.openide.filesystems.FileObject;
   251.5  import org.openide.filesystems.FileRenameEvent;
   251.6  import org.openide.util.RequestProcessor;
   251.7 +import org.netbeans.modules.soa.ui.SoaUtil;
   251.8  
   251.9  /**
  251.10 - *
  251.11   * @author Vitaly Bychkov
  251.12   * @version 1.0
  251.13   */
  251.14 @@ -63,14 +63,12 @@
  251.15      private Transform myTransformContextComponent;
  251.16      private XslModel myXslModel;
  251.17      private AXIComponent mySourceComponent;
  251.18 -//    private SchemaModel mySourceSchemaModel;
  251.19      private AXIModel mySourceAxiModel;
  251.20      
  251.21      private WSDLReference<Part> mySourcePart;
  251.22      private WSDLModel mySourceModel;
  251.23  
  251.24      private AXIComponent myTargetComponent;
  251.25 -//    private SchemaModel myTargetSchemaModel;
  251.26      private AXIModel myTargetAxiModel;
  251.27      
  251.28      private WSDLReference<Part> myTargetPart;
  251.29 @@ -129,8 +127,8 @@
  251.30          myTargetPart = getTargetPart(myTransformContextComponent);
  251.31          myTargetModel = getWsdlModel(myTargetPart);
  251.32  
  251.33 -        myTMapFo = org.netbeans.modules.xslt.core.util.Util.getFileObjectByModel(myTMapModel);
  251.34 -        myXslFo = myXslModel == null ? null : org.netbeans.modules.xslt.core.util.Util.getFileObjectByModel(myXslModel);
  251.35 +        myTMapFo = SoaUtil.getFileObjectByModel(myTMapModel);
  251.36 +        myXslFo = myXslModel == null ? null : SoaUtil.getFileObjectByModel(myXslModel);
  251.37      }
  251.38  
  251.39      private void init(Transform transform, XslModel xslModel, AXIComponent sourceComponent, AXIComponent targetComponent) {
  251.40 @@ -226,7 +224,7 @@
  251.41                  myTMapFo.removeFileChangeListener(myFileChangeListener);
  251.42              }
  251.43  
  251.44 -            myTMapFo = org.netbeans.modules.xslt.core.util.Util.getFileObjectByModel(myTMapModel);
  251.45 +            myTMapFo = SoaUtil.getFileObjectByModel(myTMapModel);
  251.46              if (myTMapFo != null) {
  251.47                  myTMapFo.addFileChangeListener(myFileChangeListener);
  251.48              }
  251.49 @@ -249,7 +247,7 @@
  251.50                  myXslFo.removeFileChangeListener(myFileChangeListener);
  251.51              }
  251.52  
  251.53 -            myXslFo = myXslModel == null ? null : org.netbeans.modules.xslt.core.util.Util.getFileObjectByModel(myXslModel);
  251.54 +            myXslFo = myXslModel == null ? null : SoaUtil.getFileObjectByModel(myXslModel);
  251.55              if (myXslFo != null) {
  251.56                  myXslFo.addFileChangeListener(myFileChangeListener);
  251.57              }
  251.58 @@ -769,8 +767,6 @@
  251.59                  result = validator.validate(typeOut, "target"); // NOI18N
  251.60              }
  251.61          }
  251.62 -        
  251.63 -            
  251.64          return result;
  251.65      }
  251.66  }
   252.1 --- a/xslt.core/src/org/netbeans/modules/xslt/core/util/Util.java	Thu Apr 17 10:51:04 2008 +0200
   252.2 +++ b/xslt.core/src/org/netbeans/modules/xslt/core/util/Util.java	Thu Apr 17 15:50:14 2008 +0200
   252.3 @@ -41,17 +41,4 @@
   252.4          
   252.5          return model;
   252.6      }
   252.7 -
   252.8 -    public static FileObject getFileObjectByModel(Model model){
   252.9 -        if (model != null){
  252.10 -            ModelSource src = model.getModelSource();
  252.11 -            if (src != null){
  252.12 -                Lookup lookup = src.getLookup();
  252.13 -                if (lookup != null){
  252.14 -                    return lookup.lookup(FileObject.class);
  252.15 -                }
  252.16 -            }
  252.17 -        }
  252.18 -        return null;
  252.19 -    }
  252.20  }
   253.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/AttributeDeclarationNode.java	Thu Apr 17 10:51:04 2008 +0200
   253.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/AttributeDeclarationNode.java	Thu Apr 17 15:50:14 2008 +0200
   253.3 @@ -23,7 +23,7 @@
   253.4  import java.util.List;
   253.5  import javax.swing.Action;
   253.6  import javax.swing.JPopupMenu;
   253.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   253.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   253.9  import org.netbeans.modules.soa.ui.TooltipTextProvider;
  253.10  import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
  253.11  import org.netbeans.modules.soa.ui.axinodes.NodeType;
  253.12 @@ -131,8 +131,8 @@
  253.13              return getName();
  253.14          } else {
  253.15              String name = getName();
  253.16 -            return SoaUiUtil.getFormattedHtmlString(true,
  253.17 -                    new SoaUiUtil.TextChunk(name, SoaUiUtil.MISTAKE_RED));
  253.18 +            return SoaUtil.getFormattedHtmlString(true,
  253.19 +                    new SoaUtil.TextChunk(name, SoaUtil.MISTAKE_RED));
  253.20          }
  253.21      }
  253.22      
  253.23 @@ -165,8 +165,8 @@
  253.24          } else {
  253.25              Attribute myself = (Attribute) getDataObject();
  253.26              String name = myself.getName().toString();
  253.27 -            return SoaUiUtil.getFormattedHtmlString(true,
  253.28 -                    new SoaUiUtil.TextChunk(name, SoaUiUtil.MISTAKE_RED));
  253.29 +            return SoaUtil.getFormattedHtmlString(true,
  253.30 +                    new SoaUtil.TextChunk(name, SoaUtil.MISTAKE_RED));
  253.31          }
  253.32      }
  253.33      
  253.34 @@ -177,5 +177,4 @@
  253.35          //
  253.36          return rootMenu;
  253.37      }
  253.38 -    
  253.39  }
   254.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/ElementDeclarationNode.java	Thu Apr 17 10:51:04 2008 +0200
   254.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/ElementDeclarationNode.java	Thu Apr 17 15:50:14 2008 +0200
   254.3 @@ -26,7 +26,7 @@
   254.4  import javax.swing.JMenu;
   254.5  import javax.swing.JPopupMenu;
   254.6  import javax.swing.JSeparator;
   254.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   254.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   254.9  import org.netbeans.modules.soa.ui.TooltipTextProvider;
  254.10  import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
  254.11  import org.netbeans.modules.soa.ui.axinodes.NodeType;
  254.12 @@ -161,7 +161,7 @@
  254.13          } else if (axiComponent instanceof org.netbeans.modules.xml.axi.Element) {
  254.14              return getName();
  254.15          } else {
  254.16 -            return SoaUiUtil.getFormattedHtmlString(true, new SoaUiUtil.TextChunk(getName(), SoaUiUtil.MISTAKE_RED));
  254.17 +            return SoaUtil.getFormattedHtmlString(true, new SoaUtil.TextChunk(getName(), SoaUtil.MISTAKE_RED));
  254.18          }
  254.19      }
  254.20  
  254.21 @@ -170,7 +170,7 @@
  254.22          if (axiComponent instanceof org.netbeans.modules.xml.axi.Element) {
  254.23              return AxiomUtils.getElementTooltip((org.netbeans.modules.xml.axi.Element) axiComponent);
  254.24          } else {
  254.25 -            return SoaUiUtil.getFormattedHtmlString(true, new SoaUiUtil.TextChunk(toString(), SoaUiUtil.MISTAKE_RED));
  254.26 +            return SoaUtil.getFormattedHtmlString(true, new SoaUtil.TextChunk(toString(), SoaUtil.MISTAKE_RED));
  254.27          }
  254.28      }
  254.29  
   255.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/RuleNode.java	Thu Apr 17 10:51:04 2008 +0200
   255.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/RuleNode.java	Thu Apr 17 15:50:14 2008 +0200
   255.3 @@ -25,7 +25,7 @@
   255.4  import javax.swing.JMenu;
   255.5  import javax.swing.JPopupMenu;
   255.6  import javax.swing.JSeparator;
   255.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   255.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   255.9  import org.netbeans.modules.xml.axi.AXIComponent;
  255.10  import org.netbeans.modules.xslt.mapper.model.nodes.NodeFactory;
  255.11  import org.netbeans.modules.xslt.mapper.model.nodes.TreeNode;
  255.12 @@ -92,8 +92,8 @@
  255.13      
  255.14      public String getName() {
  255.15          if (getType() == null) {
  255.16 -            return SoaUiUtil.getFormattedHtmlString(true,
  255.17 -                    new SoaUiUtil.TextChunk(toString(), SoaUiUtil.MISTAKE_RED));
  255.18 +            return SoaUtil.getFormattedHtmlString(true,
  255.19 +                    new SoaUtil.TextChunk(toString(), SoaUtil.MISTAKE_RED));
  255.20          } else {
  255.21              return toString();
  255.22          }
   256.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/SchemaNode.java	Thu Apr 17 10:51:04 2008 +0200
   256.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/model/targettree/SchemaNode.java	Thu Apr 17 15:50:14 2008 +0200
   256.3 @@ -26,7 +26,7 @@
   256.4  import javax.swing.JMenu;
   256.5  import javax.swing.JPopupMenu;
   256.6  import javax.swing.JSeparator;
   256.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   256.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   256.9  import org.netbeans.modules.soa.ui.TooltipTextProvider;
  256.10  import org.netbeans.modules.soa.ui.axinodes.AxiomUtils;
  256.11  import org.netbeans.modules.soa.ui.axinodes.NodeType;
  256.12 @@ -145,8 +145,8 @@
  256.13          String result = getName();
  256.14          //
  256.15          if (!selected && !isSourceViewNode()) {
  256.16 -            result = SoaUiUtil.getFormattedHtmlString(true,
  256.17 -                    new SoaUiUtil.TextChunk(result, SoaUiUtil.INACTIVE_BLUE));
  256.18 +            result = SoaUtil.getFormattedHtmlString(true,
  256.19 +                    new SoaUtil.TextChunk(result, SoaUtil.INACTIVE_BLUE));
  256.20          }
  256.21          //
  256.22          return result;
   257.1 --- a/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/ExpressionEditor.java	Thu Apr 17 10:51:04 2008 +0200
   257.2 +++ b/xslt.mapper/src/org/netbeans/modules/xslt/mapper/xpatheditor/ExpressionEditor.java	Thu Apr 17 15:50:14 2008 +0200
   257.3 @@ -27,7 +27,7 @@
   257.4  import javax.swing.tree.TreePath;
   257.5  import org.netbeans.modules.soa.mapper.common.basicmapper.IBasicMapper;
   257.6  import org.netbeans.modules.soa.ui.ExtendedLookup;
   257.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   257.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   257.9  import org.netbeans.modules.soa.ui.axinodes.AxiomChildren;
  257.10  import org.netbeans.modules.soa.ui.axinodes.AxiomNode;
  257.11  import org.netbeans.modules.soa.ui.UserNotification;
  257.12 @@ -172,7 +172,7 @@
  257.13              }
  257.14          });
  257.15          
  257.16 -        SoaUiUtil.activateInlineMnemonics(this);
  257.17 +        SoaUtil.activateInlineMnemonics(this);
  257.18      }
  257.19      
  257.20      public boolean initControls() {
   258.1 --- a/xslt.project/nbproject/project.xml	Thu Apr 17 10:51:04 2008 +0200
   258.2 +++ b/xslt.project/nbproject/project.xml	Thu Apr 17 15:50:14 2008 +0200
   258.3 @@ -289,6 +289,15 @@
   258.4                          <specification-version>1.1</specification-version>
   258.5                      </run-dependency>
   258.6                  </dependency>
   258.7 +                <dependency>
   258.8 +                    <code-name-base>org.netbeans.modules.soa.validation</code-name-base>
   258.9 +                    <build-prerequisite/>
  258.10 +                    <compile-dependency/>
  258.11 +                    <run-dependency>
  258.12 +                        <release-version>1</release-version>
  258.13 +                        <specification-version>1.1</specification-version>
  258.14 +                    </run-dependency>
  258.15 +                </dependency>
  258.16              </module-dependencies>
  258.17              <friend-packages>
  258.18                  <friend>org.netbeans.modules.xslt.core</friend>
   259.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/NewXsltproProjectWizardIterator.java	Thu Apr 17 10:51:04 2008 +0200
   259.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/NewXsltproProjectWizardIterator.java	Thu Apr 17 15:50:14 2008 +0200
   259.3 @@ -41,7 +41,7 @@
   259.4  import org.openide.filesystems.Repository;
   259.5  import static org.netbeans.modules.xslt.project.XsltproConstants.*;
   259.6  import org.openide.util.NbBundle;
   259.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   259.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   259.9  import org.openide.loaders.DataObject;
  259.10  
  259.11  /**
  259.12 @@ -106,7 +106,7 @@
  259.13              String projectNamespace = "http://enterprise.netbeans.org/transformmap/"+ProjectUtils.getInformation(p).getName(); // NOI18N
  259.14              Util.initialiseNamespace(tMapFo, projectNamespace);
  259.15              
  259.16 -            SoaUiUtil.fixEncoding(DataObject.find(tMapFo), srcFo);
  259.17 +            SoaUtil.fixEncoding(DataObject.find(tMapFo), srcFo);
  259.18          }
  259.19      }
  259.20      
   260.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Bundle.properties	Thu Apr 17 10:51:04 2008 +0200
   260.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Bundle.properties	Thu Apr 17 15:50:14 2008 +0200
   260.3 @@ -11,9 +11,9 @@
   260.4  # http://www.netbeans.org/cddl-gplv2.html
   260.5  # or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   260.6  # specific language governing permissions and limitations under the
   260.7 -# License.  When distributing the software, include this License Header
   260.8 +# License. When distributing the software, include this License Header
   260.9  # Notice in each file and include the License file at
  260.10 -# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  260.11 +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  260.12  # particular file as subject to the "Classpath" exception as provided
  260.13  # by Sun in the GPL Version 2 section of the License file that
  260.14  # accompanied this code. If applicable, add the following below the
  260.15 @@ -24,7 +24,7 @@
  260.16  # Contributor(s):
  260.17  #
  260.18  # The Original Software is NetBeans. The Initial Developer of the Original
  260.19 -# Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  260.20 +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  260.21  # Microsystems, Inc. All Rights Reserved.
  260.22  #
  260.23  # If you wish your version of this file to be governed by only the CDDL
   261.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/FileDialog.java	Thu Apr 17 10:51:04 2008 +0200
   261.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/FileDialog.java	Thu Apr 17 15:50:14 2008 +0200
   261.3 @@ -11,9 +11,9 @@
   261.4   * http://www.netbeans.org/cddl-gplv2.html
   261.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   261.6   * specific language governing permissions and limitations under the
   261.7 - * License.  When distributing the software, include this License Header
   261.8 + * License. When distributing the software, include this License Header
   261.9   * Notice in each file and include the License file at
  261.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  261.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  261.12   * particular file as subject to the "Classpath" exception as provided
  261.13   * by Sun in the GPL Version 2 section of the License file that
  261.14   * accompanied this code. If applicable, add the following below the
  261.15 @@ -24,7 +24,7 @@
  261.16   * Contributor(s):
  261.17   *
  261.18   * The Original Software is NetBeans. The Initial Developer of the Original
  261.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  261.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  261.21   * Microsystems, Inc. All Rights Reserved.
  261.22   *
  261.23   * If you wish your version of this file to be governed by only the CDDL
   262.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Iterator.java	Thu Apr 17 10:51:04 2008 +0200
   262.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Iterator.java	Thu Apr 17 15:50:14 2008 +0200
   262.3 @@ -11,9 +11,9 @@
   262.4   * http://www.netbeans.org/cddl-gplv2.html
   262.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   262.6   * specific language governing permissions and limitations under the
   262.7 - * License.  When distributing the software, include this License Header
   262.8 + * License. When distributing the software, include this License Header
   262.9   * Notice in each file and include the License file at
  262.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  262.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  262.12   * particular file as subject to the "Classpath" exception as provided
  262.13   * by Sun in the GPL Version 2 section of the License file that
  262.14   * accompanied this code. If applicable, add the following below the
  262.15 @@ -24,7 +24,7 @@
  262.16   * Contributor(s):
  262.17   *
  262.18   * The Original Software is NetBeans. The Initial Developer of the Original
  262.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  262.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  262.21   * Microsystems, Inc. All Rights Reserved.
  262.22   *
  262.23   * If you wish your version of this file to be governed by only the CDDL
  262.24 @@ -78,11 +78,11 @@
  262.25  import org.netbeans.modules.xslt.tmap.model.api.WSDLReference;
  262.26  import org.netbeans.modules.xslt.tmap.model.impl.VariableReferenceImpl;
  262.27  import org.netbeans.modules.xml.catalogsupport.util.ProjectUtilities;
  262.28 -import org.netbeans.modules.soa.ui.SoaUiUtil;
  262.29 +import org.netbeans.modules.soa.ui.SoaUtil;
  262.30  import org.netbeans.modules.xml.wsdl.model.PortType;
  262.31  import org.netbeans.modules.xslt.tmap.model.api.events.VetoException;
  262.32  import org.netbeans.modules.xslt.tmap.model.spi.NameGenerator;
  262.33 -import static org.netbeans.modules.soa.ui.util.UI.*;
  262.34 +import static org.netbeans.modules.soa.ui.UI.*;
  262.35  
  262.36  /**
  262.37   * @author Vladimir Yaroslavskiy
  262.38 @@ -298,7 +298,7 @@
  262.39                  if (!isCreatedDir) {
  262.40                      createdFos.add(xslFo);
  262.41                  }
  262.42 -                SoaUiUtil.fixEncoding(DataObject.find(xslFo), dirFo);
  262.43 +                SoaUtil.fixEncoding(DataObject.find(xslFo), dirFo);
  262.44              }
  262.45          }
  262.46          return xslFo;
   263.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Panel.java	Thu Apr 17 10:51:04 2008 +0200
   263.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/Panel.java	Thu Apr 17 15:50:14 2008 +0200
   263.3 @@ -11,9 +11,9 @@
   263.4   * http://www.netbeans.org/cddl-gplv2.html
   263.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   263.6   * specific language governing permissions and limitations under the
   263.7 - * License.  When distributing the software, include this License Header
   263.8 + * License. When distributing the software, include this License Header
   263.9   * Notice in each file and include the License file at
  263.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  263.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  263.12   * particular file as subject to the "Classpath" exception as provided
  263.13   * by Sun in the GPL Version 2 section of the License file that
  263.14   * accompanied this code. If applicable, add the following below the
  263.15 @@ -24,7 +24,7 @@
  263.16   * Contributor(s):
  263.17   *
  263.18   * The Original Software is NetBeans. The Initial Developer of the Original
  263.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  263.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  263.21   * Microsystems, Inc. All Rights Reserved.
  263.22   *
  263.23   * If you wish your version of this file to be governed by only the CDDL
  263.24 @@ -76,7 +76,7 @@
  263.25  import org.netbeans.modules.xslt.project.XsltproConstants;
  263.26  import org.netbeans.modules.xml.catalogsupport.util.ProjectUtilities;
  263.27  import org.netbeans.modules.xml.catalogsupport.util.ProjectWSDL;
  263.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  263.29 +import static org.netbeans.modules.soa.ui.UI.*;
  263.30  
  263.31  /**
  263.32   * @author Vladimir Yaroslavskiy
  263.33 @@ -178,15 +178,15 @@
  263.34    }
  263.35    
  263.36    protected final String i18n(String key) {
  263.37 -    return org.netbeans.modules.soa.ui.util.UI.i18n(Panel.class, key);
  263.38 +    return org.netbeans.modules.soa.ui.UI.i18n(Panel.class, key);
  263.39    }
  263.40  
  263.41    protected final String i18n(String key, String param) {
  263.42 -    return org.netbeans.modules.soa.ui.util.UI.i18n(Panel.class, key, param);
  263.43 +    return org.netbeans.modules.soa.ui.UI.i18n(Panel.class, key, param);
  263.44    }
  263.45  
  263.46    protected final String i18n(String key, String param1, String param2) {
  263.47 -    return org.netbeans.modules.soa.ui.util.UI.i18n(
  263.48 +    return org.netbeans.modules.soa.ui.UI.i18n(
  263.49        Panel.class, key, param1, param2);
  263.50    }
  263.51  
  263.52 @@ -417,32 +417,20 @@
  263.53  
  263.54    protected static final String EMPTY = ""; // NOI18N
  263.55  
  263.56 -  protected static final String NAME_TYPE =
  263.57 -    org.netbeans.modules.soa.ui.util.UI.i18n(Panel.class,
  263.58 -    "LBL_Service_Type"); // NOI18N
  263.59 -
  263.60 -  protected static final String NAME_WSDL =
  263.61 -    org.netbeans.modules.soa.ui.util.UI.i18n(Panel.class,
  263.62 -    "LBL_WSDL_File"); // NOI18N
  263.63 -
  263.64 -  protected static final String NAME_XSLT =
  263.65 -    org.netbeans.modules.soa.ui.util.UI.i18n(Panel.class,
  263.66 -    "LBL_XSLT_Configuration"); // NOI18N
  263.67 +  protected static final String NAME_TYPE = org.netbeans.modules.soa.ui.UI.i18n(Panel.class, "LBL_Service_Type"); // NOI18N
  263.68 +  protected static final String NAME_WSDL = org.netbeans.modules.soa.ui.UI.i18n(Panel.class, "LBL_WSDL_File"); // NOI18N
  263.69 +  protected static final String NAME_XSLT = org.netbeans.modules.soa.ui.UI.i18n(Panel.class, "LBL_XSLT_Configuration"); // NOI18N
  263.70  
  263.71    public static final String INPUT_FILE = "input.file"; // NOI18N
  263.72    public static final String INPUT_OPERATION = "input.operation"; // NOI18N
  263.73 -  public static final String INPUT_PORT_TYPE =
  263.74 -    "input.porttype"; // NOI18N
  263.75 +  public static final String INPUT_PORT_TYPE = "input.porttype"; // NOI18N
  263.76  
  263.77    public static final String OUTPUT_FILE = "output.file"; // NOI18N
  263.78    public static final String OUTPUT_OPERATION = "output.operation"; // NOI18N
  263.79 -  public static final String OUTPUT_PORT_TYPE =
  263.80 -    "output.porttype"; // NOI18N
  263.81 +  public static final String OUTPUT_PORT_TYPE = "output.porttype"; // NOI18N
  263.82  
  263.83    public static final String CHOICE = "choice"; // NOI18N
  263.84    public static final String CHOICE_REQUEST_REPLY = "choice.request.reply"; // NOI18N
  263.85 -  public static final String CHOICE_FILTER_ONE_WAY =
  263.86 -    "choice.filter.one.way"; // NOI18N
  263.87 -  public static final String CHOICE_FILTER_REQUEST_REPLY =
  263.88 -    "choice.filter.request.reply"; // NOI18N
  263.89 +  public static final String CHOICE_FILTER_ONE_WAY = "choice.filter.one.way"; // NOI18N
  263.90 +  public static final String CHOICE_FILTER_REQUEST_REPLY = "choice.filter.request.reply"; // NOI18N
  263.91  }
   264.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelOperation.java	Thu Apr 17 10:51:04 2008 +0200
   264.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelOperation.java	Thu Apr 17 15:50:14 2008 +0200
   264.3 @@ -11,9 +11,9 @@
   264.4   * http://www.netbeans.org/cddl-gplv2.html
   264.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   264.6   * specific language governing permissions and limitations under the
   264.7 - * License.  When distributing the software, include this License Header
   264.8 + * License. When distributing the software, include this License Header
   264.9   * Notice in each file and include the License file at
  264.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  264.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  264.12   * particular file as subject to the "Classpath" exception as provided
  264.13   * by Sun in the GPL Version 2 section of the License file that
  264.14   * accompanied this code. If applicable, add the following below the
  264.15 @@ -24,7 +24,7 @@
  264.16   * Contributor(s):
  264.17   *
  264.18   * The Original Software is NetBeans. The Initial Developer of the Original
  264.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  264.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  264.21   * Microsystems, Inc. All Rights Reserved.
  264.22   *
  264.23   * If you wish your version of this file to be governed by only the CDDL
  264.24 @@ -67,7 +67,7 @@
  264.25  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  264.26  import org.netbeans.modules.xml.wsdl.model.visitor.WSDLModelVisitor;
  264.27  import org.netbeans.modules.xml.wsdl.model.visitor.WSDLUtilities;
  264.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  264.29 +import static org.netbeans.modules.soa.ui.UI.*;
  264.30  
  264.31  /**
  264.32   * @author Vladimir Yaroslavskiy
   265.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelProxy.java	Thu Apr 17 10:51:04 2008 +0200
   265.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelProxy.java	Thu Apr 17 15:50:14 2008 +0200
   265.3 @@ -11,9 +11,9 @@
   265.4   * http://www.netbeans.org/cddl-gplv2.html
   265.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   265.6   * specific language governing permissions and limitations under the
   265.7 - * License.  When distributing the software, include this License Header
   265.8 + * License. When distributing the software, include this License Header
   265.9   * Notice in each file and include the License file at
  265.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  265.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  265.12   * particular file as subject to the "Classpath" exception as provided
  265.13   * by Sun in the GPL Version 2 section of the License file that
  265.14   * accompanied this code. If applicable, add the following below the
  265.15 @@ -24,7 +24,7 @@
  265.16   * Contributor(s):
  265.17   *
  265.18   * The Original Software is NetBeans. The Initial Developer of the Original
  265.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  265.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  265.21   * Microsystems, Inc. All Rights Reserved.
  265.22   *
  265.23   * If you wish your version of this file to be governed by only the CDDL
  265.24 @@ -60,7 +60,7 @@
  265.25  import org.netbeans.modules.xml.wsdl.model.Operation;
  265.26  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  265.27  import org.openide.filesystems.FileUtil;
  265.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  265.29 +import static org.netbeans.modules.soa.ui.UI.*;
  265.30  
  265.31  /**
  265.32   * @author Vladimir Yaroslavskiy
   266.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelService.java	Thu Apr 17 10:51:04 2008 +0200
   266.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelService.java	Thu Apr 17 15:50:14 2008 +0200
   266.3 @@ -11,9 +11,9 @@
   266.4   * http://www.netbeans.org/cddl-gplv2.html
   266.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   266.6   * specific language governing permissions and limitations under the
   266.7 - * License.  When distributing the software, include this License Header
   266.8 + * License. When distributing the software, include this License Header
   266.9   * Notice in each file and include the License file at
  266.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  266.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  266.12   * particular file as subject to the "Classpath" exception as provided
  266.13   * by Sun in the GPL Version 2 section of the License file that
  266.14   * accompanied this code. If applicable, add the following below the
  266.15 @@ -24,7 +24,7 @@
  266.16   * Contributor(s):
  266.17   *
  266.18   * The Original Software is NetBeans. The Initial Developer of the Original
  266.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  266.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  266.21   * Microsystems, Inc. All Rights Reserved.
  266.22   *
  266.23   * If you wish your version of this file to be governed by only the CDDL
  266.24 @@ -47,7 +47,7 @@
  266.25  import org.openide.WizardDescriptor;
  266.26  import org.netbeans.api.project.Project;
  266.27  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  266.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  266.29 +import static org.netbeans.modules.soa.ui.UI.*;
  266.30  
  266.31  /**
  266.32   * @author Vladimir Yaroslavskiy
   267.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelStartup.java	Thu Apr 17 10:51:04 2008 +0200
   267.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelStartup.java	Thu Apr 17 15:50:14 2008 +0200
   267.3 @@ -11,9 +11,9 @@
   267.4   * http://www.netbeans.org/cddl-gplv2.html
   267.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   267.6   * specific language governing permissions and limitations under the
   267.7 - * License.  When distributing the software, include this License Header
   267.8 + * License. When distributing the software, include this License Header
   267.9   * Notice in each file and include the License file at
  267.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  267.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  267.12   * particular file as subject to the "Classpath" exception as provided
  267.13   * by Sun in the GPL Version 2 section of the License file that
  267.14   * accompanied this code. If applicable, add the following below the
  267.15 @@ -24,7 +24,7 @@
  267.16   * Contributor(s):
  267.17   *
  267.18   * The Original Software is NetBeans. The Initial Developer of the Original
  267.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  267.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  267.21   * Microsystems, Inc. All Rights Reserved.
  267.22   *
  267.23   * If you wish your version of this file to be governed by only the CDDL
  267.24 @@ -50,7 +50,7 @@
  267.25  
  267.26  import javax.swing.JTextArea;
  267.27  import org.netbeans.api.project.Project;
  267.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  267.29 +import static org.netbeans.modules.soa.ui.UI.*;
  267.30  
  267.31  /**
  267.32   * @author Vladimir Yaroslavskiy
   268.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelUtil.java	Thu Apr 17 10:51:04 2008 +0200
   268.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelUtil.java	Thu Apr 17 15:50:14 2008 +0200
   268.3 @@ -11,9 +11,9 @@
   268.4   * http://www.netbeans.org/cddl-gplv2.html
   268.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   268.6   * specific language governing permissions and limitations under the
   268.7 - * License.  When distributing the software, include this License Header
   268.8 + * License. When distributing the software, include this License Header
   268.9   * Notice in each file and include the License file at
  268.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  268.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  268.12   * particular file as subject to the "Classpath" exception as provided
  268.13   * by Sun in the GPL Version 2 section of the License file that
  268.14   * accompanied this code. If applicable, add the following below the
  268.15 @@ -24,7 +24,7 @@
  268.16   * Contributor(s):
  268.17   *
  268.18   * The Original Software is NetBeans. The Initial Developer of the Original
  268.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  268.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  268.21   * Microsystems, Inc. All Rights Reserved.
  268.22   *
  268.23   * If you wish your version of this file to be governed by only the CDDL
  268.24 @@ -42,22 +42,16 @@
  268.25  
  268.26  import java.io.File;
  268.27  import java.io.IOException;
  268.28 -
  268.29  import java.util.StringTokenizer;
  268.30  
  268.31 -import org.netbeans.modules.xml.retriever.catalog.Utilities;
  268.32 -import org.openide.filesystems.FileObject;
  268.33 -
  268.34 -
  268.35 -import org.netbeans.modules.xml.xam.ModelSource;
  268.36 -
  268.37 -
  268.38 -import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  268.39 -import org.netbeans.modules.xml.wsdl.model.WSDLModelFactory;
  268.40  import org.openide.ErrorManager;
  268.41  import org.openide.filesystems.FileUtil;
  268.42  import org.openide.filesystems.Repository;
  268.43 -
  268.44 +import org.openide.filesystems.FileObject;
  268.45 +import org.netbeans.modules.xml.retriever.catalog.Utilities;
  268.46 +import org.netbeans.modules.xml.xam.ModelSource;
  268.47 +import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  268.48 +import org.netbeans.modules.xml.wsdl.model.WSDLModelFactory;
  268.49  
  268.50  /**
  268.51   * @author Vladimir Yaroslavskiy
  268.52 @@ -153,11 +147,11 @@
  268.53      }
  268.54    }
  268.55  
  268.56 -    public static WSDLModel getWSDLModel(FileObject file) {
  268.57 -        if (file == null) {
  268.58 -            return null;
  268.59 -        }
  268.60 -        ModelSource source = Utilities.getModelSource(file, file.canWrite());
  268.61 -        return WSDLModelFactory.getDefault().getModel(source);
  268.62 -    }
  268.63 +  public static WSDLModel getWSDLModel(FileObject file) {
  268.64 +      if (file == null) {
  268.65 +          return null;
  268.66 +      }
  268.67 +      ModelSource source = Utilities.getModelSource(file, file.canWrite());
  268.68 +      return WSDLModelFactory.getDefault().getModel(source);
  268.69 +  }
  268.70  }
   269.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDL.java	Thu Apr 17 10:51:04 2008 +0200
   269.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDL.java	Thu Apr 17 15:50:14 2008 +0200
   269.3 @@ -11,9 +11,9 @@
   269.4   * http://www.netbeans.org/cddl-gplv2.html
   269.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   269.6   * specific language governing permissions and limitations under the
   269.7 - * License.  When distributing the software, include this License Header
   269.8 + * License. When distributing the software, include this License Header
   269.9   * Notice in each file and include the License file at
  269.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  269.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  269.12   * particular file as subject to the "Classpath" exception as provided
  269.13   * by Sun in the GPL Version 2 section of the License file that
  269.14   * accompanied this code. If applicable, add the following below the
  269.15 @@ -24,7 +24,7 @@
  269.16   * Contributor(s):
  269.17   *
  269.18   * The Original Software is NetBeans. The Initial Developer of the Original
  269.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  269.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  269.21   * Microsystems, Inc. All Rights Reserved.
  269.22   *
  269.23   * If you wish your version of this file to be governed by only the CDDL
  269.24 @@ -49,7 +49,7 @@
  269.25  
  269.26  import org.netbeans.api.project.Project;
  269.27  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  269.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  269.29 +import static org.netbeans.modules.soa.ui.UI.*;
  269.30  
  269.31  /**
  269.32   * @author Vladimir Yaroslavskiy
   270.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDLs.java	Thu Apr 17 10:51:04 2008 +0200
   270.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWSDLs.java	Thu Apr 17 15:50:14 2008 +0200
   270.3 @@ -11,9 +11,9 @@
   270.4   * http://www.netbeans.org/cddl-gplv2.html
   270.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   270.6   * specific language governing permissions and limitations under the
   270.7 - * License.  When distributing the software, include this License Header
   270.8 + * License. When distributing the software, include this License Header
   270.9   * Notice in each file and include the License file at
  270.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  270.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  270.12   * particular file as subject to the "Classpath" exception as provided
  270.13   * by Sun in the GPL Version 2 section of the License file that
  270.14   * accompanied this code. If applicable, add the following below the
  270.15 @@ -24,7 +24,7 @@
  270.16   * Contributor(s):
  270.17   *
  270.18   * The Original Software is NetBeans. The Initial Developer of the Original
  270.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  270.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  270.21   * Microsystems, Inc. All Rights Reserved.
  270.22   *
  270.23   * If you wish your version of this file to be governed by only the CDDL
  270.24 @@ -47,7 +47,7 @@
  270.25  
  270.26  import org.netbeans.api.project.Project;
  270.27  import org.netbeans.modules.xml.wsdl.model.WSDLModel;
  270.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  270.29 +import static org.netbeans.modules.soa.ui.UI.*;
  270.30  
  270.31  /**
  270.32   * @author Vladimir Yaroslavskiy
   271.1 --- a/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWebService.java	Thu Apr 17 10:51:04 2008 +0200
   271.2 +++ b/xslt.project/src/org/netbeans/modules/xslt/project/wizard/element/PanelWebService.java	Thu Apr 17 15:50:14 2008 +0200
   271.3 @@ -11,9 +11,9 @@
   271.4   * http://www.netbeans.org/cddl-gplv2.html
   271.5   * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   271.6   * specific language governing permissions and limitations under the
   271.7 - * License.  When distributing the software, include this License Header
   271.8 + * License. When distributing the software, include this License Header
   271.9   * Notice in each file and include the License file at
  271.10 - * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
  271.11 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
  271.12   * particular file as subject to the "Classpath" exception as provided
  271.13   * by Sun in the GPL Version 2 section of the License file that
  271.14   * accompanied this code. If applicable, add the following below the
  271.15 @@ -24,7 +24,7 @@
  271.16   * Contributor(s):
  271.17   *
  271.18   * The Original Software is NetBeans. The Initial Developer of the Original
  271.19 - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
  271.20 + * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  271.21   * Microsystems, Inc. All Rights Reserved.
  271.22   *
  271.23   * If you wish your version of this file to be governed by only the CDDL
  271.24 @@ -57,7 +57,7 @@
  271.25  import org.netbeans.api.project.Project;
  271.26  import org.netbeans.modules.xml.catalogsupport.util.ProjectUtilities;
  271.27  import org.netbeans.modules.xml.catalogsupport.util.ProjectWSDL;
  271.28 -import static org.netbeans.modules.soa.ui.util.UI.*;
  271.29 +import static org.netbeans.modules.soa.ui.UI.*;
  271.30  
  271.31  /**
  271.32   * @author Vladimir Yaroslavskiy
   272.1 --- a/xslt.tmap/nbproject/project.properties	Thu Apr 17 10:51:04 2008 +0200
   272.2 +++ b/xslt.tmap/nbproject/project.properties	Thu Apr 17 15:50:14 2008 +0200
   272.3 @@ -17,3 +17,4 @@
   272.4  # Microsystems, Inc. All Rights Reserved.
   272.5  
   272.6  javac.source=1.5
   272.7 +javac.compilerargs=-Xlint:unchecked
   273.1 --- a/xslt.tmap/src/org/netbeans/modules/xslt/tmap/nodes/properties/ResolverUtility.java	Thu Apr 17 10:51:04 2008 +0200
   273.2 +++ b/xslt.tmap/src/org/netbeans/modules/xslt/tmap/nodes/properties/ResolverUtility.java	Thu Apr 17 15:50:14 2008 +0200
   273.3 @@ -92,148 +92,7 @@
   273.4          String retValue = prefix + qValue.getLocalPart();
   273.5          return retValue;
   273.6      }
   273.7 -//    
   273.8 -//    public static String getDisplayName(Component comp) {
   273.9 -//        return getDisplayName(comp, null);
  273.10 -//    }
  273.11 -//    
  273.12 -//    public static String getDisplayName(Component comp, TMapComponent relativeTo) {
  273.13 -//        String targetNamespace = null;
  273.14 -//        String prefix = null;
  273.15 -//        String compName = null;
  273.16 -//        //
  273.17 -//        if (comp instanceof TMapComponent) {
  273.18 -//            targetNamespace = ((TMapComponent)comp).getModel().
  273.19 -//                    getTransformMap().getNamespaceContext().;
  273.20 -//            if (comp instanceof NamedElement) {
  273.21 -//                compName = ((NamedElement)comp).getName();
  273.22 -//            }
  273.23 -//        } else if (comp instanceof WSDLComponent) {
  273.24 -//            targetNamespace = ((WSDLComponent)comp).getModel().
  273.25 -//                    getDefinitions().getTargetNamespace();
  273.26 -//            if (comp instanceof Named) {
  273.27 -//                compName = ((Named)comp).getName();
  273.28 -//            }
  273.29 -//        } else if (comp instanceof SchemaComponent) {
  273.30 -//            targetNamespace = ((SchemaComponent)comp).getModel().
  273.31 -//                    getSchema().getTargetNamespace();
  273.32 -//            if (comp instanceof Named) {
  273.33 -//                compName = ((Named)comp).getName();
  273.34 -//            }
  273.35 -//        }
  273.36 -//        //
  273.37 -//        assert compName != null :
  273.38 -//            "Impossible to calculate the name for a component which hasn't a name!"; // NOI18N
  273.39 -//        //
  273.40 -//        if (targetNamespace != null && targetNamespace.length() > 0) {
  273.41 -//            if (relativeTo != null) {
  273.42 -//                NamespaceContext nc = relativeTo.getNamespaceContext();
  273.43 -//                prefix = nc.getPrefix(targetNamespace);
  273.44 -//            }
  273.45 -//            if (prefix == null || prefix.length() == 0) {
  273.46 -//                return targetNamespace + Constants.COLON + compName;
  273.47 -//            } else {
  273.48 -//                return prefix + Constants.COLON + compName;
  273.49 -//            }
  273.50 -//        } else {
  273.51 -//            return compName;
  273.52 -//        }
  273.53 -//    }
  273.54 -//    
  273.55 -//    /**
  273.56 -//     * Returns projectSource related to the given bpelModel which is in lookup
  273.57 -//     * Could return null
  273.58 -//     */ 
  273.59 -//    public static FileObject getProjectSource(Lookup lookup) {
  273.60 -//        BpelModel bpelModel = lookup.lookup(BpelModel.class);
  273.61 -//        if (bpelModel == null) {
  273.62 -//            return null;
  273.63 -//        }
  273.64 -//        FileObject bpelFo = Util.getFileObjectByModel(bpelModel);
  273.65 -//        if (bpelFo == null) {
  273.66 -//            return null;
  273.67 -//        }
  273.68 -//        Sources sources = safeGetSources(safeGetProject(bpelModel));
  273.69 -//        if (sources == null) {
  273.70 -//            return null;
  273.71 -//        }
  273.72 -//        
  273.73 -//        String bpelFoPath = bpelFo.getPath();
  273.74 -//        SourceGroup[] sourceGroupArr = sources.getSourceGroups(
  273.75 -//                ProjectConstants.SOURCES_TYPE_BPELPRO);
  273.76 -//        for (SourceGroup srcGroup : sourceGroupArr) {
  273.77 -//            String srcFolderName = srcGroup.getRootFolder().getPath();
  273.78 -//            //
  273.79 -//            if (bpelFoPath.startsWith(srcFolderName)) {
  273.80 -//                return srcGroup.getRootFolder();
  273.81 -//            }
  273.82 -//        }
  273.83 -//        return null;
  273.84 -//    }
  273.85 -//    
  273.86 -//    public static String encodeLocation(String location){
  273.87 -//        return location.replace(" ", "%20");
  273.88 -//    }
  273.89 -//    
  273.90 -//    public static String decodeLocation(String location){
  273.91 -//        return location.replace("%20", " ");
  273.92 -//    }
  273.93 -//    
  273.94 -//    /**
  273.95 -//     * Returns the FileObject which points to the folder where the specified
  273.96 -//     * BPEL Process is located.
  273.97 -//     *
  273.98 -//     * This method can return null;
  273.99 -//     */
 273.100 -//    public static FileObject getBpelProcessFolder(BpelModel bpelModel) {
 273.101 -//        if (bpelModel != null) {
 273.102 -//            ModelSource bpelMS = bpelModel.getModelSource();
 273.103 -//            if (bpelMS != null) {
 273.104 -//                Lookup bpelLookup = bpelMS.getLookup();
 273.105 -//                if (bpelLookup != null) {
 273.106 -//                    FileObject bpelFo = bpelLookup.lookup(FileObject.class);
 273.107 -//                    if (bpelFo != null) {
 273.108 -//                        FileObject bpelFolderFo = bpelFo.getParent();
 273.109 -//                        return bpelFolderFo;
 273.110 -//                    }
 273.111 -//                }
 273.112 -//            }
 273.113 -//        }
 273.114 -//        return null;
 273.115 -//    }
 273.116 -//    
 273.117 -//    /**
 273.118 -//     * Check if the specified model is imported to the current BPEL.
 273.119 -//     */
 273.120 -//    public static boolean isModelImported(Model model, Lookup lookup) {
 273.121 -//        BpelModel bpelModel = lookup.lookup(BpelModel.class);
 273.122 -//        return isModelImported(model, bpelModel);
 273.123 -//    }
 273.124 -//    
 273.125 -//    /**
 273.126 -//     * Check if the specified model is imported to the current BPEL.
 273.127 -//     */
 273.128 -//    public static boolean isModelImported(Model model, BpelModel bpelModel) {
 273.129 -//        if (model == SchemaModelFactory.getDefault().getPrimitiveTypesModel()) {
 273.130 -//            // the primitive types' model considered as imported implicitly.
 273.131 -//            return true;
 273.132 -//        }
 273.133 -//        
 273.134 -//        for (Import imp : bpelModel.getProcess().getImports()) {
 273.135 -//            if (model == ImportHelper.getWsdlModel(imp, false)) {
 273.136 -//                return true;
 273.137 -//            }
 273.138 -//            if (model == ImportHelper.getSchemaModel(imp, false)) {
 273.139 -//                return true;
 273.140 -//            }
 273.141 -//        }
 273.142 -//        
 273.143 -//        return false;
 273.144 -//    }
 273.145 -//    
 273.146 -    /**
 273.147 -     * Tries to resolve the reference and take it's name.
 273.148 -     */
 273.149 +
 273.150      public static String getNameByRef(Reference ref)  {
 273.151          if (ref == null) {
 273.152              return null;
 273.153 @@ -261,108 +120,4 @@
 273.154          //
 273.155          return result;
 273.156      }
 273.157 -//    
 273.158 -//    public static ModelSource getImportedModelSource(Import importObj) {
 273.159 -//        if (Import.SCHEMA_IMPORT_TYPE.equals(importObj.getImportType())) {
 273.160 -//            SchemaModel schemaModel = ImportHelper.getSchemaModel(importObj, false);
 273.161 -//            if (schemaModel != null) {
 273.162 -//                return schemaModel.getModelSource();
 273.163 -//            }
 273.164 -//        } else if (Import.WSDL_IMPORT_TYPE.equals(importObj.getImportType())) {
 273.165 -//            WSDLModel wsdlModel = ImportHelper.getWsdlModel(importObj, false);
 273.166 -//            if (wsdlModel != null) {
 273.167 -//                return wsdlModel.getModelSource();
 273.168 -//            }
 273.169 -//        }
 273.170 -//        
 273.171 -//        return null;
 273.172 -//    }
 273.173 -//    
 273.174 -//    public static FileObject getImportedFileObject(Import importObj) {
 273.175 -//        ModelSource modelSource = getImportedModelSource(importObj);
 273.176 -//        
 273.177 -//        if (modelSource != null) {
 273.178 -//            return modelSource.getLookup().lookup(FileObject.class);
 273.179 -//        } else {
 273.180 -//            return null;
 273.181 -//        }
 273.182 -//    }
 273.183 -//    
 273.184 -//    /* 
 273.185 -//     * Description is shown in e.g. TypeChooserPanel. It's either a path
 273.186 -//     * to the imported file or a message that a file doesn't exist.
 273.187 -//     */
 273.188 -//    public static String getImportDescription(Import importObj) {
 273.189 -//        FileObject fo = getImportedFileObject(importObj);
 273.190 -//        if (fo != null && fo.isValid()) {
 273.191 -//            return fo.getPath();
 273.192 -//        } else {
 273.193 -//            //No valid Model or ModelSource or FileObject found - return warning
 273.194 -//            String importInfo = importObj.getLocation();
 273.195 -//            if (importInfo == null || importInfo.length() == 0) {
 273.196 -//                importInfo = importObj.getNamespace();
 273.197 -//            }
 273.198 -//            return NbBundle.getMessage(FormBundle.class,
 273.199 -//                    "ERR_IMPORT_FILE_DOESNT_EXIST", // NOI18N
 273.200 -//                    ResolverUtility.decodeLocation(importInfo), "");
 273.201 -//        }
 273.202 -//    }
 273.203 -//    
 273.204 -//    /**
 273.205 -//     * Returns the project Sources for the specified bpel process.
 273.206 -//     * Use the following line to access the SourceGroup array.
 273.207 -//     *  SourceGroup[] sourceGroup =
 273.208 -//     *  sources.getSourceGroups(ProjectConstants.SOURCES_TYPE_BPELPRO);
 273.209 -//     */
 273.210 -//    public static Sources safeGetSources(Project project) {
 273.211 -//        if (project != null) {
 273.212 -//            return ProjectUtils.getSources(project);
 273.213 -//        } else {
 273.214 -//            return null;
 273.215 -//        }
 273.216 -//    }
 273.217 -//    
 273.218 -//    public static Project safeGetProject(BpelModel bpelModel) {
 273.219 -//        FileObject fo = Util.getFileObjectByModel(bpelModel);
 273.220 -//        if (fo != null && fo.isValid()) {
 273.221 -//            return FileOwnerQuery.getOwner(fo);
 273.222 -//        } else {
 273.223 -//            return null;
 273.224 -//        }
 273.225 -//    }
 273.226 -//    
 273.227 -//    /*
 273.228 -//     * Returns the relative path of a given FileObject in a given Project.
 273.229 -//     * Returns null if either of the parameters is null or given FileObject
 273.230 -//     * is not in the given Project.
 273.231 -//     */
 273.232 -//    public static String safeGetRelativePath(FileObject fo, Project project) {
 273.233 -//        if (fo == null || !fo.isValid() || project == null) {
 273.234 -//            return null;
 273.235 -//        }
 273.236 -//        
 273.237 -//        if (FileOwnerQuery.getOwner(fo) != project) {
 273.238 -//            return null;
 273.239 -//        }
 273.240 -//        
 273.241 -//        String targetFoPath = fo.getPath();
 273.242 -//        //
 273.243 -//        Sources sources = safeGetSources(project);
 273.244 -//        if (sources != null) {
 273.245 -//            SourceGroup[] sourceGroupArr = sources.getSourceGroups(
 273.246 -//                    ProjectConstants.SOURCES_TYPE_BPELPRO);
 273.247 -//            //
 273.248 -//            for (SourceGroup srcGroup : sourceGroupArr) {
 273.249 -//                String srcFolderName = srcGroup.getRootFolder().getPath();
 273.250 -//                //
 273.251 -//                if (targetFoPath.startsWith(srcFolderName)) {
 273.252 -//                    return targetFoPath.substring(srcFolderName.length());
 273.253 -//                }
 273.254 -//            }
 273.255 -//        }
 273.256 -//        //TODO:it's strange that we are here since we have already checked that
 273.257 -//        //our FileObject belongs to our Project, but still we couldn't calculate the
 273.258 -//        //relative path. Should we assert?
 273.259 -//        return null;
 273.260 -//    }
 273.261  }
   274.1 --- a/xslt.tmap/src/org/netbeans/modules/xslt/tmap/util/Util.java	Thu Apr 17 10:51:04 2008 +0200
   274.2 +++ b/xslt.tmap/src/org/netbeans/modules/xslt/tmap/util/Util.java	Thu Apr 17 15:50:14 2008 +0200
   274.3 @@ -75,7 +75,7 @@
   274.4  import org.openide.loaders.DataFolder;
   274.5  import org.openide.loaders.DataObject;
   274.6  import org.openide.util.NbBundle;
   274.7 -import org.netbeans.modules.soa.ui.SoaUiUtil;
   274.8 +import org.netbeans.modules.soa.ui.SoaUtil;
   274.9  
  274.10  /**
  274.11   *
  274.12 @@ -315,7 +315,7 @@
  274.13              initialiseNamespace(tMapFo, projectNamespace);
  274.14              
  274.15              if (tMapFo != null) {
  274.16 -                SoaUiUtil.fixEncoding(DataObject.find(tMapFo), projectSource);
  274.17 +                SoaUtil.fixEncoding(DataObject.find(tMapFo), projectSource);
  274.18              }
  274.19              
  274.20          } catch (IOException ex) {