Package java.util

Examples of java.util.BitSet$MaskInfoIterator


    /**
     * The constructor.
     */
    public BytecodeOutlineView() {
        super();
        modes = new BitSet();
        globalActions = new HashMap();
        selectionActions = new ArrayList();
    }
View Full Code Here


        setEditorContextMenuId("#ClassFileEditorContext"); //$NON-NLS-1$
        setRulerContextMenuId("#ClassFileRulerContext"); //$NON-NLS-1$
        setOutlinerContextMenuId("#ClassFileOutlinerContext"); //$NON-NLS-1$
        // don't set help contextId, we install our own help context

        decompilerFlags = new BitSet();
        // TODO take from preferences and/or last editor memento
        decompilerFlags.set(BCOConstants.F_SHOW_LINE_INFO, true);
        decompilerFlags.set(BCOConstants.F_SHOW_VARIABLES, true);
        decompilerFlags.set(BCOConstants.F_SHOW_RAW_BYTECODE, false);
        setSourceAttachmentPossible(true);
View Full Code Here

     *
     * @return converted boolean array as BitSet
     */
    public static BitSet getBitSetFromBooleanArray(boolean[] buf)
    {
        BitSet set = new BitSet();
        for (int i = 0; i < buf.length; i++)
        {
            if( buf[i] )
            {
                set.set(i);
            }
        }

        return set;
    }   
View Full Code Here

        }
        else if ((miscFlags&MISC_RETRIEVING_DETACHED_STATE)!=0)
        {
            // Retrieving the detached state from the detached object
            // Don't need the id or version since they can't change
            BitSet jdoLoadedFields = (BitSet)currentState[2];
            for (int i = 0; i < this.loadedFields.length; i++)
            {
                this.loadedFields[i] = jdoLoadedFields.get(i);
            }

            BitSet jdoModifiedFields = (BitSet)currentState[3];
            for (int i = 0; i < dirtyFields.length; i++)
            {
                dirtyFields[i] = jdoModifiedFields.get(i);
            }
            setVersion(currentState[1]);
            return currentState;
        }
        else
        {
            // Updating the detached state in the detached object with our state
            Object[] state = new Object[4];
            state[0] = myID;
            state[1] = getVersion(myPC);

            // Loaded fields
            BitSet loadedState = new BitSet();
            for (int i = 0; i < loadedFields.length; i++)
            {
                if (loadedFields[i])
                {
                    loadedState.set(i);
                }
                else
                {
                    loadedState.clear(i);
                }
            }
            state[2] = loadedState;

            // Modified fields
            BitSet modifiedState = new BitSet();
            for (int i = 0; i < dirtyFields.length; i++)
            {
                if (dirtyFields[i])
                {
                    modifiedState.set(i);
                }
                else
                {
                    modifiedState.clear(i);
                }
            }
            state[3] = modifiedState;

            return state;
View Full Code Here

    /**
     * @see de.loskutov.branchview.connection.Command#exec(java.lang.Object)
     */
    protected void exec(IJavaElement element1, IJavaElement element2) throws Exception {
        final BitSet modes = getModes();
        CompareUI.openCompareEditor(new BytecodeCompare(
            createTypedElement(element1, modes),
            createTypedElement(element2, modes)));
    }
View Full Code Here

        return new TypedElement(name, methodName, TypedElement.TYPE_BYTECODE, javaElement, modes);
    }

    private BitSet getModes() {
        IPreferenceStore store = BytecodeOutlinePlugin.getDefault().getPreferenceStore();
        BitSet modes = new BitSet();
        modes.set(BCOConstants.F_LINK_VIEW_TO_EDITOR, store.getBoolean(BCOConstants.LINK_VIEW_TO_EDITOR));
        modes.set(BCOConstants.F_SHOW_ONLY_SELECTED_ELEMENT, store.getBoolean(BCOConstants.SHOW_ONLY_SELECTED_ELEMENT));
        modes.set(BCOConstants.F_SHOW_RAW_BYTECODE, store.getBoolean(BCOConstants.SHOW_RAW_BYTECODE));
        modes.set(BCOConstants.F_SHOW_LINE_INFO, store.getBoolean(BCOConstants.DIFF_SHOW_LINE_INFO));
        modes.set(BCOConstants.F_SHOW_VARIABLES, store.getBoolean(BCOConstants.DIFF_SHOW_VARIABLES));
        modes.set(BCOConstants.F_SHOW_ASMIFIER_CODE, store.getBoolean(BCOConstants.DIFF_SHOW_ASMIFIER_CODE));
        modes.set(BCOConstants.F_SHOW_ANALYZER, store.getBoolean(BCOConstants.SHOW_ANALYZER));
        modes.set(BCOConstants.F_SHOW_STACKMAP, store.getBoolean(BCOConstants.DIFF_SHOW_STACKMAP));
        modes.set(BCOConstants.F_EXPAND_STACKMAP, store.getBoolean(BCOConstants.DIFF_EXPAND_STACKMAP));
        return modes;
    }
