Examples of NullChange


Examples of org.eclipse.ltk.core.refactoring.NullChange

    }
    final String newName = getArguments().getNewName().replaceAll("\\.html", "");

    if (newName.contains("_")) {
      // don't rename java file in case of a variation
      return new NullChange("Java file part of wicket won't be renamed.");
    }
    final RenameTypeProcessor jrp = new RenameTypeProcessor(compilationUnit.getAllTypes()[0]);
    final RenameRefactoring rr = new RenameRefactoring(jrp);
    jrp.setNewElementName(newName);
    jrp.setUpdateQualifiedNames(true);
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

          openEjbJarInputSource = new InputSource(openEjbJarFile.getContents());
        }
      }
    } catch (Exception e) {
      status.addFatalError(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.fatalError.parse"));
      return new NullChange();
    }
   
    try {
      JDTFacade jdtFacade = new JDTFacade(project);
     
      List<Converter> converterList = new ArrayList<Converter>();
      converterList.add(new SessionBeanConverter(jdtFacade));
      converterList.add(new EntityBeanConverter(jdtFacade));
      converterList.add(new EjbReferencesConverter(jdtFacade));
     
      if (ejb3Interfaces) {
        SessionBeanInterfaceModifier converter = new SessionBeanInterfaceModifier(jdtFacade);
        converter.setUseHome(useHomeInterface);
        converterList.add(converter);
      }
     
      if (remoteAnnotations) {
        SessionBeanRemoteAnnotationAdder converter = new SessionBeanRemoteAnnotationAdder(jdtFacade);
        converter.setUseHome(useHomeInterface);
        converterList.add(converter);
      }
     
      if (convertEntityBeansToPojos) {
        converterList.add(new EntityBeanPojoConverter(jdtFacade));
      }
     
      if (generateEntityManagerCode) {
        converterList.add(new EntityBeanUsageConverter(jdtFacade));
      }
     
      Converter[] converters = converterList.toArray(new Converter[0]);
     
      OpenEjbXmlConverter converter = new OpenEjbXmlConverter(converters, new EclipseProjectClassLoader(getClass().getClassLoader(), project));
      converter.convert(ejbJarInputSource, openEjbJarInputSource);

      String[] warnings = jdtFacade.getWarnings();
      for (String warning : warnings) {
        status.addWarning(warning);
      }

      return jdtFacade.getChange();

    } catch (Exception e) {
      status.addFatalError(Messages.getString("org.apache.openejb.helper.annotation.wizards.ejbMigrationWzd.fatalError") + ":" + e.getLocalizedMessage());
      return new NullChange();
    }
  }
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

          for (int i= 0; i < oldEntries.length; i++) {
            IClasspathEntry curr= oldEntries[i];
            if (curr.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
              IPath path= curr.getPath();
              if (path.equals(entry.getPath())) {
                return new NullChange(); // already on build path
              } else if (path.matchingFirstSegments(entry.getPath()) > 0) {
                if (!added) {
                  curr= entry; // replace
                  added= true;
                } else {
                  curr= null;
                }
              }
            }
            if (curr != null) {
              newEntries.add(curr);
            }
          }
          if (!added) {
            newEntries.add(entry);
          }

          final IClasspathEntry[] newCPEntries= (IClasspathEntry[]) newEntries.toArray(new IClasspathEntry[newEntries.size()]);
          Change newClasspathChange= newClasspathChange(project, newCPEntries, project.getOutputLocation());
          if (newClasspathChange != null) {
            return newClasspathChange;
          }
        return new NullChange();

        }

        @Override
        public String getAdditionalProposalInfo() {
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

          IResource res = pack.getResource();
          INewNameQuery nameQuery = copyQueries
              .createNewResourceNameQuery(res, newName);
          return new CopyResourceChange(res, dest, nameQuery);
        } else {
          return new NullChange();
        }
      }
    }
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

          .createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_noCopying);
    }

    public Change createChange(IProgressMonitor pm,
        INewNameQueries copyQueries) {
      return new NullChange();
    }
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

    private static Change createCopyResourceChange(IResource resource,
        NewNameProposer nameProposer, INewNameQueries copyQueries,
        IContainer destination) {
      if (resource == null || destination == null)
        return new NullChange();
      INewNameQuery nameQuery;
      String name = nameProposer.createNewName(resource, destination);
      if (name == null)
        nameQuery = copyQueries.createNullQuery();
      else
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

      // https://bugs.eclipse.org/bugs/show_bug.cgi?id=292651
      // There's an issue when deleting the IScriptFolder by using
      // model.delete method.
      delete(false, new SubProgressMonitor(pm, 1),
          (IScriptFolder) element);
      return new NullChange();
      // end fix https://bugs.eclipse.org/bugs/show_bug.cgi?id=66835
    } else {
      element.delete(false, pm);
      return null;
    }
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

    }

    if (res == null || res.length == 0) {
      return new ICompletionProposal[] { new ChangeCorrectionProposal(
          CorrectionMessages.NoCorrectionProposal_description,
          new NullChange(""), 0, null) }; //$NON-NLS-1$
    }
    if (res.length > 1) {
      Arrays.sort(res, new CompletionProposalComparator());
    }
    return res;
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

      // case IModelElement.IMPORT_CONTAINER:
      // case IModelElement.IMPORT_DECLARATION:
      // Assert.isTrue(false);//not done here
    default:
      Assert.isTrue(false);// there's no more kinds
      return new NullChange();
    }
  }
View Full Code Here

Examples of org.eclipse.ltk.core.refactoring.NullChange

   * org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime
   * .IProgressMonitor)
   */
  public Change perform(IProgressMonitor pm) throws CoreException {
    getOriginalBreakpoint().delete();
    return new NullChange();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.