當前位置: 首頁>>代碼示例>>Java>>正文


Java TreeBasedStructureViewBuilder類代碼示例

本文整理匯總了Java中com.intellij.ide.structureView.TreeBasedStructureViewBuilder的典型用法代碼示例。如果您正苦於以下問題:Java TreeBasedStructureViewBuilder類的具體用法?Java TreeBasedStructureViewBuilder怎麽用?Java TreeBasedStructureViewBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TreeBasedStructureViewBuilder類屬於com.intellij.ide.structureView包,在下文中一共展示了TreeBasedStructureViewBuilder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new AppleScriptStructureViewModel(psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return true;
    }
  };
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:17,代碼來源:AppleScriptStructureViewFactory.java

示例2: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        @Override
        public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
            return new ProtoStructureViewModel((ProtoPsiFileRoot) psiFile, editor);
        }

        @Override
        public boolean isRootNodeShown() {
            return false;
        }
    };
}
 
開發者ID:protostuff,項目名稱:protobuf-jetbrains-plugin,代碼行數:17,代碼來源:ProtoStructureViewFactory.java

示例3: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
@Nullable
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof PsiJavaFile)) return null;
  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new JavaFileTreeModel((PsiJavaFile)psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return false;
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:JavaStructureViewBuilderFactory.java

示例4: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
@Nullable
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof XmlFile)) {
    return null;
  }
  StructureViewBuilder builder = getStructureViewBuilderForExtensions(psiFile);
  if (builder != null) {
    return builder;
  }

  for (XmlStructureViewBuilderProvider xmlStructureViewBuilderProvider : getStructureViewBuilderProviders()) {
    final StructureViewBuilder structureViewBuilder = xmlStructureViewBuilderProvider.createStructureViewBuilder((XmlFile)psiFile);
    if (structureViewBuilder != null) {
      return structureViewBuilder;
    }
  }

  return new TreeBasedStructureViewBuilder() {
    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new XmlStructureViewTreeModel((XmlFile)psiFile, editor);
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:27,代碼來源:XmlStructureViewBuilderFactory.java

示例5: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file) {
  if (file.getViewProvider().getFileType() != HtmlFileType.INSTANCE) return null;

  return new TreeBasedStructureViewBuilder() {
    @Override
    public boolean isRootNodeShown() {
      return false;
    }

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HtmlStructureViewTreeModel(file, editor);
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:HtmlStructureViewBuilderProvider.java

示例6: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  return new TreeBasedStructureViewBuilder() {

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new JavaFileTreeModel((GroovyFileBase)psiFile, editor) {
        @NotNull
        @Override
        public Collection<NodeProvider> getNodeProviders() {
          return Arrays.<NodeProvider>asList(new JavaInheritedMembersNodeProvider());
        }
      };
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:18,代碼來源:GroovyStructureViewFactory.java

示例7: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file) {
  if (file.getViewProvider().getVirtualFile().getFileType() != HtmlFileType.INSTANCE) return null;

  return new TreeBasedStructureViewBuilder() {
    @Override
    public boolean isRootNodeShown() {
      return false;
    }

    @Override
    @NotNull
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HtmlStructureViewTreeModel(file, editor);
    }
  };
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:19,代碼來源:HtmlStructureViewBuilderProvider.java

示例8: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
	return new TemplateLanguageStructureViewBuilder(psiFile) {
		@Override
		protected StructureViewComposite.StructureViewDescriptor createMainView(FileEditor fileEditor, PsiFile mainFile) {
			StructureView mainView = (new TreeBasedStructureViewBuilder() {
				@NotNull
				public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
					return new StructureViewModelBase(psiFile, editor, new LatteStructureViewTreeElement(psiFile));
				}
			}).createStructureView(fileEditor, mainFile.getProject());
			return new StructureViewComposite.StructureViewDescriptor("Latte", mainView, mainFile.getFileType().getIcon());
		}
	};
}
 
開發者ID:JanTvrdik,項目名稱:intellij-latte,代碼行數:17,代碼來源:LatteStructureViewFactory.java

示例9: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
/**
 * construct view builder
 *
 * @param xmlFile xml file
 * @return structure view builder
 */
