Automated merge JavaScriptLibrarySupportTechnologyPreview
authorAlexanderPermyaKov <alex02@netbeans.org>
Mon, 12 May 2008 17:05:15 +0400
changeset 3288a09a14f52847
parent 3287 9f4516bd42a2
parent 3286 763310d6591a
child 3290 90fd276a5d20
child 3313 539bccfbd97d
child 3529 ab1821d78da5
Automated merge
     1.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELCatalog.java	Mon May 12 17:01:18 2008 +0400
     1.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELCatalog.java	Mon May 12 17:05:15 2008 +0400
     1.3 @@ -49,9 +49,7 @@
     1.4   *
     1.5   * @author ads
     1.6   */
     1.7 -public class BPELCatalog implements CatalogReader, CatalogDescriptor,
     1.8 -    EntityResolver  
     1.9 -{
    1.10 +public class BPELCatalog implements CatalogReader, CatalogDescriptor, EntityResolver  {
    1.11          
    1.12      private static final String URL_BPEL_1_1 =
    1.13          "nbres:/" +
    1.14 @@ -140,8 +138,7 @@
    1.15          "org/netbeans/modules/bpel/core/resources/" +               // NOI18N
    1.16          "bpel_catalog.gif";                                         // NOI18N
    1.17      
    1.18 -    public BPELCatalog() {
    1.19 -    }
    1.20 +    public BPELCatalog() {}
    1.21      
    1.22      /**
    1.23       * 
    1.24 @@ -156,7 +153,7 @@
    1.25              Lookup.Result res = userCatalogLookup.lookup(templ);
    1.26              Collection impls = res.allInstances();
    1.27  
    1.28 -            for(Object obj : impls){
    1.29 +            for(Object obj : impls) {
    1.30                  if (obj instanceof BPELCatalog) {
    1.31                      bpelCatalog = (BPELCatalog)obj;
    1.32                      break;
    1.33 @@ -222,26 +219,22 @@
    1.34      /**
    1.35       * Refresh content according to content of mounted catalog.
    1.36       */
    1.37 -    public void refresh() {
    1.38 -    }
    1.39 +    public void refresh() {}
    1.40      
    1.41      /**
    1.42       * Optional operation allowing to listen at catalog for changes.
    1.43       * @throws UnsupportedOpertaionException if not supported by the implementation.
    1.44       */
    1.45 -    public void addCatalogListener(CatalogListener l) {
    1.46 -    }
    1.47 +    public void addCatalogListener(CatalogListener l) {}
    1.48      
    1.49      /**
    1.50       * Optional operation couled with addCatalogListener.
    1.51       * @throws UnsupportedOpertaionException if not supported by the implementation.
    1.52       */
    1.53 -    public void removeCatalogListener(CatalogListener l) {
    1.54 -    }
    1.55 +    public void removeCatalogListener(CatalogListener l) {}
    1.56      
    1.57      /** Registers new listener.  */
    1.58 -    public void addPropertyChangeListener(PropertyChangeListener l) {
    1.59 -    }
    1.60 +    public void addPropertyChangeListener(PropertyChangeListener l) {}
    1.61      
    1.62      /**
    1.63       * @return I18N display name
    1.64 @@ -267,8 +260,7 @@
    1.65      }
    1.66      
    1.67      /** Unregister the listener.  */
    1.68 -    public void removePropertyChangeListener(PropertyChangeListener l) {
    1.69 -    }
    1.70 +    public void removePropertyChangeListener(PropertyChangeListener l) {}
    1.71      
    1.72      /**
    1.73       * Resolves schema definition file for deployment descriptor (spec.2_4)
    1.74 @@ -276,9 +268,7 @@
    1.75       * @param systemId systemId for resolved entity
    1.76       * @return InputSource for 
    1.77       */    
    1.78 -    public InputSource resolveEntity(String publicId, String systemId) 
    1.79 -        throws SAXException, IOException 
    1.80 -    {
    1.81 +    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
    1.82          if (BPEL_2_0.equals(systemId)) {
    1.83              return new org.xml.sax.InputSource(URL_BPEL_2_0);
    1.84          }
    1.85 @@ -339,12 +329,8 @@
    1.86          }
    1.87          return null;
    1.88      }
    1.89 -    /**
    1.90 -     * Get registered URI for the given publicId or null if not registered.
    1.91 -     * @return null if not registered
    1.92 -     */ 
    1.93 +
    1.94      public String resolvePublic(String publicId) {
    1.95          return null;
    1.96      }
    1.97 -    
    1.98  }
     2.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataEditorSupport.java	Mon May 12 17:01:18 2008 +0400
     2.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataEditorSupport.java	Mon May 12 17:05:15 2008 +0400
     2.3 @@ -131,7 +131,6 @@
     2.4          return getModelFactory().getModel(modelSource);
     2.5      }
     2.6  
     2.7 -    /** {@inheritDoc} */
     2.8      public void saveDocument() throws IOException {
     2.9          super.saveDocument();
    2.10          syncModel();
    2.11 @@ -164,8 +163,7 @@
    2.12      }
    2.13  
    2.14      @Override
    2.15 -    protected void notifyClosed()
    2.16 -    {
    2.17 +    protected void notifyClosed() {
    2.18          QuietUndoManager undo = getUndoManager();
    2.19          StyledDocument doc = getDocument();
    2.20          synchronized (undo) {
    2.21 @@ -230,8 +228,7 @@
    2.22      }
    2.23  
    2.24      @Override
    2.25 -    public Task prepareDocument()
    2.26 -    {
    2.27 +    public Task prepareDocument() {
    2.28          QuietUndoManager undo = (QuietUndoManager) getUndoRedo();
    2.29          Task task = super.prepareDocument();
    2.30          // Avoid listening to the same task more than once.
    2.31 @@ -269,8 +266,7 @@
    2.32      }
    2.33  
    2.34      @Override
    2.35 -    public Task reloadDocument()
    2.36 -    {
    2.37 +    public Task reloadDocument() {
    2.38          Task task = super.reloadDocument();
    2.39          task.addTaskListener(new TaskListener() {
    2.40  
    2.41 @@ -430,12 +426,8 @@
    2.42                   * means the resultItem was generated when the model was broken.
    2.43                   *  In the above cases switch to the source multiview.
    2.44                   */ 
    2.45 -                if (resultItem.getModel().getState().equals(
    2.46 -                        State.NOT_WELL_FORMED)
    2.47 -                        || resultItem.getComponents() == null)
    2.48 -                {
    2.49 -                    for (int index1 = 0; index1 < mvh.getPerspectives().length; index1++)
    2.50 -                    {
    2.51 +                if (resultItem.getModel().getState().equals(State.NOT_WELL_FORMED) || resultItem.getComponents() == null) {
    2.52 +                    for (int index1 = 0; index1 < mvh.getPerspectives().length; index1++) {
    2.53                          if (mvh.getPerspectives()[index1].preferredID().equals(
    2.54                                  BPELSourceMultiViewElementDesc.PREFERED_ID))
    2.55                              mvh.requestActive(mvh.getPerspectives()[index1]);
    2.56 @@ -463,9 +455,7 @@
    2.57                          }
    2.58                      }
    2.59                  }
    2.60 -                else if (mvp.preferredID().equals(
    2.61 -                        BPELSourceMultiViewElementDesc.PREFERED_ID))
    2.62 -                {
    2.63 +                else if (mvp.preferredID().equals(BPELSourceMultiViewElementDesc.PREFERED_ID)) {
    2.64                      Line line = LineUtil.getLine(resultItem);
    2.65  
    2.66                      if (line != null) {
    2.67 @@ -520,8 +510,7 @@
    2.68       * @see org.openide.text.CloneableEditorSupport#updateTitles()
    2.69       */
    2.70      @Override
    2.71 -    protected void updateTitles()
    2.72 -    {
    2.73 +    protected void updateTitles() {
    2.74          /* This method is invoked by DataEditorSupport.DataNodeListener
    2.75           * whenever the DataNode displayName property is changed. It is
    2.76           * also called when the CloneableEditorSupport is (un)modified.
    2.77 @@ -557,8 +546,7 @@
    2.78      }
    2.79  
    2.80      @Override
    2.81 -    protected UndoRedo.Manager createUndoRedoManager()
    2.82 -    {
    2.83 +    protected UndoRedo.Manager createUndoRedoManager() {
    2.84          // Override so the superclass will use our proxy undo manager
    2.85          // instead of the default, then we can intercept edits.
    2.86          return new QuietUndoManager(super.createUndoRedoManager());
    2.87 @@ -590,18 +578,13 @@
    2.88          List<TopComponent> associatedTCs = new ArrayList<TopComponent>();
    2.89          DataObject targetDO = getDataObject();
    2.90          TopComponent activeTC = TopComponent.getRegistry().getActivated();
    2.91 -        if (activeTC != null
    2.92 -                && targetDO == (DataObject) activeTC.getLookup().lookup(
    2.93 -                        DataObject.class))
    2.94 -        {
    2.95 +        if (activeTC != null && targetDO == (DataObject) activeTC.getLookup().lookup(DataObject.class)) {
    2.96              associatedTCs.add(activeTC);
    2.97          }
    2.98          Set openTCs = TopComponent.getRegistry().getOpened();
    2.99          for (Object tc : openTCs) {
   2.100              TopComponent tcc = (TopComponent) tc;
   2.101 -            if (targetDO == (DataObject) tcc.getLookup().lookup(
   2.102 -                    DataObject.class))
   2.103 -            {
   2.104 +            if (targetDO == (DataObject) tcc.getLookup().lookup(DataObject.class)) {
   2.105                  associatedTCs.add(tcc);
   2.106              }
   2.107          }
   2.108 @@ -634,9 +617,7 @@
   2.109      // /////////////////////// CloseOperationHandler ///////////////////////////
   2.110      // /////////////////////////////////////////////////////////////////////////
   2.111  
   2.112 -    public static class CloseHandler implements CloseOperationHandler,
   2.113 -            Serializable
   2.114 -    {
   2.115 +    public static class CloseHandler implements CloseOperationHandler, Serializable {
   2.116  
   2.117          private static final long serialVersionUID = -4621077799099893176L;
   2.118  
     3.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataLoader.java	Mon May 12 17:01:18 2008 +0400
     3.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataLoader.java	Mon May 12 17:05:15 2008 +0400
     3.3 @@ -78,9 +78,7 @@
     3.4       * @return the data object for this file
     3.5       * @exception DataObjectExistsException if the primary file already has data object
     3.6       */
     3.7 -    protected MultiDataObject createMultiObject( FileObject primaryFile )
     3.8 -            throws DataObjectExistsException, IOException
     3.9 -    {
    3.10 +    protected MultiDataObject createMultiObject( FileObject primaryFile ) throws DataObjectExistsException, IOException {
    3.11          return new BPELDataObject(primaryFile, this);
    3.12      }
    3.13      
    3.14 @@ -105,15 +103,11 @@
    3.15          return result;
    3.16      }
    3.17      
    3.18 -    protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, 
    3.19 -            FileObject primaryFile) 
    3.20 -    {
    3.21 +    protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile) {
    3.22          return new FileEntry(obj, primaryFile);
    3.23      }
    3.24      
    3.25 -    protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, 
    3.26 -            FileObject secondaryFile) 
    3.27 -    {       
    3.28 +    protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile) {       
    3.29          return new FileEntry(obj, secondaryFile);
    3.30      }
    3.31      
    3.32 @@ -121,7 +115,8 @@
    3.33       * other modules can decorate with Special Actions
    3.34       * to see the default actions look in the layer.xml
    3.35       */
    3.36 -    @Override protected String actionsContext() {
    3.37 +    @Override 
    3.38 +    protected String actionsContext() {
    3.39              return ACTION_CONTEXT;
    3.40      }
    3.41  }
     4.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataObject.java	Mon May 12 17:01:18 2008 +0400
     4.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BPELDataObject.java	Mon May 12 17:05:15 2008 +0400
     4.3 @@ -119,8 +119,7 @@
     4.4      }
     4.5  
     4.6      @Override
     4.7 -    public void setModified( boolean modified )
     4.8 -    {
     4.9 +    public void setModified( boolean modified ) {
    4.10          super.setModified(modified);
    4.11          if (modified) {
    4.12              getCookieSet().add(getSaveCookie());
    4.13 @@ -148,14 +147,12 @@
    4.14              }
    4.15  
    4.16              @Override
    4.17 -            public int hashCode()
    4.18 -            {
    4.19 +            public int hashCode() {
    4.20                  return getClass().hashCode();
    4.21              }
    4.22  
    4.23              @Override
    4.24 -            public boolean equals( Object other )
    4.25 -            {
    4.26 +            public boolean equals(Object other) {
    4.27                  return other != null && getClass().equals(other.getClass());
    4.28              }
    4.29          };
    4.30 @@ -245,12 +242,9 @@
    4.31                      private static final long serialVersionUID = 1L;
    4.32              public void actionPerformed(ActionEvent e) {
    4.33                  // Fix for #81066
    4.34 -                if ( myEditorSupport.getOpenedPanes()==null ||
    4.35 -                        myEditorSupport.getOpenedPanes().length==0 ) 
    4.36 -                {
    4.37 +                if (myEditorSupport.getOpenedPanes() == null || myEditorSupport.getOpenedPanes().length == 0) {
    4.38                      myEditorSupport.open();
    4.39 -                    BpelMultiViewSupport support = 
    4.40 -                        BpelMultiViewSupport.getInstance();
    4.41 +                    BpelMultiViewSupport support = BpelMultiViewSupport.getInstance();
    4.42                      support.requestViewOpen(myEditorSupport);
    4.43                  }
    4.44                  else {
     5.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/BadgedIconCache.java	Mon May 12 17:01:18 2008 +0400
     5.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/BadgedIconCache.java	Mon May 12 17:05:15 2008 +0400
     5.3 @@ -36,9 +36,7 @@
     5.4   */
     5.5  abstract class BadgedIconCache {
     5.6  
     5.7 -    private static Map<String,Image> theCache =
     5.8 -        Collections.synchronizedMap(new WeakHashMap<String,Image>(101));
     5.9 -    
    5.10 +    private static Map<String,Image> theCache = Collections.synchronizedMap(new WeakHashMap<String,Image>(101));
    5.11  
    5.12      public static final int NW_BADGE_X = 8;
    5.13      public static final int NW_BADGE_Y = 0;
    5.14 @@ -50,59 +48,48 @@
    5.15      public static final int SW_BADGE_Y = 8;
    5.16      
    5.17    
    5.18 -    public static final String DEFAULT_ICON =
    5.19 -       "org/openide/resources/defaultNode.gif";                           // NOI18N
    5.20 -    public static final String DEFAULT_ERROR_BADGE =   
    5.21 -        "org/netbeans/modules/bpel/core/resources/errorbadge.gif";        // NOI18N
    5.22 -    public static final String DEFAULT_WARNING_BADGE =
    5.23 -        "org/netbeans/modules/bpel/core/resources/warningbadge.gif";      // NOI18N
    5.24 +    public static final String DEFAULT_ICON = "org/openide/resources/defaultNode.gif"; // NOI18N
    5.25 +    public static final String DEFAULT_ERROR_BADGE = "org/netbeans/modules/bpel/core/resources/errorbadge.gif"; // NOI18N
    5.26 +    public static final String DEFAULT_WARNING_BADGE = "org/netbeans/modules/bpel/core/resources/warningbadge.gif"; // NOI18N
    5.27      
    5.28      private static final String ERROR_KEY_PREFIX = "ERR";                 // NOI18N
    5.29      private static final String WARNING_KEY_PREFIX = "WRN";               // NOI18N
    5.30      
    5.31 -    public static Image getErrorIcon(String base)
    5.32 -    {
    5.33 +    public static Image getErrorIcon(String base) {
    5.34          return getBadgedIcon(base,null,null,null,DEFAULT_ERROR_BADGE);
    5.35      }
    5.36      
    5.37 -    public static Image getWarningIcon(String base)
    5.38 -    {
    5.39 +    public static Image getWarningIcon(String base) {
    5.40          return getBadgedIcon(base,null,null,null,DEFAULT_WARNING_BADGE);
    5.41      }
    5.42  
    5.43 -    public static Image getErrorIcon(Image baseImage)
    5.44 -    {
    5.45 -        if(null == baseImage)
    5.46 +    public static Image getErrorIcon(Image baseImage) {
    5.47 +        if (null == baseImage) {
    5.48              return null;
    5.49 -        
    5.50 +        }
    5.51          String key = ERROR_KEY_PREFIX + baseImage.toString();
    5.52 -        
    5.53          Image result = (Image)theCache.get(key);
    5.54 -        if (result == null)
    5.55 -        {
    5.56 +
    5.57 +        if (result == null) {
    5.58              result = createBadgedIcon(
    5.59                  baseImage, null, null, null, DEFAULT_ERROR_BADGE);
    5.60              theCache.put(key, result);
    5.61          }
    5.62 -        
    5.63          return result;      
    5.64      }
    5.65      
    5.66 -    public static Image getWarningIcon(Image baseImage)
    5.67 -    {
    5.68 -        if(null == baseImage)
    5.69 +    public static Image getWarningIcon(Image baseImage) {
    5.70 +        if (null == baseImage) {
    5.71              return null;
    5.72 -        
    5.73 +        }
    5.74          String key = WARNING_KEY_PREFIX + baseImage.toString();
    5.75 -        
    5.76          Image result = (Image)theCache.get(key);
    5.77 -        if (result == null)
    5.78 -        {
    5.79 +
    5.80 +        if (result == null) {
    5.81              result = createBadgedIcon(
    5.82                  baseImage, null, null, null, DEFAULT_WARNING_BADGE);
    5.83              theCache.put(key, result);
    5.84          }
    5.85 -        
    5.86          return result;      
    5.87      }
    5.88      
    5.89 @@ -133,20 +120,17 @@
    5.90       * @param seBadge classloader path of the icon file for the SE quadrant badge.
    5.91       * @param swBadge classloader path of the icon file for the SW quadrant badge.
    5.92       */
    5.93 -    public static Image getBadgedIcon(String base, String nwBadge, String neBadge,
    5.94 -                                        String seBadge, String swBadge) {
    5.95 -        if (base == null)
    5.96 +    public static Image getBadgedIcon(String base, String nwBadge, String neBadge, String seBadge, String swBadge) {
    5.97 +        if (base == null) {
    5.98              return null;
    5.99 +        }
   5.100 +        String key = buildIconKey(base, nwBadge, neBadge, seBadge, swBadge);
   5.101 +        Image result = (Image)theCache.get(key);
   5.102  
   5.103 -        String key = buildIconKey(base, nwBadge, neBadge, seBadge, swBadge);
   5.104 -
   5.105 -        Image result = (Image)theCache.get(key);
   5.106 -        if (result == null)
   5.107 -        {
   5.108 +        if (result == null) {
   5.109              result = createBadgedIcon(base, nwBadge, neBadge, seBadge, swBadge);
   5.110              theCache.put(key, result);
   5.111          }
   5.112 -        
   5.113          return result;
   5.114      }
   5.115  
   5.116 @@ -157,26 +141,20 @@
   5.117       * @param seBadge classloader path of the icon file for the SE quadrant badge.
   5.118       * @param swBadge classloader path of the icon file for the SW quadrant badge.
   5.119       */
   5.120 -    public static Image getBadgedIcon(String base, Image baseImage, 
   5.121 -            String nwBadge, String neBadge,
   5.122 -            String seBadge, String swBadge) {
   5.123 -        if (base == null)
   5.124 +    public static Image getBadgedIcon(String base, Image baseImage, String nwBadge, String neBadge, String seBadge, String swBadge) {
   5.125 +        if (base == null) {
   5.126              return null;
   5.127 +        }
   5.128 +        String key = buildIconKey(base, nwBadge, neBadge, seBadge, swBadge);
   5.129 +        Image result = (Image)theCache.get(key);
   5.130  
   5.131 -        String key = buildIconKey(base, nwBadge, neBadge, seBadge, swBadge);
   5.132 -
   5.133 -        Image result = (Image)theCache.get(key);
   5.134 -        if (result == null)
   5.135 -        {
   5.136 -            result = createBadgedIcon(baseImage, nwBadge, neBadge, seBadge, 
   5.137 -                    swBadge);
   5.138 +        if (result == null) {
   5.139 +            result = createBadgedIcon(baseImage, nwBadge, neBadge, seBadge, swBadge);
   5.140              theCache.put(key, result);
   5.141          }
   5.142 -        
   5.143          return result;
   5.144      }
   5.145  
   5.146 -
   5.147      /**
   5.148       * Construct hash table key = concatenate all arguments with ";" between
   5.149       * each one and null replaced by the string "null".
   5.150 @@ -186,45 +164,18 @@
   5.151       * better to use "null" in the key for that badge.  Currently the bad file name
   5.152       * is used to construct the key.
   5.153       */
   5.154 -    private static String buildIconKey(
   5.155 -        String base,
   5.156 -        String nwBadge,
   5.157 -        String neBadge,
   5.158 -        String seBadge,
   5.159 -        String swBadge)
   5.160 -    {
   5.161 +    private static String buildIconKey(String base, String nwBadge, String neBadge, String seBadge, String swBadge) {
   5.162          String nullString = new String("null"); // NOI18N
   5.163 -        Object[] params = new Object[] {normalizeGifPath(base),
   5.164 +        Object[] params = new Object[] { 
   5.165 +            normalizeGifPath(base),
   5.166              ((nwBadge == null) ? nullString : normalizeGifPath(nwBadge)),
   5.167              ((neBadge == null) ? nullString : normalizeGifPath(neBadge)),
   5.168              ((seBadge == null) ? nullString : normalizeGifPath(seBadge)),
   5.169              ((swBadge == null) ? nullString : normalizeGifPath(swBadge)),
   5.170          };
   5.171 - 
   5.172          return MessageFormat.format("{0};{1};{2};{3};{4}", params); // NOI18N
   5.173      }
   5.174  
   5.175 -    /*
   5.176 -    private static String buildIconKey(
   5.177 -        Image baseIcon,
   5.178 -        String nwBadge,
   5.179 -        String neBadge,
   5.180 -        String seBadge,
   5.181 -        String swBadge)
   5.182 -    {
   5.183 -        String nullString = new String("null"); // NOI18N
   5.184 -        String iconAsString = baseIcon.
   5.185 -        Object[] params = new Object[] {normalizeGifPath(baseIcon),
   5.186 -            ((nwBadge == null) ? nullString : normalizeGifPath(nwBadge)),
   5.187 -            ((neBadge == null) ? nullString : normalizeGifPath(neBadge)),
   5.188 -            ((seBadge == null) ? nullString : normalizeGifPath(seBadge)),
   5.189 -            ((swBadge == null) ? nullString : normalizeGifPath(swBadge)),
   5.190 -        };
   5.191 - 
   5.192 -        return MessageFormat.format("{0};{1};{2};{3};{4}", params); // NOI18N
   5.193 -    }
   5.194 -    */
   5.195 -
   5.196      /**
   5.197       * Instantiate an Image for each not-null argument.
   5.198       * Then call org.openide.util.Utilities.mergeImages() to do the overlaying.
   5.199 @@ -236,34 +187,19 @@
   5.200       * 
   5.201       * Does not do caching.
   5.202       */
   5.203 -    public static Image createBadgedIcon(
   5.204 -        String base,
   5.205 -        String nwBadge,
   5.206 -        String neBadge,
   5.207 -        String seBadge,
   5.208 -        String swBadge)
   5.209 -    {
   5.210 +    public static Image createBadgedIcon(String base, String nwBadge, String neBadge, String seBadge, String swBadge) {
   5.211          Image baseImage = getIcon(base);
   5.212 -        if (baseImage == null)
   5.213 +
   5.214 +        if (baseImage == null) {
   5.215              baseImage = getIcon(DEFAULT_ICON);
   5.216 -
   5.217 +        }
   5.218          return createBadgedIcon(baseImage,nwBadge,neBadge,seBadge,swBadge);
   5.219      }
   5.220      
   5.221 -    /*
   5.222 -     * 
   5.223 -     * Does not do caching.
   5.224 -     */
   5.225 -    public static Image createBadgedIcon(
   5.226 -        Image baseImage,
   5.227 -        String nwBadge,
   5.228 -        String neBadge,
   5.229 -        String seBadge,
   5.230 -        String swBadge)
   5.231 -    {
   5.232 -        if(null == baseImage)
   5.233 +    public static Image createBadgedIcon(Image baseImage, String nwBadge, String neBadge, String seBadge, String swBadge) {
   5.234 +        if (null == baseImage) {
   5.235              return null;
   5.236 -        
   5.237 +        }
   5.238          Image badgedImage = baseImage;
   5.239          
   5.240          // merge the icon for each quadrant with the base icon:
   5.241 @@ -286,13 +222,12 @@
   5.242          return badgedImage;
   5.243      }
   5.244  
   5.245 -    public static Image mergeSingleImage(
   5.246 -        Image baseImage, String badge, int badge_x, int badge_y)
   5.247 -    {
   5.248 +    public static Image mergeSingleImage(Image baseImage, String badge, int badge_x, int badge_y) {
   5.249          Image badgeImage = getIcon(badge);
   5.250 -        if (badgeImage == null)
   5.251 +
   5.252 +        if (badgeImage == null) {
   5.253              return baseImage;
   5.254 -
   5.255 +        }
   5.256          return Utilities.mergeImages(baseImage, badgeImage, badge_x, badge_y);
   5.257      }
   5.258      
   5.259 @@ -300,22 +235,21 @@
   5.260       * Find icon resource file in cache if available; otherwise get from disk
   5.261       * and add to cache.
   5.262       */
   5.263 -    public static Image getIcon(String iconFile)
   5.264 -    {
   5.265 +    public static Image getIcon(String iconFile) {
   5.266          String filename = normalizeGifPath(iconFile);
   5.267          Image theImage = (Image)theCache.get(filename);
   5.268 -        if (theImage != null)
   5.269 +
   5.270 +        if (theImage != null) {
   5.271              return theImage;    // cache hit
   5.272 -
   5.273 +        }
   5.274          // got following line of code from openide.util.IconManager.java:
   5.275          // ("BadgedIconCache.class.getClassLoader().getResource(iconFile)" doesn't work)
   5.276 -        ClassLoader loader =  (ClassLoader)org.openide.util.Lookup.getDefault().
   5.277 -            lookup(ClassLoader.class);
   5.278 +        ClassLoader loader =  (ClassLoader)org.openide.util.Lookup.getDefault().lookup(ClassLoader.class);
   5.279 +        URL tmpURL = loader.getResource(filename);
   5.280  
   5.281 -        URL tmpURL = loader.getResource(filename);
   5.282 -        if (tmpURL == null)
   5.283 +        if (tmpURL == null) {
   5.284              return null;
   5.285 -
   5.286 +        }
   5.287          theImage = new ImageIcon(tmpURL).getImage();
   5.288          theCache.put(filename, theImage);
   5.289  
   5.290 @@ -327,20 +261,18 @@
   5.291       * fix so doesn't start with "/" and does end in ".gif".
   5.292       */
   5.293      public static String normalizeGifPath(String gifPath) {
   5.294 -        if (gifPath == null)
   5.295 +        if (gifPath == null) {
   5.296              return gifPath;
   5.297 -        
   5.298 +        }
   5.299          String slash = "/"; // NOI18N
   5.300          String dot = ".";   // NOI18N
   5.301          
   5.302          if (gifPath.startsWith(slash)) {
   5.303              gifPath = gifPath.substring(slash.length());
   5.304          }
   5.305 -        
   5.306          if (gifPath.indexOf(dot) == -1) {
   5.307              gifPath = gifPath.concat(".gif");   // NOI18N
   5.308          }
   5.309 -        
   5.310          return gifPath;
   5.311      }
   5.312  }
     6.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/SearchProvider.java	Mon May 12 17:01:18 2008 +0400
     6.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/SearchProvider.java	Mon May 12 17:05:15 2008 +0400
     6.3 @@ -62,8 +62,7 @@
     6.4    }
     6.5  
     6.6    @Override
     6.7 -  protected final Component getRoot(DataObject data)
     6.8 -  {
     6.9 +  protected final Component getRoot(DataObject data) {
    6.10      BpelModel model = EditorUtil.getBpelModel(data);
    6.11  
    6.12      if (model == null) {
    6.13 @@ -73,26 +72,22 @@
    6.14    }
    6.15  
    6.16    @Override
    6.17 -  protected final String getType(Component component)
    6.18 -  {
    6.19 +  protected final String getType(Component component) {
    6.20      return ((BpelEntity) component).getElementType().getName();
    6.21    }
    6.22  
    6.23    @Override
    6.24 -  protected final Icon getIcon(Component component)
    6.25 -  {
    6.26 +  protected final Icon getIcon(Component component) {
    6.27      return EditorUtil.getIcon(component);
    6.28    }
    6.29  
    6.30    @Override
    6.31 -  protected void gotoSource(Component component)
    6.32 -  {
    6.33 +  protected void gotoSource(Component component) {
    6.34      EditorUtil.goToSource((BpelEntity) component);
    6.35    }
    6.36  
    6.37    @Override
    6.38 -  protected final void gotoVisual(Component component)
    6.39 -  {
    6.40 +  protected final void gotoVisual(Component component) {
    6.41      EditorUtil.goToDesign((BpelEntity) component);
    6.42    }
    6.43  
    6.44 @@ -101,8 +96,7 @@
    6.45    }
    6.46  
    6.47    @Override
    6.48 -  public SearchTarget [] getTargets()
    6.49 -  {
    6.50 +  public SearchTarget [] getTargets() {
    6.51      return TARGETS;
    6.52    }
    6.53  
     7.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/completion/BpelCompletionModelProvider.java	Mon May 12 17:01:18 2008 +0400
     7.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/completion/BpelCompletionModelProvider.java	Mon May 12 17:05:15 2008 +0400
     7.3 @@ -41,7 +41,6 @@
     7.4   */
     7.5  public class BpelCompletionModelProvider extends CompletionModelProvider {
     7.6  
     7.7 -
     7.8      private static final String PROCESS = "process";            // NOI18N
     7.9  
    7.10      public List<CompletionModel> getModels(CompletionContext context) {
    7.11 @@ -49,8 +48,8 @@
    7.12          if ( !isBpelFile( context) ) {
    7.13              return null;
    7.14          }
    7.15 -        
    7.16          SchemaModel model = createMetaSchemaModel();
    7.17 +
    7.18          if(model == null) {
    7.19              return null;
    7.20          }
    7.21 @@ -81,9 +80,7 @@
    7.22              QName qName = list.get( 0 );
    7.23              String root = qName.getLocalPart();
    7.24              String ns = qName.getNamespaceURI();
    7.25 -            if ( PROCESS.equals( root )  && 
    7.26 -                    BpelEntity.BUSINESS_PROCESS_NS_URI.equals(ns) ) 
    7.27 -            {
    7.28 +            if ( PROCESS.equals( root )  && BpelEntity.BUSINESS_PROCESS_NS_URI.equals(ns) ) {
    7.29                  return true;
    7.30              }
    7.31          }
     8.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BPELSourceMultiViewElement.java	Mon May 12 17:01:18 2008 +0400
     8.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BPELSourceMultiViewElement.java	Mon May 12 17:05:15 2008 +0400
     8.3 @@ -136,9 +136,7 @@
     8.4       * we are using Externalization semantics so that we can get a hook to call
     8.5       * initialize() upon deserialization
     8.6       */
     8.7 -    public void readExternal(ObjectInput in)
     8.8 -        throws IOException, ClassNotFoundException 
     8.9 -    {
    8.10 +    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    8.11          super.readExternal(in);
    8.12          Object obj = in.readObject();
    8.13          if ( obj instanceof BPELDataObject) {
    8.14 @@ -556,9 +554,8 @@
    8.15          if (myPreviousTask != null) {
    8.16              myPreviousTask.cancel();
    8.17          }
    8.18 -        if (myPreviousTask != null && !myPreviousTask.isFinished()
    8.19 -                && RequestProcessor.getDefault().isRequestProcessorThread()) // issue 125 439
    8.20 -        {
    8.21 +        // issue 125 439
    8.22 +        if (myPreviousTask != null && !myPreviousTask.isFinished() && RequestProcessor.getDefault().isRequestProcessorThread()) {
    8.23              myPreviousTask.waitFinished();
    8.24              myPreviousTask = null;
    8.25          }
     9.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BpelMultiViewSupport.java	Mon May 12 17:01:18 2008 +0400
     9.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/multiview/BpelMultiViewSupport.java	Mon May 12 17:05:15 2008 +0400
     9.3 @@ -52,9 +52,7 @@
     9.4          super();
     9.5      }
     9.6      
     9.7 -    public static CloneableTopComponent createMultiView( final BPELDataObject 
     9.8 -            dataObject ) 
     9.9 -    {
    9.10 +    public static CloneableTopComponent createMultiView( final BPELDataObject dataObject) {
    9.11          Collection coll = getMultiviewProviders();
    9.12          MultiViewDescription views[] = new MultiViewDescription[coll.size()+1];
    9.13          
    9.14 @@ -94,9 +92,7 @@
    9.15          Set openTCs = TopComponent.getRegistry().getOpened();
    9.16          for (Object tc : openTCs) {
    9.17              TopComponent topComponent = (TopComponent) tc;
    9.18 -            if (targetDO == (DataObject)topComponent.getLookup().lookup(
    9.19 -                    DataObject.class)) 
    9.20 -            {
    9.21 +            if (targetDO == (DataObject)topComponent.getLookup().lookup(DataObject.class)) {
    9.22                  associatedTCs.add(topComponent);
    9.23              }
    9.24          }
    9.25 @@ -111,9 +107,7 @@
    9.26              }
    9.27              MultiViewPerspective[] p = handler.getPerspectives();
    9.28              for (MultiViewPerspective mvp : p) {
    9.29 -                if ( !mvp.preferredID().equals( 
    9.30 -                        BPELSourceMultiViewElementDesc.PREFERED_ID)) 
    9.31 -                {
    9.32 +                if ( !mvp.preferredID().equals(BPELSourceMultiViewElementDesc.PREFERED_ID)) {
    9.33                      handler.requestActive(mvp);
    9.34                      found = true;
    9.35                      break;
    9.36 @@ -149,5 +143,4 @@
    9.37      }
    9.38      
    9.39      private final static BpelMultiViewSupport INSTANCE = new BpelMultiViewSupport();
    9.40 -
    9.41  }
    10.1 --- a/bpel.core/src/org/netbeans/modules/bpel/core/wizard/Utilities.java	Mon May 12 17:01:18 2008 +0400
    10.2 +++ b/bpel.core/src/org/netbeans/modules/bpel/core/wizard/Utilities.java	Mon May 12 17:05:15 2008 +0400
    10.3 @@ -79,9 +79,7 @@
    10.4       * taken from j2ee module
    10.5       * Recursively gets all components in the components array and puts it in allComponents
    10.6       */
    10.7 -    private static void getAllComponents( Component[] components, 
    10.8 -            Collection allComponents ) 
    10.9 -    {
   10.10 +    private static void getAllComponents( Component[] components, Collection allComponents) {
   10.11          for( int i = 0; i < components.length; i++ ) {
   10.12              if( components[i] != null ) {
   10.13                  allComponents.add( components[i] );
   10.14 @@ -113,6 +111,4 @@
   10.15          }
   10.16          return null;
   10.17      }
   10.18 -    
   10.19 -    
   10.20  }
    11.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationButton.java	Mon May 12 17:01:18 2008 +0400
    11.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/documentation/DocumentationButton.java	Mon May 12 17:05:15 2008 +0400
    11.3 @@ -84,8 +84,7 @@
    11.4    }
    11.5  
    11.6    @Override
    11.7 -  public String getToolTipText()
    11.8 -  {
    11.9 +  public String getToolTipText() {
   11.10      String text = getExtensibleElement(myID).getDocumentation();
   11.11  
   11.12      if (text != null) {
    12.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/search/Construct.java	Mon May 12 17:01:18 2008 +0400
    12.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/search/Construct.java	Mon May 12 17:05:15 2008 +0400
    12.3 @@ -57,8 +57,7 @@
    12.4  public final class Construct extends Engine {
    12.5  
    12.6    @Override
    12.7 -  public void search(SearchOption option) throws SearchException
    12.8 -  {
    12.9 +  public void search(SearchOption option) throws SearchException {
   12.10      Diagram diagram = (Diagram) option.getProvider().getRoot();
   12.11      diagram.clearHighlighting();
   12.12  //out();
   12.13 @@ -107,14 +106,12 @@
   12.14    }
   12.15  
   12.16    @Override
   12.17 -  public String getDisplayName()
   12.18 -  {
   12.19 +  public String getDisplayName() {
   12.20      return i18n(Engine.class, "LBL_Construct_Display_Name"); // NOI18N
   12.21    }
   12.22  
   12.23    @Override
   12.24 -  public String getShortDescription()
   12.25 -  {
   12.26 +  public String getShortDescription() {
   12.27      return i18n(Engine.class, "LBL_Construct_Short_Description"); // NOI18N
   12.28    }
   12.29  }
    13.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/search/Decorator.java	Mon May 12 17:01:18 2008 +0400
    13.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/search/Decorator.java	Mon May 12 17:05:15 2008 +0400
    13.3 @@ -47,8 +47,7 @@
    13.4    }
    13.5  
    13.6    @Override
    13.7 -  public Decoration getDecoration(BpelEntity entity)
    13.8 -  {
    13.9 +  public Decoration getDecoration(BpelEntity entity) {
   13.10      if ( !myIsClearSelection && mySelectedEntity == entity) {
   13.11        return GREEN_DECORATION; // glow
   13.12      }
   13.13 @@ -59,8 +58,7 @@
   13.14    }
   13.15  
   13.16    @Override
   13.17 -  public void release()
   13.18 -  {
   13.19 +  public void release() {
   13.20      mySelectedEntity = null;
   13.21      myHighlightedEntities = null;
   13.22    }
    14.1 --- a/bpel.editors/src/org/netbeans/modules/bpel/search/Engine.java	Mon May 12 17:01:18 2008 +0400
    14.2 +++ b/bpel.editors/src/org/netbeans/modules/bpel/search/Engine.java	Mon May 12 17:05:15 2008 +0400
    14.3 @@ -98,26 +98,22 @@
    14.4      }
    14.5  
    14.6      @Override
    14.7 -    public void gotoSource()
    14.8 -    {
    14.9 +    public void gotoSource() {
   14.10        myElement.gotoSource();
   14.11      }
   14.12  
   14.13      @Override
   14.14 -    public void gotoVisual()
   14.15 -    {
   14.16 +    public void gotoVisual() {
   14.17        myElement.gotoDesign();
   14.18      }
   14.19  
   14.20      @Override
   14.21 -    public void highlight()
   14.22 -    {
   14.23 +    public void highlight() {
   14.24        myElement.highlight();
   14.25      }
   14.26  
   14.27      @Override
   14.28 -    public void unhighlight()
   14.29 -    {
   14.30 +    public void unhighlight() {
   14.31        myElement.unhighlight();
   14.32      }
   14.33  
    15.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/BpelVisitor.java	Mon May 12 17:01:18 2008 +0400
    15.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/BpelVisitor.java	Mon May 12 17:05:15 2008 +0400
    15.3 @@ -100,20 +100,16 @@
    15.4    }
    15.5                        
    15.6    @Override
    15.7 -  public void visit(Import _import)
    15.8 -  {
    15.9 +  public void visit(Import _import) {
   15.10  //out();
   15.11  //out("[IMPORT] location: " + _import.getLocation());
   15.12 -    if (ImportHelper.getWsdlModel(_import) == myTarget ||
   15.13 -      ImportHelper.getSchemaModel(_import) == myTarget)
   15.14 -    {
   15.15 +    if (ImportHelper.getWsdlModel(_import) == myTarget || ImportHelper.getSchemaModel(_import) == myTarget) {
   15.16        myUsage.add(_import);
   15.17      }
   15.18    }
   15.19  
   15.20    @Override
   15.21 -  public void visit(PartnerLink partnerLink)
   15.22 -  {
   15.23 +  public void visit(PartnerLink partnerLink) {
   15.24  //out();
   15.25  //out("[PARTNER LINK]: " + Util.getName(partnerLink));
   15.26      Util.visit(
   15.27 @@ -137,10 +133,8 @@
   15.28    }
   15.29  
   15.30    @Override
   15.31 -  public void visit(Validate validate)
   15.32 -  {
   15.33 -    List<BpelReference<VariableDeclaration>> variables =
   15.34 -      validate.getVaraibles();
   15.35 +  public void visit(Validate validate) {
   15.36 +    List<BpelReference<VariableDeclaration>> variables = validate.getVaraibles();
   15.37  
   15.38      if (variables == null) {
   15.39        return;
   15.40 @@ -156,66 +150,57 @@
   15.41    }
   15.42  
   15.43    @Override
   15.44 -  public void visit(StartCounterValue value)
   15.45 -  {
   15.46 +  public void visit(StartCounterValue value) {
   15.47  //out();
   15.48  //out("[START COUNTER]: " + Util.getName(value));
   15.49      visitContentElement(value);
   15.50    }
   15.51  
   15.52    @Override
   15.53 -  public void visit(FinalCounterValue value)
   15.54 -  {
   15.55 +  public void visit(FinalCounterValue value) {
   15.56  //out();
   15.57  //out("[FINAL COUNTER]: " + Util.getName(value));
   15.58      visitContentElement(value);
   15.59    }
   15.60  
   15.61    @Override
   15.62 -  public void visit(Branches branches)
   15.63 -  {
   15.64 +  public void visit(Branches branches) {
   15.65  //out();
   15.66  //out("[BRANCHES]: " + Util.getName(branches));
   15.67      visitContentElement(branches);
   15.68    }
   15.69      
   15.70    @Override
   15.71 -  public void visit(BooleanExpr booleanExpression)
   15.72 -  {
   15.73 +  public void visit(BooleanExpr booleanExpression) {
   15.74  //out();
   15.75  //out("[BOOLEAN EXPRESSION]: " + Util.getName(booleanExpression));
   15.76      visitContentElement(booleanExpression);
   15.77    }
   15.78  
   15.79    @Override
   15.80 -  public void visit(RepeatEvery repeatEvery)
   15.81 -  {
   15.82 +  public void visit(RepeatEvery repeatEvery) {
   15.83  //out();
   15.84  //out("[REPEAT EVERY]: " + Util.getName(repeatEvery));
   15.85      visitContentElement(repeatEvery);
   15.86    }
   15.87  
   15.88    @Override
   15.89 -  public void visit(DeadlineExpression deadline)
   15.90 -  {
   15.91 +  public void visit(DeadlineExpression deadline) {
   15.92  //out();
   15.93  //out("[DEADLNE]: " + Util.getName(deadline));
   15.94      visitContentElement(deadline);
   15.95    }
   15.96  
   15.97    @Override
   15.98 -  public void visit(For _for)
   15.99 -  {
  15.100 +  public void visit(For _for) {
  15.101  //out();
  15.102  //out("[FOR]: " + Util.getName(_for));
  15.103      visitContentElement(_for);
  15.104    }
  15.105  
  15.106    @Override
  15.107 -  public void visit(CorrelationSet correlationSet)
  15.108 -  {
  15.109 -    List<WSDLReference<CorrelationProperty>> references =
  15.110 -      correlationSet.getProperties();
  15.111 +  public void visit(CorrelationSet correlationSet) {
  15.112 +    List<WSDLReference<CorrelationProperty>> references = correlationSet.getProperties();
  15.113  
  15.114      if (references == null) {
  15.115        return;
  15.116 @@ -231,8 +216,7 @@
  15.117    }
  15.118  
  15.119    @Override
  15.120 -  public void visit(Correlation correlation)
  15.121 -  {
  15.122 +  public void visit(Correlation correlation) {
  15.123      Util.visit(
  15.124        correlation.getSet(),
  15.125        myTarget,
  15.126 @@ -242,8 +226,7 @@
  15.127    }
  15.128  
  15.129    @Override
  15.130 -  public void visit(Source source)
  15.131 -  {
  15.132 +  public void visit(Source source) {
  15.133      Util.visit(
  15.134        source.getLink(),
  15.135        myTarget,
  15.136 @@ -253,8 +236,7 @@
  15.137    }
  15.138  
  15.139    @Override
  15.140 -  public void visit(Target target)
  15.141 -  {
  15.142 +  public void visit(Target target) {
  15.143      Util.visit(
  15.144        target.getLink(),
  15.145        myTarget,
  15.146 @@ -264,8 +246,7 @@
  15.147    }
  15.148  
  15.149    @Override
  15.150 -  public void visit(From from)
  15.151 -  {
  15.152 +  public void visit(From from) {
  15.153  //out();
  15.154  //out();
  15.155  //out("[FROM]: " + Util.getName(from));
  15.156 @@ -297,8 +278,7 @@
  15.157    }
  15.158  
  15.159    @Override
  15.160 -  public void visit(FromPart fromPart)
  15.161 -  {
  15.162 +  public void visit(FromPart fromPart) {
  15.163      Util.visit(
  15.164        fromPart.getToVariable(),
  15.165        myTarget,
  15.166 @@ -308,8 +288,7 @@
  15.167    }
  15.168  
  15.169    @Override
  15.170 -  public void visit(To to)
  15.171 -  {
  15.172 +  public void visit(To to) {
  15.173  //out();
  15.174  //out();
  15.175  //out("[TO]: " + Util.getName(to));
  15.176 @@ -341,8 +320,7 @@
  15.177    }
  15.178  
  15.179    @Override
  15.180 -  public void visit(ToPart toPart)
  15.181 -  {
  15.182 +  public void visit(ToPart toPart) {
  15.183      Util.visit(
  15.184        toPart.getFromVariable(),
  15.185        myTarget,
  15.186 @@ -359,8 +337,7 @@
  15.187    }
  15.188  
  15.189    @Override
  15.190 -  public void visit(OnEvent event)
  15.191 -  {
  15.192 +  public void visit(OnEvent event) {
  15.193  //out();
  15.194  //out("[EVENT]: " + Util.getName(event));
  15.195      Util.visit(
  15.196 @@ -396,8 +373,7 @@
  15.197    }
  15.198  
  15.199    @Override
  15.200 -  public void visit(OnMessage message)
  15.201 -  {
  15.202 +  public void visit(OnMessage message) {
  15.203  //out();
  15.204  //out("[MESSAGE]: " + Util.getName(message));
  15.205      Util.visit(
  15.206 @@ -433,8 +409,7 @@
  15.207    }
  15.208  
  15.209    @Override
  15.210 -  public void visit(Catch _catch)
  15.211 -  {
  15.212 +  public void visit(Catch _catch) {
  15.213  //out();
  15.214  //out("[CATCH]: " + Util.getName(_catch));
  15.215      Util.visit(
  15.216 @@ -458,8 +433,7 @@
  15.217    }
  15.218  
  15.219    @Override
  15.220 -  public void visit(Reply reply)
  15.221 -  {
  15.222 +  public void visit(Reply reply) {
  15.223  //out();
  15.224  //out("[REPLY]: " + Util.getName(reply));
  15.225      Util.visit(
  15.226 @@ -501,8 +475,7 @@
  15.227    }
  15.228  
  15.229    @Override
  15.230 -  public void visit(Receive receive)
  15.231 -  {
  15.232 +  public void visit(Receive receive) {
  15.233  //out();
  15.234  //out("[RECEIVE]: " + Util.getName(receive));
  15.235      Util.visit(
  15.236 @@ -538,8 +511,7 @@
  15.237    }
  15.238  
  15.239    @Override
  15.240 -  public void visit(Invoke invoke)
  15.241 -  {
  15.242 +  public void visit(Invoke invoke) {
  15.243  //out();
  15.244  //out("[INVOKE]: " + Util.getName(invoke));
  15.245      Util.visit(
  15.246 @@ -578,16 +550,14 @@
  15.247    }
  15.248  
  15.249    @Override
  15.250 -  public void visit(Scope scope)
  15.251 -  {
  15.252 +  public void visit(Scope scope) {
  15.253      if (scope.getCompensationHandler() == myTarget) {
  15.254        myUsage.add(scope);
  15.255      }
  15.256    }
  15.257  
  15.258    @Override
  15.259 -  public void visit(CompensateScope scope)
  15.260 -  {
  15.261 +  public void visit(CompensateScope scope) {
  15.262      Util.visit(
  15.263        scope.getTarget(),
  15.264        myTarget,
  15.265 @@ -597,8 +567,7 @@
  15.266    }
  15.267  
  15.268    @Override
  15.269 -  public void visit(Throw _throw)
  15.270 -  {
  15.271 +  public void visit(Throw _throw) {
  15.272  //out();
  15.273  //out("[THROW]: " + Util.getName(_throw));
  15.274      Util.visit(
  15.275 @@ -616,8 +585,7 @@
  15.276    }
  15.277  
  15.278    @Override
  15.279 -  public void visit(Variable variable)
  15.280 -  {
  15.281 +  public void visit(Variable variable) {
  15.282  //out();
  15.283  //out("[VARIABLE]: " + Util.getName(variable));
  15.284      Util.visit(
    16.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Deleter.java	Mon May 12 17:01:18 2008 +0400
    16.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Deleter.java	Mon May 12 17:05:15 2008 +0400
    16.3 @@ -153,13 +153,10 @@
    16.4      return null;
    16.5    }
    16.6  
    16.7 -  public void doRefactoring(List<RefactoringElementImplementation> elements)
    16.8 -    throws IOException
    16.9 -  {
   16.10 +  public void doRefactoring(List<RefactoringElementImplementation> elements) throws IOException {
   16.11  //out();
   16.12  //out("DO: " + myRequest.getRefactoringSource());
   16.13 -    Referenceable referenceable =
   16.14 -      myRequest.getRefactoringSource().lookup(Referenceable.class);
   16.15 +    Referenceable referenceable = myRequest.getRefactoringSource().lookup(Referenceable.class);
   16.16  
   16.17      if ( !(referenceable instanceof Component)) {
   16.18        return;
    17.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Element.java	Mon May 12 17:01:18 2008 +0400
    17.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Element.java	Mon May 12 17:05:15 2008 +0400
    17.3 @@ -152,10 +152,7 @@
    17.4    }
    17.5  
    17.6    protected String getNewFileContent() {
    17.7 -    if (
    17.8 -      myComponent.getModel() instanceof AbstractDocumentModel &&
    17.9 -      myTransaction != null)
   17.10 -    {
   17.11 +    if (myComponent.getModel() instanceof AbstractDocumentModel && myTransaction != null) {
   17.12        return myTransaction.refactorForPreview(myComponent.getModel());
   17.13      }
   17.14      return null;
    18.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Mover.java	Mon May 12 17:01:18 2008 +0400
    18.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Mover.java	Mon May 12 17:05:15 2008 +0400
    18.3 @@ -139,9 +139,7 @@
    18.4      return null;
    18.5    }
    18.6        
    18.7 -  public void doRefactoring(
    18.8 -    List<RefactoringElementImplementation> elements) throws IOException
    18.9 -  {
   18.10 +  public void doRefactoring(List<RefactoringElementImplementation> elements) throws IOException {
   18.11      Map<Model, Set<RefactoringElementImplementation>> map = getModelMap(elements);
   18.12      Set<Model> models = map.keySet();
   18.13      Referenceable reference =
   18.14 @@ -161,9 +159,7 @@
   18.15      return null;
   18.16    }
   18.17  
   18.18 -  private Map<Model, Set<RefactoringElementImplementation>> getModelMap(
   18.19 -    List<RefactoringElementImplementation> elements)
   18.20 -  {
   18.21 +  private Map<Model, Set<RefactoringElementImplementation>> getModelMap(List<RefactoringElementImplementation> elements) {
   18.22      Map<Model, Set<RefactoringElementImplementation>> results =
   18.23        new HashMap<Model, Set<RefactoringElementImplementation>>();
   18.24    
   18.25 @@ -183,9 +179,7 @@
   18.26      return results;
   18.27    }
   18.28  
   18.29 -  private List<Component> getComponents(
   18.30 -    Set<RefactoringElementImplementation> elements)
   18.31 -  {
   18.32 +  private List<Component> getComponents(Set<RefactoringElementImplementation> elements) {
   18.33      List<Component> component = new ArrayList<Component>(elements.size());
   18.34    
   18.35      for (RefactoringElementImplementation element : elements) {
    19.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Renamer.java	Mon May 12 17:01:18 2008 +0400
    19.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Renamer.java	Mon May 12 17:05:15 2008 +0400
    19.3 @@ -199,9 +199,7 @@
    19.4      return null;
    19.5    }
    19.6        
    19.7 -  public void doRefactoring(
    19.8 -    List<RefactoringElementImplementation> elements) throws IOException
    19.9 -  {
   19.10 +  public void doRefactoring(List<RefactoringElementImplementation> elements) throws IOException {
   19.11      Map<Model, Set<RefactoringElementImplementation>> map = getModelMap(elements);
   19.12      Set<Model> models = map.keySet();
   19.13      Referenceable reference =
   19.14 @@ -225,9 +223,7 @@
   19.15      return null;
   19.16    }
   19.17  
   19.18 -  private Map<Model, Set<RefactoringElementImplementation>> getModelMap(
   19.19 -    List<RefactoringElementImplementation> elements)
   19.20 -  {
   19.21 +  private Map<Model, Set<RefactoringElementImplementation>> getModelMap(List<RefactoringElementImplementation> elements) {
   19.22      Map<Model, Set<RefactoringElementImplementation>> results =
   19.23        new HashMap<Model, Set<RefactoringElementImplementation>>();
   19.24    
   19.25 @@ -247,9 +243,7 @@
   19.26      return results;
   19.27    }
   19.28  
   19.29 -  private List<Component> getComponents(
   19.30 -    Set<RefactoringElementImplementation> elements)
   19.31 -  {
   19.32 +  private List<Component> getComponents(Set<RefactoringElementImplementation> elements) {
   19.33      List<Component> component = new ArrayList<Component>(elements.size());
   19.34    
   19.35      for (RefactoringElementImplementation element : elements) {
   19.36 @@ -258,12 +252,7 @@
   19.37      return component;
   19.38    }
   19.39         
   19.40 -  private void rename(
   19.41 -    List<Component> components,
   19.42 -    Model model,
   19.43 -    Named target,
   19.44 -    String oldName) throws IOException
   19.45 -  {
   19.46 +  private void rename(List<Component> components, Model model, Named target, String oldName) throws IOException {
   19.47      if (target == null || components == null || model == null) {
   19.48        return;
   19.49      }
   19.50 @@ -316,18 +305,10 @@
   19.51  //out("RENAME: " + Util.getName(target));
   19.52  //out("    in: " + Util.getName(component));
   19.53  //out();
   19.54 -    if (component instanceof PartReference &&
   19.55 -      ((PartReference) component).getPart() != null &&
   19.56 -      component instanceof ReferenceCollection &&
   19.57 -      target instanceof Part)
   19.58 -    {
   19.59 +    if (component instanceof PartReference && ((PartReference) component).getPart() != null && component instanceof ReferenceCollection && target instanceof Part) {
   19.60        rename((PartReference) component, (Part) target);
   19.61      }
   19.62 -    else if (component instanceof PropertyReference &&
   19.63 -      ((PropertyReference) component).getProperty() != null &&
   19.64 -      component instanceof ReferenceCollection &&
   19.65 -      target instanceof CorrelationProperty)
   19.66 -    {
   19.67 +    else if (component instanceof PropertyReference && ((PropertyReference) component).getProperty() != null && component instanceof ReferenceCollection && target instanceof CorrelationProperty) {
   19.68        rename((PropertyReference) component, (CorrelationProperty) target);
   19.69      }
   19.70      else if (component instanceof Variable) {
   19.71 @@ -339,22 +320,13 @@
   19.72    }
   19.73  
   19.74    private void renameCamponent(Component component, Named target) throws IOException{
   19.75 -    if (component instanceof OperationReference &&
   19.76 -      component instanceof ReferenceCollection &&
   19.77 -      target instanceof Operation)
   19.78 -    {
   19.79 +    if (component instanceof OperationReference && component instanceof ReferenceCollection && target instanceof Operation) {
   19.80        rename((OperationReference) component, (Operation) target);
   19.81      }
   19.82 -    else if (component instanceof PortTypeReference &&
   19.83 -      component instanceof ReferenceCollection &&
   19.84 -      target instanceof PortType)
   19.85 -    {
   19.86 +    else if (component instanceof PortTypeReference && component instanceof ReferenceCollection && target instanceof PortType) {
   19.87        rename((PortTypeReference) component, (PortType) target);
   19.88      }
   19.89 -    else if (component instanceof MessageExchangeReference &&
   19.90 -      component instanceof ReferenceCollection &&
   19.91 -      target instanceof MessageExchange)
   19.92 -    {
   19.93 +    else if (component instanceof MessageExchangeReference && component instanceof ReferenceCollection && target instanceof MessageExchange) {
   19.94        rename((MessageExchangeReference) component, (MessageExchange) target);
   19.95      }
   19.96      else {
   19.97 @@ -363,9 +335,7 @@
   19.98    }
   19.99  
  19.100    private void renameCampanent(Component component, Named target) throws IOException{
  19.101 -    if (component instanceof Role &&
  19.102 -      target instanceof PortType)
  19.103 -    {
  19.104 +    if (component instanceof Role && target instanceof PortType) {
  19.105        rename((Role) component, (PortType) target);
  19.106      }
  19.107      else if (component instanceof Catch) {
  19.108 @@ -398,9 +368,7 @@
  19.109      if (component instanceof CorrelationSet) {
  19.110        rename((CorrelationSet) component, target);
  19.111      }
  19.112 -    else if (component instanceof ContentElement &&
  19.113 -      component instanceof BpelEntity)
  19.114 -    {
  19.115 +    else if (component instanceof ContentElement && component instanceof BpelEntity) {
  19.116        rename((ContentElement) component);
  19.117      }
  19.118      else if (component instanceof Query) {
  19.119 @@ -456,10 +424,7 @@
  19.120      }
  19.121    }
  19.122  
  19.123 -  private void rename(
  19.124 -    CorrelationProperty property,
  19.125 -    Named target) throws IOException
  19.126 -  {
  19.127 +  private void rename(CorrelationProperty property, Named target) throws IOException {
  19.128      NamedComponentReference<GlobalElement> element = property.getElement();
  19.129  
  19.130      if (element != null && target instanceof GlobalElement) {
  19.131 @@ -535,10 +500,7 @@
  19.132      }
  19.133    }
  19.134  
  19.135 -  private void rename(
  19.136 -    CorrelationSet correlationSet,
  19.137 -    Named target) throws IOException
  19.138 -  {
  19.139 +  private void rename(CorrelationSet correlationSet, Named target) throws IOException {
  19.140      if (target instanceof CorrelationProperty) {
  19.141  //out();
  19.142  //out("RENAME");
  19.143 @@ -616,10 +578,7 @@
  19.144      }
  19.145    }
  19.146  
  19.147 -  private void renameFaultNameReference(
  19.148 -    FaultNameReference reference,
  19.149 -    Named target) throws IOException
  19.150 -  {
  19.151 +  private void renameFaultNameReference(FaultNameReference reference, Named target) throws IOException {
  19.152      try {
  19.153        reference.setFaultName(getQName(reference.getFaultName(), target));
  19.154      }
    20.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Util.java	Mon May 12 17:01:18 2008 +0400
    20.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/Util.java	Mon May 12 17:05:15 2008 +0400
    20.3 @@ -66,23 +66,12 @@
    20.4  
    20.5    private Util() {}
    20.6    
    20.7 -  public static void visit( 
    20.8 -    NamedComponentReference<GlobalType> type,
    20.9 -    NamedComponentReference<GlobalElement> element,
   20.10 -    Referenceable target,
   20.11 -    Component component,
   20.12 -    List<Component> usage)
   20.13 -  {
   20.14 +  public static void visit(NamedComponentReference<GlobalType> type, NamedComponentReference<GlobalElement> element, Referenceable target, Component component, List<Component> usage) {
   20.15      visit(type, target, component, usage);
   20.16      visit(element, target, component, usage);
   20.17    }        
   20.18            
   20.19 -  public static void visit(
   20.20 -    Reference reference,
   20.21 -    Referenceable target,
   20.22 -    Component component,
   20.23 -    List<Component> usage)
   20.24 -  {
   20.25 +  public static void visit(Reference reference, Referenceable target, Component component, List<Component> usage) {
   20.26      if (reference == null || reference.get() == null) {
   20.27        return;
   20.28      }
   20.29 @@ -96,12 +85,7 @@
   20.30      }
   20.31    }
   20.32  
   20.33 -  public static void visit(
   20.34 -    QName qName,
   20.35 -    Referenceable target,
   20.36 -    Component component,
   20.37 -    List<Component> usage)
   20.38 -  {
   20.39 +  public static void visit(QName qName, Referenceable target, Component component, List<Component> usage) {
   20.40  //out();
   20.41  //out("VISIT: " + qName);
   20.42      if (target instanceof Named && contains(qName, (Named) target)) {
    21.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/WsdlVisitor.java	Mon May 12 17:01:18 2008 +0400
    21.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/WsdlVisitor.java	Mon May 12 17:05:15 2008 +0400
    21.3 @@ -69,8 +69,7 @@
    21.4    }
    21.5  
    21.6    @Override
    21.7 -  public void visit(ExtensibilityElement element) 
    21.8 -  {
    21.9 +  public void visit(ExtensibilityElement element) {
   21.10      checkUsages(element);
   21.11  
   21.12      if (element instanceof CorrelationProperty) {
    22.1 --- a/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java	Mon May 12 17:01:18 2008 +0400
    22.2 +++ b/bpel.refactoring/src/org/netbeans/modules/bpel/refactoring/XPath.java	Mon May 12 17:05:15 2008 +0400
    22.3 @@ -95,11 +95,7 @@
    22.4   */
    22.5  final class XPath extends AbstractXPathVisitor {
    22.6  
    22.7 -  XPath(
    22.8 -    List<Component> usage,
    22.9 -    Named target,
   22.10 -    String oldName)
   22.11 -  {
   22.12 +  XPath(List<Component> usage, Named target, String oldName) {
   22.13      myOldName = oldName;
   22.14      myTarget = target;
   22.15      myUsage = usage;
   22.16 @@ -191,8 +187,7 @@
   22.17    }
   22.18  
   22.19    @Override
   22.20 -  public void visit(XPathExpressionPath expressionPath)
   22.21 -  {
   22.22 +  public void visit(XPathExpressionPath expressionPath) {
   22.23  //out();
   22.24  //out("EXPRESION: " + expressionPath);
   22.25      XPathExpression rootExpression = expressionPath.getRootExpression();
   22.26 @@ -256,21 +251,13 @@
   22.27      visitReference(part.getType(), createList(steps), ""); // NOI18N
   22.28    }
   22.29  
   22.30 -  private void visitReference(
   22.31 -    NamedComponentReference reference,
   22.32 -    List<LocationStep> steps,
   22.33 -    String indent)
   22.34 -  {
   22.35 +  private void visitReference(NamedComponentReference reference, List<LocationStep> steps, String indent) {
   22.36      if (reference != null) {
   22.37        visitComponent(reference.get(), steps, indent);
   22.38      }
   22.39    }
   22.40  
   22.41 -  private void visitComponent(
   22.42 -    Object object,
   22.43 -    List<LocationStep> steps,
   22.44 -    String indent)
   22.45 -  {
   22.46 +  private void visitComponent(Object object, List<LocationStep> steps, String indent) {
   22.47      if (object instanceof ComplexType) {
   22.48  //out("  visit complex");
   22.49        visitComplexType((ComplexType) object, steps, indent);
   22.50 @@ -293,11 +280,7 @@
   22.51      }
   22.52    }
   22.53  
   22.54 -  private void visitMessage(
   22.55 -    Message message,
   22.56 -    List<LocationStep> steps,
   22.57 -    String indent)
   22.58 -  {
   22.59 +  private void visitMessage(Message message, List<LocationStep> steps, String indent) {
   22.60      Iterator<Part> parts = message.getParts().iterator();
   22.61  
   22.62      while (parts.hasNext()) {
   22.63 @@ -320,11 +303,7 @@
   22.64      }
   22.65    }
   22.66  
   22.67 -  private void visitElement(
   22.68 -    Element element,
   22.69 -    List<LocationStep> steps,
   22.70 -    String indent)
   22.71 -  {
   22.72 +  private void visitElement(Element element, List<LocationStep> steps, String indent) {
   22.73  //out(indent + "ELEMENT: " + Util.getName(element));
   22.74      if (checkUsages(element, steps, false)) {
   22.75        return;
   22.76 @@ -333,8 +312,7 @@
   22.77  
   22.78      element.accept(new DeepSchemaVisitor() {
   22.79        @Override
   22.80 -      public void visit(ComplexExtension extension)
   22.81 -      {
   22.82 +      public void visit(ComplexExtension extension) {
   22.83          myTypeReference = extension.getBase();
   22.84        }
   22.85      });
   22.86 @@ -351,11 +329,7 @@
   22.87      }
   22.88    }
   22.89  
   22.90 -  private void visitComplexType(
   22.91 -    ComplexType type,
   22.92 -    List<LocationStep> steps,
   22.93 -    String indent)
   22.94 -  {
   22.95 +  private void visitComplexType(ComplexType type, List<LocationStep> steps, String indent) {
   22.96  //out(indent + "COMPLEX.TYPE: " + Util.getName(type));
   22.97      if (myVisitedComplexType.contains(type)) {
   22.98        return;
   22.99 @@ -386,20 +360,12 @@
  22.100      }
  22.101    }
  22.102  
  22.103 -  private void visitAttribute(
  22.104 -    LocalAttribute attribute,
  22.105 -    List<LocationStep> steps,
  22.106 -    String indent)
  22.107 -  {
  22.108 +  private void visitAttribute(LocalAttribute attribute, List<LocationStep> steps, String indent) {
  22.109  //out(indent + "ATTRIBUTE: " + Util.getName(attribute));
  22.110      checkUsages(attribute, steps, true);
  22.111    }
  22.112  
  22.113 -  private void visitComplexContent(
  22.114 -    ComplexContent content,
  22.115 -    List<LocationStep> steps,
  22.116 -    String indent)
  22.117 -  {
  22.118 +  private void visitComplexContent(ComplexContent content, List<LocationStep> steps, String indent) {
  22.119      ComplexContentDefinition definition = content.getLocalDefinition();
  22.120  
  22.121      if (definition instanceof ComplexExtension) {
  22.122 @@ -432,11 +398,7 @@
  22.123  //out(indent + " [===========================");
  22.124    }
  22.125  
  22.126 -  private void visitSequence(
  22.127 -    Sequence sequence,
  22.128 -    List<LocationStep> steps,
  22.129 -    String indent)
  22.130 -  {
  22.131 +  private void visitSequence(Sequence sequence, List<LocationStep> steps, String indent) {
  22.132  //out(indent + " [sequnce] ==================");
  22.133      List<SequenceDefinition> content = sequence.getContent();
  22.134  
  22.135 @@ -469,18 +431,13 @@
  22.136  //out(indent + " [===========================");
  22.137    }
  22.138  
  22.139 -  private void visitSimpleType(
  22.140 -    SimpleType type,
  22.141 -    List<LocationStep> steps,
  22.142 -    String indent)
  22.143 -  {
  22.144 +  private void visitSimpleType(SimpleType type, List<LocationStep> steps, String indent) {
  22.145  //out(indent + "SIMPLE.TYPE: " + Util.getName(type));
  22.146      checkUsages(type, steps, true);
  22.147    }
  22.148  
  22.149    @Override
  22.150 -  public void visit(XPathVariableReference reference)
  22.151 -  {
  22.152 +  public void visit(XPathVariableReference reference) {
  22.153      QName qName = reference.getVariableName();
  22.154  //out("VAR REFER: " + qName);
  22.155      String name = qName.getLocalPart();
  22.156 @@ -519,8 +476,7 @@
  22.157    }
  22.158  
  22.159    @Override
  22.160 -  public void visit(LocationStep locationStep)
  22.161 -  {
  22.162 +  public void visit(LocationStep locationStep) {
  22.163  //out("=== LOCATION STEP: " + locationStep);
  22.164      XPathPredicateExpression [] predicates = locationStep.getPredicates();
  22.165  //out("  predicates: " + predicates);
  22.166 @@ -534,38 +490,30 @@
  22.167    }
  22.168  
  22.169    @Override
  22.170 -  public void visit(XPathCoreFunction coreFunction)
  22.171 -  {
  22.172 +  public void visit(XPathCoreFunction coreFunction) {
  22.173  //out("CORE FUNC: " + coreFunction);
  22.174      visitChildren(coreFunction);
  22.175    }
  22.176  
  22.177    @Override
  22.178 -  public void visit(XPathCoreOperation coreOperation)
  22.179 -  {
  22.180 +  public void visit(XPathCoreOperation coreOperation) {
  22.181  //out("CORE OPER: " + coreOperation);
  22.182      visitChildren(coreOperation);
  22.183    }
  22.184  
  22.185    @Override
  22.186 -  public void visit(XPathExtensionFunction extensionFunction)
  22.187 -  {
  22.188 +  public void visit(XPathExtensionFunction extensionFunction) {
  22.189  //out("EXT  FUNC: " + extensionFunction);
  22.190      visitChildren(extensionFunction);
  22.191    }
  22.192  
  22.193    @Override
  22.194 -  public void visit(XPathLocationPath locationPath)
  22.195 -  {
  22.196 +  public void visit(XPathLocationPath locationPath) {
  22.197  //out("LOCAL PATH: " + locationPath);
  22.198      visit(locationPath.getSteps());
  22.199    }
  22.200  
  22.201 -  private boolean checkUsages(
  22.202 -    Component component,
  22.203 -    List<LocationStep> steps,
  22.204 -    boolean nextStep)
  22.205 -  {
  22.206 +  private boolean checkUsages(Component component, List<LocationStep> steps, boolean nextStep) {
  22.207      if (component == null) {
  22.208        return false;
  22.209      }