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


Java ObjectUtils.assertNotNull方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GitPushSupport.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:VcsDirectoryConfigurationPanel.java

示例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;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TrelloRepository.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ResourceVersions.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:GitUpdater.java

示例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));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:EventLog.java

示例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;
                                                                        }
                                                                      }));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GitPushOperationBaseTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:GitImpl.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ContextComputationProcessor.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:CommandUtil.java

示例11: getUserHomePath

import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
public static String getUserHomePath() {
  return ObjectUtils.assertNotNull(getGlobalSystemMacroValue(USER_HOME_NAME));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:PathMacroUtil.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:TrelloRepository.java

示例13: getOwner

import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@NotNull
private PsiModifierListOwner getOwner() {
  return ObjectUtils.assertNotNull(AddAnnotationPsiFix.getContainer(myFixture.getFile(), myFixture.getCaretOffset()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AddAnnotationFixTest.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:VcsLogRefresherTest.java

示例15: getThrowsList

import com.intellij.util.ObjectUtils; //导入方法依赖的package包/类
@Override
@NotNull
public PsiReferenceList getThrowsList() {
  return ObjectUtils.assertNotNull(getStubOrPsiChild(GroovyElementTypes.THROW_CLAUSE));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:GrMethodBaseImpl.java


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