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


Java ArrayUtil.append方法代码示例

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


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

示例1: MyGraph

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
private MyGraph(@NotNull ControlFlow flow) {
  myFlow = flow;
  myInstructions = flow.getInstructions();
  for (Instruction instruction : myInstructions) {
    int fromIndex = instruction.getIndex();
    int[] to = next(fromIndex, myInstructions);
    for (int toIndex : to) {
      int[] froms = myIns.get(toIndex);
      if (froms == null) {
        froms = new int[]{fromIndex};
        myIns.put(toIndex, froms);
      }
      else {
        froms = ArrayUtil.append(froms, fromIndex);
        myIns.put(toIndex, froms);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:LoopAnalyzer.java

示例2: putOptionWithHelpId

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
private synchronized void putOptionWithHelpId(@NotNull String option,
                                              @NotNull final String id,
                                              @Nullable final String groupName,
                                              @Nullable String hit,
                                              @Nullable final String path) {
  if (isStopWord(option)) return;
  String stopWord = PorterStemmerUtil.stem(option);
  if (stopWord == null) return;
  if (isStopWord(stopWord)) return;

  long[] configs = myStorage.get(option);
  long packed = pack(id, hit, path, groupName);
  if (configs == null) {
    configs = new long[] {packed};
  }
  else {
    configs = ArrayUtil.indexOf(configs, packed) == -1 ? ArrayUtil.append(configs, packed) : configs;
  }
  myStorage.put(ByteArrayCharSequence.convertToBytesIfAsciiString(option), configs);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:SearchableOptionsRegistrarImpl.java

示例3: getBreakpointHandlers

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
public XBreakpointHandler<?>[] getBreakpointHandlers()
{
    final XBreakpointHandler<?>[] breakpointHandlers = super.getBreakpointHandlers();
    return ArrayUtil.append(breakpointHandlers, breakpointHandler);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:8,代码来源:WeaveDebugProcess.java

示例4: NonClasspathClassFinder

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
public NonClasspathClassFinder(Project project, String... fileExtensions) {
  myProject = project;
  myManager = PsiManager.getInstance(myProject);
  myFileExtensions = ArrayUtil.append(fileExtensions, "class");
  final MessageBusConnection connection = project.getMessageBus().connect(project);
  connection.subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener.Adapter() {
    @Override
    public void after(@NotNull List<? extends VFileEvent> events) {
      clearCache();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:NonClasspathClassFinder.java

示例5: addInstanceFilter

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
public void addInstanceFilter(long l) {
  InstanceFilter newFilter = InstanceFilter.create(String.valueOf(l));
  if (myInstanceFilters == null) {
    myInstanceFilters = new InstanceFilter[] {newFilter};
  }
  else {
    myInstanceFilters = ArrayUtil.append(myInstanceFilters, newFilter);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JavaBreakpointProperties.java

示例6: mergeOriginalPlacesFrom

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
public void mergeOriginalPlacesFrom(final BaseInjection injection, final boolean enabled) {
  for (InjectionPlace place : injection.getInjectionPlaces()) {
    if (!ArrayUtil.contains(place, myPlaces)) {
      myPlaces = ArrayUtil.append(myPlaces, enabled || !place.isEnabled() ? place : place.enabled(false), InjectionPlace.ARRAY_FACTORY);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:BaseInjection.java

示例7: compute

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
public Result<PsiReference[]> compute() {
  final PsiReference[] referencesImpl = getReferencesImpl(myAttribute);
  final Object[] refs = new PsiElement[referencesImpl.length];
  for (int i = 0; i < refs.length; i++) {
    refs[i] = referencesImpl[i].getElement();
  }
  return new Result<PsiReference[]>(referencesImpl, ArrayUtil.append(refs, myAttribute.getValueElement()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XsltReferenceProvider.java

示例8: getGroupPath

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Nullable
public String[] getGroupPath() {
  String name = getGroupDisplayName();
  if (name == null) return null;
  if (groupPath == null) {
    return new String[]{name.isEmpty() ? InspectionProfileEntry.GENERAL_GROUP_NAME : name};
  }
  return ArrayUtil.append(groupPath.split(","), name);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:InspectionEP.java

示例9: getJobDescriptors

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Override
@NotNull
public JobDescriptor[] getJobDescriptors(@NotNull GlobalInspectionContext context) {
  final JobDescriptor[] additionalJobs = getTool().getAdditionalJobs();
  if (additionalJobs == null) {
    return getTool().isGraphNeeded() ? context.getStdJobDescriptors().BUILD_GRAPH_ONLY : JobDescriptor.EMPTY_ARRAY;
  }
  else {
    return getTool().isGraphNeeded() ? ArrayUtil.append(additionalJobs, context.getStdJobDescriptors().BUILD_GRAPH) : additionalJobs;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GlobalInspectionToolWrapper.java

示例10: rearrangeOrderEntryOfType

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
private static int rearrangeOrderEntryOfType(ModifiableRootModel rootModel, Class<? extends OrderEntry> orderEntryClass) {
  OrderEntry[] orderEntries = rootModel.getOrderEntries();
  int moduleSourcesIdx = 0;
  for (OrderEntry orderEntry : orderEntries) {
    if (orderEntryClass.isAssignableFrom(orderEntry.getClass())) {
      break;
    }
    moduleSourcesIdx++;
  }
  orderEntries = ArrayUtil.append(orderEntries, orderEntries[moduleSourcesIdx]);
  orderEntries = ArrayUtil.remove(orderEntries, moduleSourcesIdx);
  rootModel.rearrangeOrderEntries(orderEntries);
  return orderEntries.length - 1;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:EclipseClasspathReader.java

示例11: createPresentation

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected PresentationData createPresentation() {
  return new PresentationData(){
    @NotNull
    @Override
    public Object[] getEqualityObjects() {
      return ArrayUtil.append(super.getEqualityObjects(), changed);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SliceNode.java

示例12: execute

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
public ExecutionResult execute(Executor executor, final CommandLinePatcher... patchers) throws ExecutionException {
  if (myConfig.showCommandLineAfterwards()) {
    if (executor.getId() == DefaultDebugExecutor.EXECUTOR_ID) {
      return super.execute(executor, ArrayUtil.append(patchers, new CommandLinePatcher() {
        @Override
        public void patchCommandLine(GeneralCommandLine commandLine) {
          commandLine.getParametersList().getParamsGroup(PythonCommandLineState.GROUP_DEBUGGER).addParameterAt(1, "--cmd-line");
        }
      }));
    }

    PydevConsoleRunner runner =
      new PythonScriptWithConsoleRunner(myConfig.getProject(), myConfig.getSdk(), PyConsoleType.PYTHON, myConfig.getWorkingDirectory(),
                                        myConfig.getEnvs(), patchers);

    runner.runSync();

    List<AnAction> actions = Lists.newArrayList(createActions(runner.getConsoleView(), runner.getProcessHandler()));

    return new DefaultExecutionResult(runner.getConsoleView(), runner.getProcessHandler(), actions.toArray(new AnAction[actions.size()]));
  }
  else {
    return super.execute(executor, patchers);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:PythonScriptCommandLineState.java

示例13: createActions

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected Action[] createActions() {
  Action[] result = {
    getHelpAction(),
    getOKAction(),
    getCancelAction()};
  if (myComponents.size() > 1) {
    return ArrayUtil.append(result, myCardAction);
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:MasterPasswordDialog.java

示例14: getBreakpointHandlers

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
public XBreakpointHandler<?>[] getBreakpointHandlers() {
  final XBreakpointHandler<?>[] breakpointHandlers = super.getBreakpointHandlers();
  return ArrayUtil.append(breakpointHandlers, muleBreakpointHandler);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:7,代码来源:MuleDebugProcess.java

示例15: getQuickFixes

import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Override
public LocalQuickFix[] getQuickFixes(ConvertContext context) {
  return ArrayUtil.append(super.getQuickFixes(context), new MyUpdateIndicesFix());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:MavenArtifactCoordinatesConverter.java


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