本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例7: getClassToBindName
import com.intellij.uiDesigner.lw.LwRootContainer; //导入方法依赖的package包/类
@Override
public String getClassToBindName(LwRootContainer container) {
return container.getClassToBind();
}