本文整理汇总了Java中com.intellij.psi.codeStyle.PackageEntryTable.getEntryCount方法的典型用法代码示例。如果您正苦于以下问题:Java PackageEntryTable.getEntryCount方法的具体用法?Java PackageEntryTable.getEntryCount怎么用?Java PackageEntryTable.getEntryCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.psi.codeStyle.PackageEntryTable
的用法示例。
在下文中一共展示了PackageEntryTable.getEntryCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPackageToPackages
import com.intellij.psi.codeStyle.PackageEntryTable; //导入方法依赖的package包/类
private static void addPackageToPackages(JBTable table, PackageEntryTable list) {
int selected = table.getSelectedRow() + 1;
if (selected < 0) {
selected = list.getEntryCount();
}
PackageEntry entry = new PackageEntry(false, "", true);
list.insertEntryAt(entry, selected);
ImportLayoutPanel.refreshTableModel(selected, table);
}
示例2: removeEntryFromPackages
import com.intellij.psi.codeStyle.PackageEntryTable; //导入方法依赖的package包/类
private static void removeEntryFromPackages(JBTable table, PackageEntryTable list) {
int selected = table.getSelectedRow();
if (selected < 0) return;
TableUtil.stopEditing(table);
list.removeEntryAt(selected);
AbstractTableModel model = (AbstractTableModel)table.getModel();
model.fireTableRowsDeleted(selected, selected);
if (selected >= list.getEntryCount()) {
selected--;
}
if (selected >= 0) {
table.setRowSelectionInterval(selected, selected);
}
}
示例3: isModified
import com.intellij.psi.codeStyle.PackageEntryTable; //导入方法依赖的package包/类
private static boolean isModified(PackageEntryTable list, PackageEntryTable table) {
if (list.getEntryCount() != table.getEntryCount()) {
return true;
}
for (int i = 0; i < list.getEntryCount(); i++) {
PackageEntry entry1 = list.getEntryAt(i);
PackageEntry entry2 = table.getEntryAt(i);
if (!entry1.equals(entry2)) {
return true;
}
}
return false;
}