Package org.apache.sling.ide.eclipse.ui.nav.model

Examples of org.apache.sling.ide.eclipse.ui.nav.model.SyncDir


  }

  private Object[] projectGetChildren(IProject parentElement) {
    IFolder syncDir = getSyncDir(parentElement);
    if (syncDir!=null && syncDir.exists()) {
      return new Object[] {new SyncDir(syncDir)};
    }
    return null;
  }
View Full Code Here


  @Override
  public Object getParent(Object element) {
    if (!(element instanceof JcrNode)) {
      return null;
    } else if (element instanceof SyncDir) {
      SyncDir syncDir = (SyncDir) element;
      return syncDir.getFolder().getProject();
    }
    JcrNode node = (JcrNode) element;
    return node.getParent();
  }
View Full Code Here

        // instantiate the content provider
        JcrContentContentProvider contentProvider = new JcrContentContentProvider();

        // directly create the root node
        SyncDir syncDirNode = new SyncDir((IFolder) contentProject.findMember("jcr_root"));

        // test children of '/'
        Object[] children = contentProvider.getChildren(syncDirNode);
        assertChildrenHavePaths(children, "/content");
View Full Code Here

        // instantiate the content provider
        JcrContentContentProvider contentProvider = new JcrContentContentProvider();

        // directly create the root node
        SyncDir syncDirNode = new SyncDir((IFolder) contentProject.findMember("jcr_root"));

        // test children of '/'
        Object[] children = contentProvider.getChildren(syncDirNode);
        assertChildrenHavePaths(children, "/content");
View Full Code Here

    void refreshContent() {
        final Object input = viewer.getInput();
        if (input!=null && input instanceof JcrNode) {
            JcrNode jcrnode = (JcrNode)input;
            SyncDir syncDir = jcrnode.getSyncDir();
            JcrNode newnode = syncDir.getNode(jcrnode.getJcrPath());
            if (newnode!=null) {
                viewer.setInput(newnode);
                if (lastEditedNewPropertyName!=null) {
                    // set the selection/focus accordingly
                   
View Full Code Here

        // create .content.xml structure
        InputStream contentXml = getClass().getResourceAsStream("content-nested-structure.xml");
        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), contentXml);

        // directly create the root node
        syncDirNode = new SyncDir((IFolder) contentProject.findMember("jcr_root"));

    }
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.eclipse.ui.nav.model.SyncDir

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.