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


Java BitUtil.set方法代码示例

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


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

示例1: buildToBytecode

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
@Override
public void buildToBytecode(ClassWriter parent)
{
	int access = 0;
	access = BitUtil.set(access, Opcodes.ACC_STATIC, myModifiers.contains(PsiModifier.STATIC));
	access = BitUtil.set(access, Opcodes.ACC_PUBLIC, myModifiers.contains(PsiModifier.PUBLIC));

	StringBuilder descBuilder = new StringBuilder();
	descBuilder.append("(");
	for(JavaParameterStubBuilder parameter : myParameters)
	{
		appendType(parameter.getType(), descBuilder);
	}
	descBuilder.append(")");
	appendType(myReturnType, descBuilder);

	try
	{
		parent.visitMethod(access, myName, descBuilder.toString(), null, null).visitEnd();
	}
	catch(Exception e)
	{
		e.printStackTrace();
	}
}
 
开发者ID:consulo,项目名称:consulo-ikvm,代码行数:26,代码来源:JavaMethodStubBuilder.java

示例2: createTextAttributes

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
@Nonnull
public static GwtTextAttributes createTextAttributes(TextAttributes textAttributes) {
  GwtColor foreground = null;
  GwtColor background = null;

  Color foregroundColor = textAttributes.getForegroundColor();
  if (foregroundColor != null) {
    foreground = createColor(foregroundColor);
  }

  Color backgroundColor = textAttributes.getBackgroundColor();
  if (backgroundColor != null) {
    background = createColor(backgroundColor);
  }

  int flags = 0;
  flags = BitUtil.set(flags, GwtTextAttributes.BOLD, (textAttributes.getFontType() & Font.BOLD) != 0);
  flags = BitUtil.set(flags, GwtTextAttributes.ITALIC, (textAttributes.getFontType() & Font.ITALIC) != 0);
  flags = BitUtil.set(flags, GwtTextAttributes.UNDERLINE, textAttributes.getEffectType() == EffectType.LINE_UNDERSCORE);
  flags = BitUtil.set(flags, GwtTextAttributes.LINE_THROUGH, textAttributes.getEffectType() == EffectType.STRIKEOUT);

  return new GwtTextAttributes(foreground, background, flags);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:GwtTransportServiceImpl.java

示例3: activateFrame

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public static boolean activateFrame(@Nullable final Frame frame) {
  if (frame != null) {
    Runnable runnable = new Runnable() {
      @Override
      public void run() {
        int extendedState = frame.getExtendedState();
        if (BitUtil.isSet(extendedState, Frame.ICONIFIED)) {
          extendedState = BitUtil.set(extendedState, Frame.ICONIFIED, false);
          frame.setExtendedState(extendedState);
        }

        // fixme [vistall] dirty hack - show frame on top
        frame.setAlwaysOnTop(true);
        frame.setAlwaysOnTop(false);
        IdeFocusManager.getGlobalInstance().doForceFocusWhenFocusSettlesDown(frame);
      }
    };
    //noinspection SSBasedInspection
    SwingUtilities.invokeLater(runnable);
    return true;
  }
  return false;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:RequestFocusHttpRequestHandler.java

示例4: getOtherModifierMask

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
@RequiredReadAction
public static int getOtherModifierMask(DotNetVariable variable)
{
	int i = 0;
	i |= BitUtil.set(i, CONSTANT_MASK, variable.isConstant());
	if(variable instanceof CSharpStubVariableImpl)
	{
		i |= BitUtil.set(i, MULTIPLE_DECLARATION_MASK, CSharpStubVariableImplUtil.isMultipleDeclaration((CSharpStubVariableImpl<?>) variable));
	}
	if(variable instanceof CSharpStubParameterImpl)
	{
		i |= BitUtil.set(i, OPTIONAL, variable.getInitializer() != null);
	}
	return i;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:16,代码来源:CSharpVariableDeclStub.java

示例5: MsilModifierListStub

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public MsilModifierListStub(StubElement parent, IStubElementType elementType, MsilModifierList modifiers)
{
	super(parent, elementType);

	int mod = 0;
	for(DotNetModifier dotNetModifier : modifiers.getModifiers())
	{
		mod |= BitUtil.set(mod, getMask((MsilModifierElementType) dotNetModifier), true);
	}
	myModifiers = mod;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:12,代码来源:MsilModifierListStub.java

示例6: toModifiers

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public static int toModifiers(MsilGenericParameter parameter)
{
	int i = 0;
	i = BitUtil.set(i, COVARIANT, parameter.hasModifier(DotNetModifier.COVARIANT));
	i = BitUtil.set(i, CONTRAVARIANT, parameter.hasModifier(DotNetModifier.CONTRAVARIANT));
	i = BitUtil.set(i, HAS_DEFAULT_CONSTRUCTOR, parameter.hasDefaultConstructor());
	return i;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:9,代码来源:MsilGenericParameterStub.java

示例7: MouseEnterHandler

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public MouseEnterHandler(final Component component) {
  myMouseAdapter = new MouseAdapter() {
    @Override
    public void mouseEntered(MouseEvent e) {
      if (!component.isEnabled()) {
        return;
      }
      myFlags = BitUtil.set(myFlags, ENTERED, true);
      component.repaint();
    }

    @Override
    public void mouseExited(MouseEvent e) {
      myFlags = BitUtil.set(myFlags, ENTERED, false);
      component.repaint();
    }

    @Override
    public void mousePressed(MouseEvent e) {
      if (!component.isEnabled()) {
        return;
      }
      myFlags = BitUtil.set(myFlags, PRESSED, true);
      component.repaint();
    }

    @Override
    public void mouseReleased(MouseEvent e) {
      myFlags = BitUtil.set(myFlags, PRESSED, false);
      component.repaint();
    }
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:34,代码来源:MouseEnterHandler.java

示例8: packFlags

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private static byte packFlags(boolean isEllipsis, boolean generatedName)
{
	byte flags = 0;
	flags = BitUtil.set(flags, ELLIPSIS, isEllipsis);
	flags = BitUtil.set(flags, GENERATED_NAME, generatedName);
	return flags;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:8,代码来源:PsiParameterStubImpl.java

示例9: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(@FlagConstant byte mask, boolean value) {
  myFlags = BitUtil.set(myFlags, mask, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:RangeHighlighterImpl.java

示例10: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(@FlagConstant byte mask, boolean value) {
  myCachedFlags = BitUtil.set(myCachedFlags, mask, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:Node.java

示例11: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public void setFlag(final boolean value, final long mask) {
  myFlags = BitUtil.set(myFlags, mask, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:RefEntityImpl.java

示例12: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
protected void setFlag(byte mask, boolean value) {
  myFlags = BitUtil.set(myFlags, mask, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:RedBlackTree.java

示例13: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(final int mask, final boolean value) {
  myFlags = BitUtil.set(myFlags, mask, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:WhiteSpace.java

示例14: setFlag

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
void setFlag(byte mask, boolean value) {
  myFlags = BitUtil.set(myFlags, mask, value);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:4,代码来源:RedBlackTree.java

示例15: setName

import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public void setName(String name)
{
	myName = name;
	myFlags = BitUtil.set(myFlags, GENERATED_NAME, false);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:PsiParameterStubImpl.java


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