当前位置: 首页>>代码示例>>Java>>正文


Java LwRootContainer.getClassToBind方法代码示例

本文整理汇总了Java中com.intellij.uiDesigner.lw.LwRootContainer.getClassToBind方法的典型用法代码示例。如果您正苦于以下问题:Java LwRootContainer.getClassToBind方法的具体用法?Java LwRootContainer.getClassToBind怎么用?Java LwRootContainer.getClassToBind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.uiDesigner.lw.LwRootContainer的用法示例。


在下文中一共展示了LwRootContainer.getClassToBind方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBoundClassName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
public String getBoundClassName(final VirtualFile formFile) throws Exception
{
	File file = VfsUtil.virtualToIoFile(formFile);
	String classToBind = getSavedBinding(file);
	if(classToBind == null)
	{
		final Document doc = FileDocumentManager.getInstance().getDocument(formFile);
		final LwRootContainer rootContainer = Utils.getRootContainer(doc.getText(), null);
		classToBind = rootContainer.getClassToBind();
	}
	if(classToBind != null)
	{
		updateCache(file, classToBind);
	}
	return classToBind;
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:17,代码来源:BindingsCache.java

示例2: getClassToBindName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
public String getClassToBindName(LwRootContainer container) {
  final String className = container.getClassToBind();
  for (File outputRoot : myOutputRoots) {
    final String result = getJVMClassName(outputRoot, className.replace('.', '/'));
    if (result != null) {
      return result.replace('/', '.');
    }
  }
  return className;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:FormsInstrumenter.java

示例3: saveNestedForm

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
private boolean saveNestedForm() {
  VirtualFile formFile = ResourceFileUtil.findResourceFileInProject(myProject, myTfNestedForm.getText());
  if (formFile == null) {
    Messages.showErrorDialog(getWindow(), UIDesignerBundle.message("add.component.cannot.load.form", myTfNestedForm.getText()), CommonBundle.getErrorTitle());
    return false;
  }
  LwRootContainer lwRootContainer;
  try {
    lwRootContainer = Utils.getRootContainer(formFile.getInputStream(), null);
  }
  catch (Exception e) {
    Messages.showErrorDialog(getWindow(), e.getMessage(), CommonBundle.getErrorTitle());
    return false;
  }
  if (lwRootContainer.getClassToBind() == null) {
    Messages.showErrorDialog(getWindow(), UIDesignerBundle.message("add.component.form.not.bound"), CommonBundle.getErrorTitle());
    return false;
  }
  if (lwRootContainer.getComponent(0).getBinding() == null) {
    Messages.showErrorDialog(getWindow(), UIDesignerBundle.message("add.component.root.not.bound"),
                             CommonBundle.getErrorTitle());
    return false;
  }
  PsiClass psiClass =
    JavaPsiFacade.getInstance(myProject).findClass(lwRootContainer.getClassToBind(), GlobalSearchScope.projectScope(myProject));
  if (psiClass != null) {
    myItemToBeEdited.setClassName(getClassOrInnerName(psiClass));
  }
  else {
    myItemToBeEdited.setClassName(lwRootContainer.getClassToBind());
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ComponentItemDialog.java

示例4: getClassToBindName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
public String getClassToBindName(LwRootContainer container) {
  PsiClass psiClass =
    JavaPsiFacade.getInstance(myModule.getProject()).findClass(container.getClassToBind(), myModule.getModuleWithDependenciesScope());
  if (psiClass != null) {
    return ClassUtil.getJVMClassName(psiClass);
  }

  return container.getClassToBind();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:PsiNestedFormLoader.java

示例5: getBoundClassName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
public String getBoundClassName(final VirtualFile formFile) throws Exception {
  String classToBind = getSavedBinding(formFile);
  if (classToBind == null) {
    final Document doc = FileDocumentManager.getInstance().getDocument(formFile);
    final LwRootContainer rootContainer = Utils.getRootContainer(doc.getText(), null);
    classToBind = rootContainer.getClassToBind();
  }
  if (classToBind != null) {
    updateCache(formFile, classToBind);
  }
  return classToBind;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:BindingsCache.java

示例6: getClassToBindName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
public String getClassToBindName(LwRootContainer container) {
  final String className = container.getClassToBind();
  String result = getClassOrInnerName(className.replace('.', '/'));
  if (result != null) return result.replace('/', '.');
  return className;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:Javac2.java

示例7: getClassToBindName

import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
@Override
public String getClassToBindName(LwRootContainer container) {
  return container.getClassToBind();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AsmCodeGeneratorTest.java


注:本文中的com.intellij.uiDesigner.lw.LwRootContainer.getClassToBind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。