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


Java PaletteGroup類代碼示例

本文整理匯總了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;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:UIDesignerPaletteProvider.java

示例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;
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:17,代碼來源:PaletteWindow.java

示例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);
	}
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:17,代碼來源:PaletteWindow.java

示例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");
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:41,代碼來源:SnapShooterConfigurationExtension.java

示例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);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:14,代碼來源:PaletteWindow.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:PaletteWindow.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:PaletteWindow.java

示例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;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:PaletteWindow.java

示例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);
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:11,代碼來源:PaletteWindow.java

示例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);
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:12,代碼來源:PaletteWindow.java

示例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);
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:10,代碼來源:PaletteWindow.java

示例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;
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:14,代碼來源:PaletteWindow.java

示例13: getGroup

import com.intellij.ide.palette.PaletteGroup; //導入依賴的package包/類
public PaletteGroup getGroup() {
  return myGroup;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PaletteGroupHeader.java

示例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);
  }
}
 
開發者ID:lshain-android-source,項目名稱:tools-idea,代碼行數:7,代碼來源:PaletteWindow.java

示例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;
}
 
開發者ID:consulo,項目名稱:consulo-ui-designer,代碼行數:7,代碼來源:UIDesignerPaletteProvider.java


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