Package com.google.devtools.depan.model

Examples of com.google.devtools.depan.model.RelationshipSet


    setsViewer.addSelectionChangedListener(new ISelectionChangedListener() {

      @Override
      public void selectionChanged(SelectionChangedEvent event) {
        RelationshipSet set = extractFromSelection(event.getSelection());
        if (null == set) {
          return;
        }

        // Notify interested parties about the change
View Full Code Here


  }

  @Override
  public void marshal(Object source, HierarchicalStreamWriter writer,
      MarshallingContext context) {
    RelationshipSet relSet = (RelationshipSet) source;
    SourcePlugin plugin = findBuiltIn(relSet);
    if (null != plugin) {
      String entryId = SourcePluginRegistry.getInstance().getPluginId(plugin);
      writer.addAttribute(PLUGIN_ID, entryId);
      writer.addAttribute(REL_SET, relSet.getName());
    }
  }
View Full Code Here

    /**
     * Generate hash code based on name and path.
     */
    @Override
    public int hashCode() {
      RelationshipSet relSet = getRelSet();
      int hash = 1;
      hash = hash * 31 + (null == path ? 0 : path.hashCode());
      hash = hash * 31 + (null == relSet ? 0 : relSet.getName().hashCode());
      return hash;
    }
View Full Code Here

  private LayoutChoicesControl setupLayoutChoices(Composite parent) {
    LayoutChoicesControl result = new LayoutChoicesControl(
        parent, LayoutChoicesControl.Style.LINEAR);
    result.setLayoutChoices(LayoutGenerators.getLayoutNames(false));

    RelationshipSet selectedRelSet =
        graph.getDefaultAnalysis().getDefaultRelationshipSet();
    java.util.List<RelSetDescriptor> choices =
        RelSetDescriptors.buildGraphChoices(graph);
    result.setRelSetInput(selectedRelSet, choices);
View Full Code Here

  }

  private void setupHierarchyViewer(Composite parent) {
    hierarchyView = new HierarchyViewer<GraphNode>(parent, false);

    RelationshipSet selectedRelSet =
        graph.getDefaultAnalysis().getDefaultRelationshipSet();
    java.util.List<RelSetDescriptor> choices =
        RelSetDescriptors.buildGraphChoices(graph);
    hierarchyView.setInput(hierarchies, selectedRelSet, choices);
View Full Code Here

      throws IOException, CoreException {
    // TODO(leeca):  Is this configured with the correct XStream flavor?
    ObjectXmlPersist persist =
        new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
    Collection<RelationshipSet> updateSet = loadRelationshipSet(persist, file);
    RelationshipSet set = DefaultRelationshipSet.SET;
    updateSet.add(set);
    persist.save(file.getLocationURI(), updateSet);
    file.refreshLocal(IResource.DEPTH_ZERO, null);
  }
View Full Code Here

   * @param file a new file
   * @param setName the set name
   */
  private void newFileAndSet(IFile file, String setName)
      throws IOException, CoreException {
    RelationshipSet set = DefaultRelationshipSet.SET;

    Collection<RelationshipSet> collection = new ArrayList<RelationshipSet>();
    collection.add(set);

    // save data in the file
View Full Code Here

  /**
   * delete the currently selected set.
   */
  protected void deleteSelectedSet() {
    RelationshipSet set = (RelationshipSet)
        ((IStructuredSelection) setsList.getSelection()).getFirstElement();
    sets.remove(set);
    setsContentProvider.remove(set);

    setDirtyState(true);
View Full Code Here

  /**
   * @param text create a new set with the given name.
   */
  protected void createSet(String text) {
    RelationshipSet set = new RelationshipSetAdapter(text);
    sets.add(set);
    setsContentProvider.add(set);

    setDirtyState(true);
  }
View Full Code Here

  /**
   * update the relationship picker with the currently selected picker.
   * Happens when someone click on a given name in the setList.
   */
  protected void updatePicker() {
    RelationshipSet selected = (RelationshipSet)
        ((IStructuredSelection) setsList.getSelection()).getFirstElement();

    this.selectedSet = selected;
    relationshipPicker.selectRelationshipSet(selected);
  }
View Full Code Here

TOP

Related Classes of com.google.devtools.depan.model.RelationshipSet

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.