View Full Code Here

         */
        public boolean isFieldInActualFetchPlan(int fieldNumber)
        {
            if (dirty)
            {
                BitSet fieldsNumber = getFieldsInActualFetchPlanByBitSet();
                return fieldsNumber.get(fieldNumber);
            }
            if (fieldsInActualFetchPlan != null)
            {
                for (int i=0;i<fieldsInActualFetchPlan.length;i++)
                {
View Full Code Here

        public int[] getFieldsInActualFetchPlan()
        {
            if (dirty)
            {
                dirty = false;
                BitSet fieldsNumber = getFieldsInActualFetchPlanByBitSet();
                int countFieldsInFP = 0;
                for (int i = 0; i < fieldsNumber.length(); i++)
                {
                    if (fieldsNumber.get(i))
                    {
                        countFieldsInFP++;
                    }
                }

                fieldsInActualFetchPlan = new int[countFieldsInFP];
                int nextField = 0;
                for (int i = 0; i < fieldsNumber.length(); i++)
                {
                    if (fieldsNumber.get(i))
                    {
                        fieldsInActualFetchPlan[nextField++] = i;
                    }
                }
            }
View Full Code Here

         * @param cmd this AbstractClassMetaData
         * @return an BitSet with the bits set in the absolute position of the fields
         */
        private BitSet getFieldsInActualFetchPlanByBitSet(AbstractClassMetaData cmd)
        {
            BitSet bitSet = plan.getFetchPlanForClass(cmd).getFieldsAbsoluteNumber(cmd.getFetchGroupMetaData());
            if (cmd.getPersistenceCapableSuperclass() != null)
            {
                plan.manageFetchPlanForClass(cmd.getSuperAbstractClassMetaData());
                bitSet.or(plan.getFetchPlanForClass(cmd.getSuperAbstractClassMetaData()).getFieldsInActualFetchPlanByBitSet(cmd.getSuperAbstractClassMetaData()));
            }
            else
            {
                // Make sure that we always have the PK fields in the fetch plan = FetchPlanImpl.NONE
                setNoneFieldNumbers(bitSet);
            }

            if (plan.dynamicGroups != null)
            {
                // JPOX dynamic fetch groups extension
                Iterator iter = plan.dynamicGroups.iterator();
                while (iter.hasNext())
                {
                    FetchGroup grp = (FetchGroup)iter.next();
                    if (grp.getClassName().equals(cmd.getFullClassName()))
                    {
                        // Dynamic fetch group applies
                        String[] fields = grp.getFieldNames();
                        for (int i=0;i<fields.length;i++)
                        {
                            int fieldPos = cmd.getAbsolutePositionOfMember(fields[i]);
                            if (fieldPos >= 0)
                            {
                                bitSet.set(fieldPos);
                            }
                        }
                    }
                }
            }
View Full Code Here

         * @param fgmds The Fetch Groups
         * @return a BitSet with flags set to true in the field number positions
         */
        private BitSet getFieldsAbsoluteNumber(FetchGroupMetaData[] fgmds)
        {
            BitSet fieldsNumber = new BitSet(0);
            if (fgmds != null)
            {
                for (int i = 0; i < fgmds.length; i++)
                {
                    if (plan.groups.contains(fgmds[i].getName()))
                    {
                        fieldsNumber.or(getFieldsAbsoluteNumberInFetchGroup(fgmds[i]));
                    }
                }
            }

            if (plan.groups.contains(FetchPlan.DEFAULT))
View Full Code Here

TOP

Related Classes of java.util.BitSet$MaskInfoIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.