本文整理汇总了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);
}
}
}
}
示例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);
}
示例3: getBreakpointHandlers
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
public XBreakpointHandler<?>[] getBreakpointHandlers()
{
final XBreakpointHandler<?>[] breakpointHandlers = super.getBreakpointHandlers();
return ArrayUtil.append(breakpointHandlers, breakpointHandler);
}
示例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();
}
});
}
示例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);
}
}
示例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);
}
}
}
示例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()));
}
示例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);
}
示例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;
}
}
示例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;
}
示例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);
}
};
}
示例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);
}
}
示例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;
}
示例14: getBreakpointHandlers
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
@Override
public XBreakpointHandler<?>[] getBreakpointHandlers() {
final XBreakpointHandler<?>[] breakpointHandlers = super.getBreakpointHandlers();
return ArrayUtil.append(breakpointHandlers, muleBreakpointHandler);
}
示例15: getQuickFixes
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Override
public LocalQuickFix[] getQuickFixes(ConvertContext context) {
return ArrayUtil.append(super.getQuickFixes(context), new MyUpdateIndicesFix());
}