本文整理汇总了Java中com.intellij.util.ObjectUtils.assertNotNull方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectUtils.assertNotNull方法的具体用法?Java ObjectUtils.assertNotNull怎么用?Java ObjectUtils.assertNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ObjectUtils
的用法示例。
在下文中一共展示了ObjectUtils.assertNotNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GitPushSupport
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@SuppressWarnings("UnusedDeclaration")
private GitPushSupport(@NotNull Project project, @NotNull GitRepositoryManager repositoryManager) {
myRepositoryManager = repositoryManager;
myVcs = ObjectUtils.assertNotNull(GitVcs.getInstance(project));
mySettings = GitVcsSettings.getInstance(project);
myPusher = new GitPusher(project, mySettings, this);
myOutgoingCommitsProvider = new GitOutgoingCommitsProvider(project);
mySharedSettings = ServiceManager.getService(project, GitSharedSettings.class);
myCommonPushSettings = ServiceManager.getService(project, PushSettings.class);
}
示例2: editMapping
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
private void editMapping() {
Collection<AbstractVcs> activeVcses = getActiveVcses();
VcsMappingConfigurationDialog dlg = new VcsMappingConfigurationDialog(myProject, VcsBundle.message("directory.mapping.remove.title"));
VcsDirectoryMapping mapping = ObjectUtils.assertNotNull(myDirectoryMappingTable.getSelectedObject()).mapping;
dlg.setMapping(mapping);
if (dlg.showAndGet()) {
dlg.saveToMapping(mapping);
myModel.fireTableDataChanged();
checkNotifyListeners(activeVcses);
}
}
示例3: fetchBoardById
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public TrelloBoard fetchBoardById(@NotNull String id) throws Exception {
final URIBuilder url = new URIBuilder(getRestApiUrl("boards", id))
.addParameter("fields", TrelloBoard.REQUIRED_FIELDS);
try {
return ObjectUtils.assertNotNull(makeRequestAndDeserializeJsonResponse(url.build(), TrelloBoard.class));
}
catch (Exception e) {
LOG.warn("Error while fetching initial board info", e);
throw e;
}
}
示例4: getVersion
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private static String getVersion(@NotNull IdeaPluginDescriptor plugin) {
if (!plugin.isBundled()) return ObjectUtils.assertNotNull(plugin.getVersion());
ApplicationInfo appInfo = ApplicationInfo.getInstance();
BuildNumber build = appInfo.getBuild();
if (!build.isSnapshot()) return build.asStringWithAllDetails();
// There is no good way to decide whether to update resources or not when switching to a different development build.
return build.getProductCode() + "-" + build.getBaselineVersion() + "-" + appInfo.getBuildDate().getTimeInMillis();
}
示例5: GitUpdater
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
protected GitUpdater(@NotNull Project project, @NotNull Git git, @NotNull VirtualFile root,
@NotNull Map<VirtualFile, GitBranchPair> trackedBranches, @NotNull ProgressIndicator progressIndicator,
@NotNull UpdatedFiles updatedFiles) {
myProject = project;
myGit = git;
myRoot = root;
myTrackedBranches = trackedBranches;
myProgressIndicator = progressIndicator;
myUpdatedFiles = updatedFiles;
myVcsHelper = AbstractVcsHelper.getInstance(project);
myVcs = GitVcs.getInstance(project);
myRepositoryManager = GitUtil.getRepositoryManager(myProject);
myRepository = ObjectUtils.assertNotNull(myRepositoryManager.getRepositoryForRoot(myRoot));
}
示例6: navigate
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@Override
public void navigate(Project project) {
NotificationListener listener = myNotification.getListener();
if (listener != null) {
EventLogConsole console = ObjectUtils.assertNotNull(getProjectComponent(project).getConsole(myNotification));
JComponent component = console.getConsoleEditor().getContentComponent();
listener.hyperlinkUpdate(myNotification, IJSwingUtilities.createHyperlinkEvent(myHref, component));
}
}
示例7: findGitPushSupport
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private GitPushSupport findGitPushSupport() {
return (GitPushSupport)ObjectUtils.assertNotNull(ContainerUtil.find(Extensions.getExtensions(PushSupport.PUSH_SUPPORT_EP, myProject),
new Condition<PushSupport<?, ?, ?>>() {
@Override
public boolean value(PushSupport<?, ?, ?> support) {
return support instanceof GitPushSupport;
}
}));
}
示例8: runAll
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private static GitCommandResult runAll(@NotNull List<Computable<GitCommandResult>> commands) {
if (commands.isEmpty()) {
LOG.error("List of commands should not be empty", new Exception());
return GitCommandResult.error("Internal error");
}
GitCommandResult compoundResult = null;
for (Computable<GitCommandResult> command : commands) {
compoundResult = GitCommandResult.merge(compoundResult, command.compute());
}
return ObjectUtils.assertNotNull(compoundResult);
}
示例9: collectOperands
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public static List<Object> collectOperands(@NotNull final String prefix, final String suffix, final Ref<Boolean> unparsable, final PsiElement[] operands) {
final ArrayList<Object> result = new ArrayList<Object>();
final ContextComputationProcessor processor = new ContextComputationProcessor(operands[0].getProject());
addStringFragment(prefix, result);
PsiElement topParent = ObjectUtils.assertNotNull(PsiTreeUtil.findCommonParent(operands));
processor.collectOperands(getTopLevelInjectionTarget(topParent), result, unparsable);
addStringFragment(suffix, result);
return result;
}
示例10: requireExistingParent
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public static File requireExistingParent(@NotNull File file) {
File result = findExistingParent(file);
if (result == null) {
LOG.error("Existing parent not found for " + file.getAbsolutePath());
}
return ObjectUtils.assertNotNull(result);
}
示例11: getUserHomePath
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public static String getUserHomePath() {
return ObjectUtils.assertNotNull(getGlobalSystemMacroValue(USER_HOME_NAME));
}
示例12: makeRequestAndDeserializeJsonResponse
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private <T> List<T> makeRequestAndDeserializeJsonResponse(@NotNull URI url, @NotNull TypeToken<List<T>> type) throws Exception {
final List<T> result = executeMethod(new HttpGet(url), new GsonMultipleObjectsDeserializer<T>(TrelloUtil.GSON, type));
return ObjectUtils.assertNotNull(result);
}
示例13: getOwner
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private PsiModifierListOwner getOwner() {
return ObjectUtils.assertNotNull(AddAnnotationPsiFix.getContainer(myFixture.getFile(), myFixture.getCaretOffset()));
}
示例14: get
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public DataPack get(long timeout, @NotNull TimeUnit timeUnit) throws InterruptedException {
return ObjectUtils.assertNotNull(myQueue.poll(timeout, timeUnit));
}
示例15: getThrowsList
import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@Override
@NotNull
public PsiReferenceList getThrowsList() {
return ObjectUtils.assertNotNull(getStubOrPsiChild(GroovyElementTypes.THROW_CLAUSE));
}