@Nullable public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile xmlFile) {
    final DomFileElement fileElement = getFileElement(xmlFile);
    if (fileElement == null) {
        return null;
    }
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        public StructureView createStructureView(final FileEditor fileEditor, final Project project) {
            return new StructureViewComponent(fileEditor, createStructureViewModel(), project);
        }

        @NotNull
        public StructureViewModel createStructureViewModel() {
            return new SqlMapConfigStructureViewTreeModel(xmlFile, fileElement.getRootElement());
        }
    };
}
 
開發者ID:code4craft,項目名稱:ibatis-plugin,代碼行數:24,代碼來源:SqlMapConfigStructureViewBuilderProvider.java

示例10: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
/**
 * construct view builder
 *
 * @param xmlFile xml file
 * @return structure view builder
 */
@Nullable public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile xmlFile) {
    final DomFileElement fileElement = getFileElement(xmlFile);
    if (fileElement == null) {
        return null;
    }
    return new TreeBasedStructureViewBuilder() {
        @NotNull
        public StructureView createStructureView(final FileEditor fileEditor, final Project project) {
            return new StructureViewComponent(fileEditor, createStructureViewModel(), project);
        }

        @NotNull
        public StructureViewModel createStructureViewModel() {
            return new SqlMapStructureViewTreeModel(xmlFile, fileElement.getRootElement());
        }
    };
}
 
開發者ID:code4craft,項目名稱:ibatis-plugin,代碼行數:24,代碼來源:SqlMapStructureViewBuilderProvider.java

示例11: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Nullable
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	if(psiFile instanceof CSharpFileImpl)
	{
		return new TreeBasedStructureViewBuilder()
		{
			@NotNull
			@Override
			public StructureViewModel createStructureViewModel(@Nullable Editor editor)
			{
				return new CSharpStructureViewModel(psiFile);
			}
		};
	}
	else
	{
		return null;
	}
}
 
開發者ID:consulo,項目名稱:consulo-csharp,代碼行數:22,代碼來源:CSharpStructureViewFactory.java

示例12: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
  if (!(psiFile instanceof HaxeFile)) {
    return null;
  }
  return new TreeBasedStructureViewBuilder() {
    @NotNull
    @Override
    public StructureViewModel createStructureViewModel(@Nullable Editor editor) {
      return new HaxeStructureViewModel(psiFile, editor);
    }

    @Override
    public boolean isRootNodeShown() {
      return false;
    }
  };
}
 
開發者ID:HaxeFoundation,項目名稱:intellij-haxe,代碼行數:19,代碼來源:HaxeStructureViewFactory.java

示例13: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	return new TreeBasedStructureViewBuilder()
	{
		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new HaxeStructureViewModel(psiFile);
		}

		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}
	};
}
 
開發者ID:consulo,項目名稱:consulo-haxe,代碼行數:20,代碼來源:HaxeStructureViewFactory.java

示例14: getStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile)
{
	return new TreeBasedStructureViewBuilder()
	{
		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new ThriftStructureViewModel(psiFile);
		}

		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}
	};
}
 
開發者ID:consulo,項目名稱:consulo-apache-thrift,代碼行數:20,代碼來源:ThriftStructureViewFactory.java

示例15: createStructureViewBuilder

import com.intellij.ide.structureView.TreeBasedStructureViewBuilder; //導入依賴的package包/類
@Override
@Nullable
public StructureViewBuilder createStructureViewBuilder(@NotNull final XmlFile file)
{
	if(file.getViewProvider().getVirtualFile().getFileType() != HtmlFileType.INSTANCE)
	{
		return null;
	}

	return new TreeBasedStructureViewBuilder()
	{
		@Override
		public boolean isRootNodeShown()
		{
			return false;
		}

		@Override
		@NotNull
		public StructureViewModel createStructureViewModel(@Nullable Editor editor)
		{
			return new HtmlStructureViewTreeModel(file, editor);
		}
	};
}
 
開發者ID:consulo,項目名稱:consulo-xml,代碼行數:26,代碼來源:HtmlStructureViewBuilderProvider.java


注:本文中的com.intellij.ide.structureView.TreeBasedStructureViewBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。