本文整理汇总了Java中com.intellij.ide.palette.PaletteGroup类的典型用法代码示例。如果您正苦于以下问题:Java PaletteGroup类的具体用法?Java PaletteGroup怎么用?Java PaletteGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PaletteGroup类属于com.intellij.ide.palette包,在下文中一共展示了PaletteGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getActiveGroups
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public PaletteGroup[] getActiveGroups(VirtualFile vFile) {
if (vFile.getFileType().equals(StdFileTypes.GUI_DESIGNER_FORM)) {
Palette palette = Palette.getInstance(myProject);
if (myListener == null) {
myListener = new Palette.Listener() {
@Override
public void groupsChanged(Palette palette) {
fireGroupsChanged();
}
};
palette.addListener(myListener);
}
return palette.getToolWindowGroups();
}
return PaletteGroup.EMPTY_ARRAY;
}
示例2: collectCurrentGroups
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private ArrayList<PaletteGroup> collectCurrentGroups(@Nullable VirtualFile selectedFile) {
ArrayList<PaletteGroup> result = new ArrayList<PaletteGroup>();
if (selectedFile == null) {
VirtualFile[] editedFiles = FileEditorManager.getInstance(myProject).getSelectedFiles();
if (editedFiles.length > 0) {
selectedFile = editedFiles[0];
}
}
if (selectedFile != null) {
for (PaletteItemProvider provider : myProviders) {
PaletteGroup[] groups = provider.getActiveGroups(selectedFile);
Collections.addAll(result, groups);
}
}
return result;
}
示例3: refreshPaletteIfChanged
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public void refreshPaletteIfChanged(@Nullable GuiEditor designer)
{
removePaletteProviderListener();
myDesigner = designer;
if(designer != null)
{
addPaletteProviderListener();
}
VirtualFile file = designer == null ? null : designer.getFile();
Set<PaletteGroup> currentGroups = new HashSet<PaletteGroup>(collectCurrentGroups(file));
if(!currentGroups.equals(myGroups))
{
refreshPalette(file);
}
}
示例4: updateJavaParameters
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
@Override
public void updateJavaParameters(RunConfigurationBase configuration, JavaParameters params, RunnerSettings runnerSettings) {
if (!isApplicableFor(configuration)) {
return;
}
ApplicationConfiguration appConfiguration = (ApplicationConfiguration) configuration;
SnapShooterConfigurationSettings settings = appConfiguration.getUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY);
if (settings == null) {
settings = new SnapShooterConfigurationSettings();
appConfiguration.putUserData(SnapShooterConfigurationSettings.SNAP_SHOOTER_KEY, settings);
}
if (appConfiguration.ENABLE_SWING_INSPECTOR) {
settings.setLastPort(NetUtils.tryToFindAvailableSocketPort());
}
if (appConfiguration.ENABLE_SWING_INSPECTOR && settings.getLastPort() != -1) {
params.getProgramParametersList().prepend(appConfiguration.MAIN_CLASS_NAME);
params.getProgramParametersList().prepend(Integer.toString(settings.getLastPort()));
// add +1 because idea_rt.jar will be added as the last entry to the classpath
params.getProgramParametersList().prepend(Integer.toString(params.getClassPath().getPathList().size() + 1));
Set<String> paths = new TreeSet<String>();
paths.add(PathUtil.getJarPathForClass(SnapShooter.class)); // ui-designer-impl
paths.add(PathUtil.getJarPathForClass(BaseComponent.class)); // appcore-api
paths.add(PathUtil.getJarPathForClass(ProjectComponent.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LwComponent.class)); // UIDesignerCore
paths.add(PathUtil.getJarPathForClass(GridConstraints.class)); // forms_rt
paths.add(PathUtil.getJarPathForClass(PaletteGroup.class)); // openapi
paths.add(PathUtil.getJarPathForClass(LafManagerListener.class)); // ui-impl
paths.add(PathUtil.getJarPathForClass(DataProvider.class)); // action-system-openapi
paths.add(PathUtil.getJarPathForClass(XmlStringUtil.class)); // idea
paths.add(PathUtil.getJarPathForClass(Navigatable.class)); // pom
paths.add(PathUtil.getJarPathForClass(AreaInstance.class)); // extensions
paths.add(PathUtil.getJarPathForClass(FormLayout.class)); // jgoodies
paths.addAll(PathManager.getUtilClassPath());
for(String path: paths) {
params.getClassPath().addFirst(path);
}
params.setMainClass("com.intellij.uiDesigner.snapShooter.SnapShooter");
}
}
示例5: refreshPaletteIfChanged
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public void refreshPaletteIfChanged(@Nullable GuiEditor designer) {
removePaletteProviderListener();
myDesigner = designer;
if (designer != null) {
addPaletteProviderListener();
}
VirtualFile file = designer == null ? null : designer.getFile();
Set<PaletteGroup> currentGroups = new HashSet<PaletteGroup>(collectCurrentGroups(file));
if (!currentGroups.equals(myGroups)) {
refreshPalette(file);
}
}
示例6: addGroupToControl
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private void addGroupToControl(PaletteGroup group, JComponent control) {
PaletteGroupHeader groupHeader = new PaletteGroupHeader(this, group);
myGroupHeaders.add(groupHeader);
myGroups.add(group);
control.add(groupHeader);
PaletteComponentList componentList = new PaletteComponentList(myProject, this, group);
control.add(componentList);
groupHeader.setComponentList(componentList);
componentList.addListSelectionListener(myListSelectionListener);
}
示例7: collectTabNames
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private static String[] collectTabNames(final Collection<PaletteGroup> groups) {
Set<String> result = new TreeSet<String>();
for (PaletteGroup group : groups) {
result.add(group.getTabName());
}
return ArrayUtil.toStringArray(result);
}
示例8: collectCurrentGroups
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private ArrayList<PaletteGroup> collectCurrentGroups(@Nullable VirtualFile selectedFile) {
ArrayList<PaletteGroup> result = new ArrayList<PaletteGroup>();
if (selectedFile != null) {
for (PaletteItemProvider provider : myProviders) {
PaletteGroup[] groups = provider.getActiveGroups(selectedFile);
Collections.addAll(result, groups);
}
}
return result;
}
示例9: addGroupToControl
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private void addGroupToControl(PaletteGroup group, JComponent control) {
PaletteGroupHeader groupHeader = new PaletteGroupHeader(this, group);
myGroupHeaders.add(groupHeader);
myGroups.add(group);
control.add(groupHeader);
PaletteComponentList componentList = new PaletteComponentList(myProject, group);
control.add(componentList);
groupHeader.setComponentList(componentList);
componentList.addListSelectionListener(myListSelectionListener);
}
示例10: addGroupToControl
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private void addGroupToControl(PaletteGroup group, JComponent control)
{
PaletteGroupHeader groupHeader = new PaletteGroupHeader(this, group);
myGroupHeaders.add(groupHeader);
myGroups.add(group);
control.add(groupHeader);
PaletteComponentList componentList = new PaletteComponentList(myProject, this, group);
control.add(componentList);
groupHeader.setComponentList(componentList);
componentList.addListSelectionListener(myListSelectionListener);
}
示例11: collectTabNames
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private static String[] collectTabNames(final Collection<PaletteGroup> groups)
{
Set<String> result = new TreeSet<String>();
for(PaletteGroup group : groups)
{
result.add(group.getTabName());
}
return ArrayUtil.toStringArray(result);
}
示例12: collectCurrentGroups
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
private ArrayList<PaletteGroup> collectCurrentGroups(@Nullable VirtualFile selectedFile)
{
ArrayList<PaletteGroup> result = new ArrayList<PaletteGroup>();
if(selectedFile != null)
{
for(PaletteItemProvider provider : myProviders)
{
PaletteGroup[] groups = provider.getActiveGroups(selectedFile);
Collections.addAll(result, groups);
}
}
return result;
}
示例13: getGroup
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public PaletteGroup getGroup() {
return myGroup;
}
示例14: refreshPaletteIfChanged
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public void refreshPaletteIfChanged(VirtualFile selectedFile) {
Set<PaletteGroup> currentGroups = new HashSet<PaletteGroup>(collectCurrentGroups(selectedFile));
if (!currentGroups.equals(myGroups)) {
refreshPalette(selectedFile);
}
}
示例15: getActiveGroups
import com.intellij.ide.palette.PaletteGroup; //导入依赖的package包/类
public PaletteGroup[] getActiveGroups(VirtualFile vFile) {
if (vFile.getFileType().equals(GuiFormFileType.INSTANCE)) {
return myPalette.getToolWindowGroups();
}
return PaletteGroup.EMPTY_ARRAY;
}