Package org.epic.core.util

Examples of org.epic.core.util.XMLUtilities


    }

    private boolean addToIncPath(IFolder folder)
    {
        XMLUtilities xmlUtil = new XMLUtilities();
        int currentIncPathsCount = xmlUtil.getIncludeEntries(folder
            .getProject()).length;
        String[] incPaths = new String[currentIncPathsCount + 1];
        System.arraycopy(xmlUtil.getIncludeEntries(folder.getProject()), 0,
            incPaths, 0, currentIncPathsCount);
        incPaths[currentIncPathsCount] = folder.getLocation().toString();
        try
        {
            xmlUtil.writeIncludeEntries(folder.getProject(), incPaths);
        }
        catch (IOException e)
        {
            e.printStackTrace();
            return false;
View Full Code Here


        return true;
    }

    private boolean removeFromIncPath(IFolder folder)
    {
        XMLUtilities xmlUtil = new XMLUtilities();
        int currentIncPathsCount = xmlUtil.getIncludeEntries(folder
            .getProject()).length;
        String[] incPaths = new String[currentIncPathsCount - 1];
        int incPathIndex = 0;
        for (int index = 0; index < currentIncPathsCount; index++)
        {
            if (xmlUtil.getIncludeEntries(folder.getProject())[index]
                .matches(folder.getLocation().toString()))
            {
                // don't add this entry
            }
            else
            {
                incPaths[incPathIndex++] = xmlUtil.getIncludeEntries(folder
                    .getProject())[index];
            }
        }
        try
        {
            xmlUtil.writeIncludeEntries(folder.getProject(), incPaths);
        }
        catch (IOException e)
        {
            e.printStackTrace();
            return false;
View Full Code Here

        return true;
    }

    private boolean isInIncPath(IFolder folder)
    {
        XMLUtilities xmlUtil = new XMLUtilities();
        String[] incPaths = xmlUtil.getIncludeEntries(folder.getProject());
        for (int index = 0; index < incPaths.length; index++)
        {
            if (incPaths[index].matches(folder.getLocation().toString()))
            {
                return true;
View Full Code Here

     *         explicitly configured in the project's properties.
     * @see {@link #getIncPath}
     */
    public List getRawIncPath()
    {
        XMLUtilities xmlUtil = new XMLUtilities();
        return Arrays.asList(xmlUtil.getIncludeEntries(project, true));
    }
View Full Code Here

     *         ignored by syntax checking. These are the entries explicitly configured
     *         in the project's properties.
     */
    public List getIgnoredPaths()
    {
        String[] elems = new XMLUtilities().getIgnoredEntries(project);
        if (elems.length > 0)
        {       
            List patterns = new ArrayList(elems.length);
           
            for (int i = 0; i < elems.length; i++)
View Full Code Here

     *         configured in the project's properties.
     * @see {@link #getEffectiveIncPath}
     */
    public List getIncPath()
    {       
        XMLUtilities xmlUtil = new XMLUtilities();
        return makeAbsIncPath(xmlUtil.getIncludeEntries(project, true));
    }
View Full Code Here

            IEditorInput input = activeEditor.getEditorInput();
            IResource resource = (IResource) ((IAdaptable) input)
                .getAdapter(IResource.class);
            if (resource.getFileExtension().endsWith("pm"))
            {
                XMLUtilities xmlUtil = new XMLUtilities();
                String[] listEntries = xmlUtil.getIncludeEntries(resource
                    .getProject());
                String packagePath = resource.getProjectRelativePath()
                    .removeFileExtension().toString();
                for (int i = 0; i < listEntries.length; i++)
                {
View Full Code Here

        data.horizontalSpan = 2;
        removeButton.setLayoutData(data);

        // Initialize list
        IResource resource = (IResource) getElement().getAdapter(IResource.class);
        XMLUtilities xmlUtil = new XMLUtilities();
        String[] listEntries = xmlUtil.getIgnoredEntries(resource.getProject());
        if (listEntries != null)
        {
            ignoredPathList.setItems(listEntries);
        }
View Full Code Here

    public boolean performOk()
    {
        try
        {
            XMLUtilities xmlUtil = new XMLUtilities();
            xmlUtil.writeIgnoredEntries(project, ignoredPathList.getItems());
            return true;
        }
        catch (Exception e)
        {
            e.printStackTrace();
View Full Code Here

    removeButton.setLayoutData(data);

    // Initialize list
    IResource resource = (IResource) getElement().getAdapter(
        IResource.class);
    XMLUtilities xmlUtil = new XMLUtilities();
    String[] listEntries = xmlUtil.getIncludeEntries(resource.getProject());
    if (listEntries != null) {
      incPathList.setItems(listEntries);
    }

    return entryTable;
View Full Code Here

TOP

Related Classes of org.epic.core.util.XMLUtilities

Copyright © 2018 www.massapicom. 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.