Examples of IvyClasspathContainerConfiguration


Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

     *            the entries to start with
     */
    public IvyClasspathContainerImpl(IJavaProject javaProject, IPath path,
            IClasspathEntry[] classpathEntries, IClasspathAttribute[] attributes) {
        this.path = path;
        conf = new IvyClasspathContainerConfiguration(javaProject, path, false, attributes);
        state = new IvyClasspathContainerState(conf);
        this.classpathEntries = classpathEntries;
    }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

    protected void handleContainer(IProject project, IvyClasspathContainerImpl cp) {
        open(cp);
    }

    public static void open(IvyClasspathContainerImpl cp) {
        IvyClasspathContainerConfiguration conf = cp.getConf();
        if (conf.getJavaProject() == null) {
            return;
        }
        IFile file = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        if (file != null) {
            try {
                String editorId = "org.apache.ivyde.editors.IvyEditor";
                page.openEditor(new FileEditorInput(file), editorId, true);
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

        }

        Iterator/* <IvyClasspathContainer> */itContainers = containers.iterator();
        while (error == null && itContainers.hasNext()) {
            IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) itContainers.next();
            IvyClasspathContainerConfiguration cpc = ivycp.getConf();

            // first check that this is not the one we are editing
            if (oldIvyFile != null && cpc.getIvyXmlPath().equals(oldIvyFile) && oldConfs != null
                    && oldConfs.size() == cpc.getConfs().size()
                    && oldConfs.containsAll(cpc.getConfs())) {
                continue;
            }

            if (cpc.getIvyXmlPath().equals(ivyFilePath)) {
                if (selectedConfigurations.isEmpty() || selectedConfigurations.contains("*")
                        || cpc.getConfs().isEmpty() || cpc.getConfs().contains("*")) {
                    error = "A container already exists for the selected conf of "
                            + "the module descriptor";
                } else {
                    ArrayList list = new ArrayList(cpc.getConfs());
                    list.retainAll(selectedConfigurations);
                    if (!list.isEmpty()) {
                        error = "A container already exists for the selected conf of "
                                + "the module descriptor";
                    }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

        return entry;
    }

    public void setSelection(IClasspathEntry entry) {
        if (entry == null) {
            conf = new IvyClasspathContainerConfiguration(project, "ivy.xml", true);
        } else {
            conf = new IvyClasspathContainerConfiguration(project, entry.getPath(), true,
                    entry.getExtraAttributes());
            exported = entry.isExported();
        }
        state = new IvyClasspathContainerState(conf);
        oldIvyFile = conf.getIvyXmlPath();
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

        oldIvyFile = conf.getIvyXmlPath();
        oldConfs = conf.getConfs();
    }

    public void setSelection(IFile ivyfile) {
        conf = new IvyClasspathContainerConfiguration(project, ivyfile.getProjectRelativePath()
                .toString(), true);
        // if there is an ivysettings.xml file at the root of the project, configure the container
        // to use it
        if (project != null) {
            IResource settings = project.getProject().findMember(new Path("ivysettings.xml"));
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

     * @throws ParseException
     * @throws IvyDEException
     */
    public static void toIvyFile(ModuleDescriptor descriptor, IvyClasspathContainerImpl container)
            throws ParseException, IOException, IvyDEException {
        IvyClasspathContainerConfiguration conf = container.getConf();
        // TODO the ivy file might not be in the workspace or may be an absolute path
        // in a such case the Eclipse API will state the file a read only
        IFile ivyFile = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IStatus writable = ivyFile.getWorkspace().validateEdit(new IFile[] {ivyFile},
            IWorkspace.VALIDATE_PROMPT);
        if (writable.isOK()) {
            descriptor.toIvyFile(container.getState().getIvyFile());
        }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.IvyClasspathContainerConfiguration

                .size()]);
    }

    private void saveChanges(IvyClasspathContainerImpl container, File permanentSaveTarget,
            File temporaryChanges) throws IOException {
        IvyClasspathContainerConfiguration conf = container.getConf();
        IFile virtualIvyFile = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IStatus writable = virtualIvyFile.getWorkspace().validateEdit(new IFile[] {virtualIvyFile},
            IWorkspace.VALIDATE_PROMPT);
        if (writable.isOK()) {
            FileWriter writer = new FileWriter(permanentSaveTarget, false);
            BufferedReader reader = new BufferedReader(new FileReader(temporaryChanges));
View Full Code Here

Examples of org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerConfiguration

    protected void selectionChanged(IAction a, IvyClasspathContainer ivycp) {
        this.cp = ivycp;
    }

    public void run(IAction action) {
        IvyClasspathContainerConfiguration conf = cp.getConf();
        if (conf.getJavaProject() == null) {
            return;
        }
        IFile file = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        if (file != null) {
            try {
                String editorId = "org.apache.ivyde.editors.IvyEditor";
                page.openEditor(new FileEditorInput(file), editorId, true);
View Full Code Here

Examples of org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerConfiguration

    protected void selectionChanged(IAction a, IvyClasspathContainer ivycp) {
        this.cp = ivycp;
    }

    public void run(IAction action) {
        IvyClasspathContainerConfiguration conf = cp.getConf();
        if (FakeProjectManager.isFake(conf.getJavaProject())) {
            return;
        }
        IFile file = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        if (file != null) {
            try {
                String editorId = "org.apache.ivyde.editors.IvyEditor";
                page.openEditor(new FileEditorInput(file), editorId, true);
View Full Code Here

Examples of org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainerConfiguration

                .size()]);
    }

    private void saveChanges(IvyClasspathContainer container, File permanentSaveTarget,
            File temporaryChanges) throws IOException {
        IvyClasspathContainerConfiguration conf = container.getConf();
        IFile virtualIvyFile = conf.getJavaProject().getProject().getFile(conf.getIvyXmlPath());
        IStatus writable = virtualIvyFile.getWorkspace().validateEdit(new IFile[] {virtualIvyFile},
            IWorkspace.VALIDATE_PROMPT);
        if (writable.isOK()) {           
            FileWriter writer = new FileWriter(permanentSaveTarget, false);           
            BufferedReader reader = new BufferedReader(new FileReader(temporaryChanges));
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.