本文整理汇总了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();
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
};
}
示例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;
}
示例9: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(@FlagConstant byte mask, boolean value) {
myFlags = BitUtil.set(myFlags, mask, value);
}
示例10: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(@FlagConstant byte mask, boolean value) {
myCachedFlags = BitUtil.set(myCachedFlags, mask, value);
}
示例11: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public void setFlag(final boolean value, final long mask) {
myFlags = BitUtil.set(myFlags, mask, value);
}
示例12: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
protected void setFlag(byte mask, boolean value) {
myFlags = BitUtil.set(myFlags, mask, value);
}
示例13: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
private void setFlag(final int mask, final boolean value) {
myFlags = BitUtil.set(myFlags, mask, value);
}
示例14: setFlag
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
void setFlag(byte mask, boolean value) {
myFlags = BitUtil.set(myFlags, mask, value);
}
示例15: setName
import com.intellij.util.BitUtil; //导入方法依赖的package包/类
public void setName(String name)
{
myName = name;
myFlags = BitUtil.set(myFlags, GENERATED_NAME, false);
}