diff --git a/src/plugins/genericeditor/GenericEditor.mimetypes.xml b/src/plugins/genericeditor/GenericEditor.mimetypes.xml new file mode 100644 index 00000000000..e474c30d80f --- /dev/null +++ b/src/plugins/genericeditor/GenericEditor.mimetypes.xml @@ -0,0 +1,123 @@ + + + + + CSS file + + + + + Fortran file + + + + + HTML file + + + + + + + Java file + + + + + Javascript file + + + + + Perl file + + + + + + PHP file + + + + + Python file + + + + + Ruby file + + + + + SQL file + + + + + TCL file + + + + + + + + C Source file + + + + + + + + + C Header file + + + + + + + C++ Header file + C++ header + + + + + + + + + + + + + + + C++ Source file + + C++ source code + + + + + + + + + + + + + Objective-C source code + + + + + + + + diff --git a/src/plugins/genericeditor/GenericEditor.pluginspec b/src/plugins/genericeditor/GenericEditor.pluginspec new file mode 100644 index 00000000000..f064af79c63 --- /dev/null +++ b/src/plugins/genericeditor/GenericEditor.pluginspec @@ -0,0 +1,20 @@ + + Nokia Corporation + (C) 2010 Nokia Corporation + +Commercial Usage + +Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. + +GNU Lesser General Public License Usage + +Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + + Qt Creator + Generic editor with highlighting for a variety of languages. + http://qt.nokia.com + + + + + diff --git a/src/plugins/genericeditor/XML/alert.xml b/src/plugins/genericeditor/XML/alert.xml new file mode 100644 index 00000000000..f18d94dbc38 --- /dev/null +++ b/src/plugins/genericeditor/XML/alert.xml @@ -0,0 +1,61 @@ + + + + diff --git a/src/plugins/genericeditor/XML/c.xml b/src/plugins/genericeditor/XML/c.xml new file mode 100644 index 00000000000..ee0e90fa809 --- /dev/null +++ b/src/plugins/genericeditor/XML/c.xml @@ -0,0 +1,198 @@ + + + + + + + break + case + continue + default + do + else + enum + extern + for + goto + if + inline + return + sizeof + struct + switch + typedef + union + while + + + auto + char + const + double + float + int + long + register + restrict + short + signed + static + unsigned + void + volatile + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + wchar_t + _Imaginary + _Complex + _Bool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/cpp.xml b/src/plugins/genericeditor/XML/cpp.xml new file mode 100644 index 00000000000..8de4b8dc66c --- /dev/null +++ b/src/plugins/genericeditor/XML/cpp.xml @@ -0,0 +1,343 @@ + + + + + + + asm + break + case + catch + class + const_cast + continue + default + delete + do + dynamic_cast + else + enum + explicit + export + extern + false + friend + for + goto + if + inline + namespace + new + operator + private + protected + public + qobject_cast + reinterpret_cast + return + sizeof + static_cast + struct + switch + template + this + throw + true + try + typedef + typeid + type_info + typename + union + using + virtual + while + + and + and_eq + bad_cast + bad_typeid + bitand + bitor + compl + not + not_eq + or + or_eq + xor + xor_eq + except + finally + xalloc + + + K_DCOP + Q_ARG + Q_ASSERT + Q_ASSERT_X + Q_CHECK_PTR + Q_CLASSINFO + Q_CLEANUP_RESOURCE + Q_D + Q_DECLARE_FLAGS + Q_DECLARE_FLAGS + Q_DECLARE_INTERFACE + Q_DECLARE_METATYPE + Q_DECLARE_OPERATORS_FOR_FLAGS + Q_DECLARE_PRIVATE + Q_DECLARE_PUBLIC + Q_DECLARE_SHARED + Q_DECLARE_TYPEINFO + Q_DISABLE_COPY + Q_ENUMS + Q_EXPORT + Q_FLAGS + Q_FOREACH + Q_FOREVER + Q_GADGET + Q_GLOBAL_STATIC + Q_GLOBAL_STATIC_WITH_ARGS + Q_INIT_RESOURCE + Q_INTERFACES + Q_INVOKABLE + Q_NOREPLY + Q_OBJECT + Q_OVERRIDE + Q_PRIVATE_SLOT + Q_PROPERTY + Q_Q + Q_RETURN_ARG + Q_SCRIPTABLE + Q_SETS + Q_SIGNALS + Q_SLOTS + Q_UNUSED + SIGNAL + SLOT + TRUE + FALSE + connect + disconnect + emit + signals + slots + foreach + forever + + qint8 + qint16 + qint32 + qint64 + qlonglong + qptrdiff + qreal + quint8 + quint16 + quint32 + quint64 + quintptr + qulonglong + + + auto + bool + char + const + double + float + int + long + mutable + register + short + signed + static + unsigned + void + volatile + uchar + uint + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + wchar_t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/css.xml b/src/plugins/genericeditor/XML/css.xml new file mode 100644 index 00000000000..6b24dba0fff --- /dev/null +++ b/src/plugins/genericeditor/XML/css.xml @@ -0,0 +1,699 @@ + + + + + + + + + + + azimuth + background + background-attachment + background-color + background-image + background-position + background-repeat + border + border-bottom + border-bottom-color + border-bottom-style + border-bottom-width + border-collapse + border-color + border-left + border-left-color + border-left-style + border-left-width + border-right + border-right-color + border-right-style + border-right-width + border-spacing + border-style + border-top + border-top-color + border-top-style + border-top-width + border-width + bottom + caption-side + clear + clip + color + content + counter-increment + counter-reset + cue + cue-after + cue-before + cursor + direction + display + elevation + empty-cells + float + font + font-family + font-size + font-size-adjust + font-stretch + font-style + font-variant + font-weight + height + left + letter-spacing + line-height + list-style + list-style-image + list-style-keyword + list-style-position + list-style-type + margin + margin-bottom + margin-left + margin-right + margin-top + marker-offset + max-height + max-width + min-height + min-width + orphans + outline + outline-color + outline-style + outline-width + overflow + padding + padding-bottom + padding-left + padding-right + padding-top + page + page-break-after + page-break-before + page-break-inside + pause + pause-after + pause-before + pitch + pitch-range + play-during + position + quotes + richness + right + size + speak + speak-header + speak-numeral + speak-punctuation + speech-rate + stress + table-layout + text-align + text-decoration + text-decoration-color + text-indent + text-shadow + text-transform + top + unicode-bidi + vertical-align + visibility + voice-family + volume + white-space + widows + width + word-spacing + z-index + + + border-bottom-image + border-bottom-left-image + border-bottom-left-radius + border-bottom-right-image + border-bottom-right-radius + border-corner-image + border-image + border-left-image + border-radius + border-right-image + border-top-image + border-top-left-image + border-top-left-radius + border-top-right-image + border-top-right-radius + box-shadow + box-sizing + opacity + outline-offset + overflow-x + overflow-y + text-overflow + text-shadow + + + -moz-border-bottom-colors + -moz-border-left-colors + -moz-border-radius + -moz-border-right-colors + -moz-border-top-colors + -moz-box-flex + + + -o-background-size + -o-text-overflow + + + -khtml-background-size + konq_bgpos_x + konq_bgpos_y + + + -webkit-background-size + + + font-family + font-size + font-stretch + font-style + font-variant + font-weight + unicode-range + units-per-em + src + panose-1 + stemv + stemh + slope + cap-height + x-height + ascent + descent + widths + bbox + definition-src + baseline + centerline + mathline + topline + + + + inherit + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + xx-small + x-small + small + medium + large + x-large + xx-large + smaller + larger + italic + oblique + small-caps + normal + bold + bolder + lighter + light + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + transparent + repeat + repeat-x + repeat-y + no-repeat + baseline + sub + super + top + text-top + middle + bottom + text-bottom + left + right + center + justify + konq-center + disc + circle + square + box + decimal + decimal-leading-zero + lower-roman + upper-roman + lower-greek + lower-alpha + lower-latin + upper-alpha + upper-latin + hebrew + armenian + georgian + cjk-ideographic + hiragana + katakana + hiragana-iroha + katakana-iroha + inline + inline-block + block + list-item + run-in + compact + marker + table + inline-table + table-row-group + table-header-group + table-footer-group + table-row + table-column-group + table-column + table-cell + table-caption + auto + crosshair + default + pointer + move + e-resize + ne-resize + nw-resize + n-resize + se-resize + sw-resize + s-resize + w-resize + text + wait + help + above + absolute + always + avoid + below + bidi-override + blink + both + capitalize + caption + clip + close-quote + collapse + condensed + crop + cross + ellipsis + ellipsis-word + embed + expanded + extra-condensed + extra-expanded + fixed + hand + hide + higher + icon + inside + invert + landscape + level + line-through + loud + lower + lowercase + ltr + menu + message-box + mix + narrower + no-close-quote + no-open-quote + nowrap + open-quote + outside + overline + portrait + pre + pre-line + pre-wrap + relative + rtl + scroll + semi-condensed + semi-expanded + separate + show + small-caption + static + static-position + status-bar + thick + thin + ultra-condensed + ultra-expanded + underline + uppercase + visible + wider + break + serif + sans-serif + cursive + fantasy + monospace + border-box + content-box + + + -moz-box + + + + + + aqua + black + blue + fuchsia + gray + green + lime + maroon + navy + olive + purple + red + silver + teal + white + yellow + ActiveBorder + ActiveCaption + AppWorkspace + Background + ButtonFace + ButtonHighlight + ButtonShadow + ButtonText + CaptionText + GrayText + Highlight + HighlightText + InactiveBorder + InactiveCaption + InactiveCaptionText + InfoBackground + InfoText + Menu + MenuText + Scrollbar + ThreeDDarkShadow + ThreeDFace + ThreeDHighlight + ThreeDLightShadow + ThreeDShadow + Window + WindowFrame + WindowText + + + + url + attr + rect + rgb + rgba + hsl + hsla + counter + counters + + + local + format + + + expression + + + + + all + aural + braille + embossed + handheld + print + projection + screen + tty + tv + + + + hover + link + visited + active + focus + first-child + last-child + only-child + first-of-type + last-of-type + only-of-type + first-letter + first-line + before + after + selection + root + empty + target + enabled + disabled + checked + indeterminate + nth-child + nth-last-child + nth-of-type + nth-last-of-type + not + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/doxygen.xml b/src/plugins/genericeditor/XML/doxygen.xml new file mode 100644 index 00000000000..520a2fd3dbd --- /dev/null +++ b/src/plugins/genericeditor/XML/doxygen.xml @@ -0,0 +1,483 @@ + + +]> + + + + + + \arg + \attention + \author + \callgraph + \code + \dot + \else + \endcode + \endcond + \enddot + \endhtmlonly + \endif + \endlatexonly + \endlink + \endmanonly + \endverbatim + \endxmlonly + \f[ + \f] + \f$ + \hideinitializer + \htmlonly + \interface + \internal + \invariant + \~ + \@ + \$ + \\ + \# + \latexonly + \li + \manonly + \n + \nosubgrouping + \note + \only + \post + \pre + \remarks + \return + \returns + \sa + \see + \showinitializer + \since + \test + \todo + \verbatim + \warning + \xmlonly + + @arg + @attention + @author + @callgraph + @code + @dot + @else + @endcode + @endcond + @enddot + @endhtmlonly + @endif + @endlatexonly + @endlink + @endmanonly + @endverbatim + @endxmlonly + @f[ + @f] + @f$ + @hideinitializer + @htmlonly + @interface + @internal + @invariant + @~ + @@ + @$ + @\ + @# + @latexonly + @li + @manonly + @n + @nosubgrouping + @note + @only + @post + @pre + @remarks + @return + @returns + @sa + @see + @showinitializer + @since + @test + @todo + @verbatim + @warning + @xmlonly + + + + \addtogroup + \a + \anchor + \b + \c + \class + \cond + \copydoc + \def + \dontinclude + \dotfile + \e + \elseif + \em + \enum + \example + \exception + \exceptions + \file + \htmlinclude + \if + \ifnot + \include + \link + \namespace + \p + \package + \ref + \relatesalso + \relates + \retval + \throw + \throws + \verbinclude + \version + \xrefitem + + @addtogroup + @a + @anchor + @b + @c + @class + @cond + @copydoc + @def + @dontinclude + @dotfile + @e + @elseif + @em + @enum + @example + @exception + @exceptions + @file + @htmlinclude + @if + @ifnot + @include + @link + @namespace + @p + @package + @ref + @relatesalso + @relates + @retval + @throw + @throws + @verbinclude + @version + @xrefitem + + + \param + \tparam + + @param + @tparam + + + \image + + @image + + + \defgroup + \page + \paragraph + \section + \struct + \subsection + \subsubsection + \union + \weakgroup + + @defgroup + @page + @paragraph + @section + @struct + @subsection + @subsubsection + @union + @weakgroup + + + \addindex + \brief + \bug + \date + \deprecated + \fn + \ingroup + \line + \mainpage + \name + \overload + \par + \short + \skip + \skipline + \typedef + \until + \var + + @addindex + @brief + @bug + @date + @deprecated + @fn + @ingroup + @line + @mainpage + @name + @overload + @par + @short + @skip + @skipline + @typedef + @until + @var + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/fortran.xml b/src/plugins/genericeditor/XML/fortran.xml new file mode 100644 index 00000000000..948267fc9e1 --- /dev/null +++ b/src/plugins/genericeditor/XML/fortran.xml @@ -0,0 +1,569 @@ + + + + + + + + + + + allocate + break + call + case + common + contains + continue + cycle + deallocate + default + do + forall + where + elsewhere + elseif + else + equivalence + exit + external + for + go + goto + if + implicit + include + interface + intrinsic + namelist + none + nullify + operator + assignment + pause + procedure + pure + elemental + record + recursive + result + return + select + selectcase + stop + then + to + use + only + entry + while + + + access + backspace + close + inquire + open + print + read + rewind + write + format + + + + unit + end + err + fmt + iostat + status + advance + size + eor + + + + unit + iostat + err + file + status + access + form + recl + blank + position + action + delim + pad + + + + unit + iostat + err + file + exist + opened + number + named + name + access + sequential + direct + form + formatted + unformatted + recl + nextrec + blank + position + action + read + write + readwrite + delim + pad + + + double + precision + parameter + save + pointer + public + private + target + allocatable + optional + sequence + + + + + + + + abs + cabs + dabs + iabs + aimag + aint + dint + anint + dnint + ceiling + cmplx + dcmplx + dimag + floor + nint + idnint + int + idint + ifix + real + float + sngl + dble + dreal + aprime + dconjg + dfloat + ddmim + rand + + modulo + conjg + dprod + dim + ddim + idim + max + amax0 + amax1 + max0 + max1 + dmax1 + min + amin0 + amin1 + min0 + min1 + dmin1 + mod + amod + dmod + sign + dsign + isign + + acos + dacos + asin + dasin + atan + datan + atan2 + datan2 + cos + ccos + dcos + cosh + dcosh + exp + cexp + dexp + log + alog + dlog + clog + log10 + alog10 + dlog10 + sin + csin + dsin + sinh + dsinh + sqrt + csqrt + dsqrt + tan + dtan + tanh + dtanh + + + achar + char + iachar + ichar + + lge + lgt + lle + llt + + adjustl + adjustr + index + len_trim + scan + verify + + logical + + exponent + fraction + nearest + rrspacing + scale + set_exponent + spacing + + btest + iand + ibclr + ibits + ibset + ieor + ior + ishft + ishftc + not + + mvbits + + merge + + + + + + associated + present + kind + + len + + digits + epsilon + huge + maxexponent + minexponent + precision + radix + range + tiny + + bit_size + + allocated + lbound + ubound + shape + size + + + + + + repeat + trim + + selected_int_kind + selected_real_kind + + transfer + + dot_product + matmul + + all + any + count + maxval + minval + product + sum + + pack + unpack + + reshape + + spread + + cshift + eoshift + + transpose + + maxloc + minloc + + + + + + date_and_time + system_clock + + random_number + random_seed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/html.xml b/src/plugins/genericeditor/XML/html.xml new file mode 100644 index 00000000000..7e0a93ef92d --- /dev/null +++ b/src/plugins/genericeditor/XML/html.xml @@ -0,0 +1,207 @@ + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/java.xml b/src/plugins/genericeditor/XML/java.xml new file mode 100644 index 00000000000..c7f0f396732 --- /dev/null +++ b/src/plugins/genericeditor/XML/java.xml @@ -0,0 +1,3864 @@ + + + + + + ACTIVE + ACTIVITY_COMPLETED + ACTIVITY_REQUIRED + ARG_IN + ARG_INOUT + ARG_OUT + AWTError + AWTEvent + AWTEventListener + AWTEventListenerProxy + AWTEventMulticaster + AWTException + AWTKeyStroke + AWTPermission + AbstractAction + AbstractBorder + AbstractButton + AbstractCellEditor + AbstractCollection + AbstractColorChooserPanel + AbstractDocument + AbstractDocument.AttributeContext + AbstractDocument.Content + AbstractDocument.ElementEdit + AbstractExecutorService + AbstractInterruptibleChannel + AbstractLayoutCache + AbstractLayoutCache.NodeDimensions + AbstractList + AbstractListModel + AbstractMap + AbstractMethodError + AbstractPreferences + AbstractQueue + AbstractQueuedSynchronizer + AbstractSelectableChannel + AbstractSelectionKey + AbstractSelector + AbstractSequentialList + AbstractSet + AbstractSpinnerModel + AbstractTableModel + AbstractUndoableEdit + AbstractWriter + AccessControlContext + AccessControlException + AccessController + AccessException + Accessible + AccessibleAction + AccessibleAttributeSequence + AccessibleBundle + AccessibleComponent + AccessibleContext + AccessibleEditableText + AccessibleExtendedComponent + AccessibleExtendedTable + AccessibleExtendedText + AccessibleHyperlink + AccessibleHypertext + AccessibleIcon + AccessibleKeyBinding + AccessibleObject + AccessibleRelation + AccessibleRelationSet + AccessibleResourceBundle + AccessibleRole + AccessibleSelection + AccessibleState + AccessibleStateSet + AccessibleStreamable + AccessibleTable + AccessibleTableModelChange + AccessibleText + AccessibleTextSequence + AccessibleValue + AccountException + AccountExpiredException + AccountLockedException + AccountNotFoundException + Acl + AclEntry + AclNotFoundException + Action + ActionEvent + ActionListener + ActionMap + ActionMapUIResource + Activatable + ActivateFailedException + ActivationDesc + ActivationException + ActivationGroup + ActivationGroupDesc + ActivationGroupDesc.CommandEnvironment + ActivationGroupID + ActivationGroup_Stub + ActivationID + ActivationInstantiator + ActivationMonitor + ActivationSystem + Activator + ActiveEvent + ActivityCompletedException + ActivityRequiredException + AdapterActivator + AdapterActivatorOperations + AdapterAlreadyExists + AdapterAlreadyExistsHelper + AdapterInactive + AdapterInactiveHelper + AdapterManagerIdHelper + AdapterNameHelper + AdapterNonExistent + AdapterNonExistentHelper + AdapterStateHelper + AddressHelper + Adjustable + AdjustmentEvent + AdjustmentListener + Adler32 + AffineTransform + AffineTransformOp + AlgorithmParameterGenerator + AlgorithmParameterGeneratorSpi + AlgorithmParameterSpec + AlgorithmParameters + AlgorithmParametersSpi + AllPermission + AlphaComposite + AlreadyBound + AlreadyBoundException + AlreadyBoundHelper + AlreadyBoundHolder + AlreadyConnectedException + AncestorEvent + AncestorListener + AnnotatedElement + Annotation + Annotation + AnnotationFormatError + AnnotationTypeMismatchException + Any + AnyHolder + AnySeqHelper + AnySeqHelper + AnySeqHolder + AppConfigurationEntry + AppConfigurationEntry.LoginModuleControlFlag + Appendable + Applet + AppletContext + AppletInitializer + AppletStub + ApplicationException + Arc2D + Arc2D.Double + Arc2D.Float + Area + AreaAveragingScaleFilter + ArithmeticException + Array + Array + ArrayBlockingQueue + ArrayIndexOutOfBoundsException + ArrayList + ArrayStoreException + ArrayType + Arrays + AssertionError + AsyncBoxView + AsynchronousCloseException + AtomicBoolean + AtomicInteger + AtomicIntegerArray + AtomicIntegerFieldUpdater + AtomicLong + AtomicLongArray + AtomicLongFieldUpdater + AtomicMarkableReference + AtomicReference + AtomicReferenceArray + AtomicReferenceFieldUpdater + AtomicStampedReference + Attr + Attribute + Attribute + Attribute + AttributeChangeNotification + AttributeChangeNotificationFilter + AttributeException + AttributeInUseException + AttributeList + AttributeList + AttributeList + AttributeListImpl + AttributeModificationException + AttributeNotFoundException + AttributeSet + AttributeSet + AttributeSet.CharacterAttribute + AttributeSet.ColorAttribute + AttributeSet.FontAttribute + AttributeSet.ParagraphAttribute + AttributeSetUtilities + AttributeValueExp + AttributedCharacterIterator + AttributedCharacterIterator.Attribute + AttributedString + Attributes + Attributes + Attributes + Attributes.Name + Attributes2 + Attributes2Impl + AttributesImpl + AudioClip + AudioFileFormat + AudioFileFormat.Type + AudioFileReader + AudioFileWriter + AudioFormat + AudioFormat.Encoding + AudioInputStream + AudioPermission + AudioSystem + AuthPermission + AuthProvider + AuthenticationException + AuthenticationException + AuthenticationNotSupportedException + Authenticator + Authenticator.RequestorType + AuthorizeCallback + Autoscroll + BAD_CONTEXT + BAD_INV_ORDER + BAD_OPERATION + BAD_PARAM + BAD_POLICY + BAD_POLICY_TYPE + BAD_POLICY_VALUE + BAD_QOS + BAD_TYPECODE + BMPImageWriteParam + BackingStoreException + BadAttributeValueExpException + BadBinaryOpValueExpException + BadKind + BadLocationException + BadPaddingException + BadStringOperationException + BandCombineOp + BandedSampleModel + BaseRowSet + BasicArrowButton + BasicAttribute + BasicAttributes + BasicBorders + BasicBorders.ButtonBorder + BasicBorders.FieldBorder + BasicBorders.MarginBorder + BasicBorders.MenuBarBorder + BasicBorders.RadioButtonBorder + BasicBorders.RolloverButtonBorder + BasicBorders.SplitPaneBorder + BasicBorders.ToggleButtonBorder + BasicButtonListener + BasicButtonUI + BasicCheckBoxMenuItemUI + BasicCheckBoxUI + BasicColorChooserUI + BasicComboBoxEditor + BasicComboBoxEditor.UIResource + BasicComboBoxRenderer + BasicComboBoxRenderer.UIResource + BasicComboBoxUI + BasicComboPopup + BasicControl + BasicDesktopIconUI + BasicDesktopPaneUI + BasicDirectoryModel + BasicEditorPaneUI + BasicFileChooserUI + BasicFormattedTextFieldUI + BasicGraphicsUtils + BasicHTML + BasicIconFactory + BasicInternalFrameTitlePane + BasicInternalFrameUI + BasicLabelUI + BasicListUI + BasicLookAndFeel + BasicMenuBarUI + BasicMenuItemUI + BasicMenuUI + BasicOptionPaneUI + BasicOptionPaneUI.ButtonAreaLayout + BasicPanelUI + BasicPasswordFieldUI + BasicPermission + BasicPopupMenuSeparatorUI + BasicPopupMenuUI + BasicProgressBarUI + BasicRadioButtonMenuItemUI + BasicRadioButtonUI + BasicRootPaneUI + BasicScrollBarUI + BasicScrollPaneUI + BasicSeparatorUI + BasicSliderUI + BasicSpinnerUI + BasicSplitPaneDivider + BasicSplitPaneUI + BasicStroke + BasicTabbedPaneUI + BasicTableHeaderUI + BasicTableUI + BasicTextAreaUI + BasicTextFieldUI + BasicTextPaneUI + BasicTextUI + BasicTextUI.BasicCaret + BasicTextUI.BasicHighlighter + BasicToggleButtonUI + BasicToolBarSeparatorUI + BasicToolBarUI + BasicToolTipUI + BasicTreeUI + BasicViewportUI + BatchUpdateException + BeanContext + BeanContextChild + BeanContextChildComponentProxy + BeanContextChildSupport + BeanContextContainerProxy + BeanContextEvent + BeanContextMembershipEvent + BeanContextMembershipListener + BeanContextProxy + BeanContextServiceAvailableEvent + BeanContextServiceProvider + BeanContextServiceProviderBeanInfo + BeanContextServiceRevokedEvent + BeanContextServiceRevokedListener + BeanContextServices + BeanContextServicesListener + BeanContextServicesSupport + BeanContextServicesSupport.BCSSServiceProvider + BeanContextSupport + BeanContextSupport.BCSIterator + BeanDescriptor + BeanInfo + Beans + BevelBorder + Bidi + BigDecimal + BigInteger + BinaryRefAddr + BindException + Binding + Binding + BindingHelper + BindingHolder + BindingIterator + BindingIteratorHelper + BindingIteratorHolder + BindingIteratorOperations + BindingIteratorPOA + BindingListHelper + BindingListHolder + BindingType + BindingTypeHelper + BindingTypeHolder + BitSet + Blob + BlockView + BlockingQueue + Book + Boolean + BooleanControl + BooleanControl.Type + BooleanHolder + BooleanSeqHelper + BooleanSeqHolder + Border + BorderFactory + BorderLayout + BorderUIResource + BorderUIResource.BevelBorderUIResource + BorderUIResource.CompoundBorderUIResource + BorderUIResource.EmptyBorderUIResource + BorderUIResource.EtchedBorderUIResource + BorderUIResource.LineBorderUIResource + BorderUIResource.MatteBorderUIResource + BorderUIResource.TitledBorderUIResource + BoundedRangeModel + Bounds + Bounds + Box + Box.Filler + BoxLayout + BoxView + BoxedValueHelper + BreakIterator + BrokenBarrierException + Buffer + BufferCapabilities + BufferCapabilities.FlipContents + BufferOverflowException + BufferStrategy + BufferUnderflowException + BufferedImage + BufferedImageFilter + BufferedImageOp + BufferedInputStream + BufferedOutputStream + BufferedReader + BufferedWriter + Button + ButtonGroup + ButtonModel + ButtonUI + Byte + ByteArrayInputStream + ByteArrayOutputStream + ByteBuffer + ByteChannel + ByteHolder + ByteLookupTable + ByteOrder + CDATASection + CMMException + CODESET_INCOMPATIBLE + COMM_FAILURE + CRC32 + CRL + CRLException + CRLSelector + CSS + CSS.Attribute + CTX_RESTRICT_SCOPE + CacheRequest + CacheResponse + CachedRowSet + Calendar + Callable + CallableStatement + Callback + CallbackHandler + CancelablePrintJob + CancellationException + CancelledKeyException + CannotProceed + CannotProceedException + CannotProceedHelper + CannotProceedHolder + CannotRedoException + CannotUndoException + Canvas + CardLayout + Caret + CaretEvent + CaretListener + CellEditor + CellEditorListener + CellRendererPane + CertPath + CertPath.CertPathRep + CertPathBuilder + CertPathBuilderException + CertPathBuilderResult + CertPathBuilderSpi + CertPathParameters + CertPathTrustManagerParameters + CertPathValidator + CertPathValidatorException + CertPathValidatorResult + CertPathValidatorSpi + CertSelector + CertStore + CertStoreException + CertStoreParameters + CertStoreSpi + Certificate + Certificate + Certificate + Certificate.CertificateRep + CertificateEncodingException + CertificateEncodingException + CertificateException + CertificateException + CertificateExpiredException + CertificateExpiredException + CertificateFactory + CertificateFactorySpi + CertificateNotYetValidException + CertificateNotYetValidException + CertificateParsingException + CertificateParsingException + ChangeEvent + ChangeListener + ChangedCharSetException + Channel + ChannelBinding + Channels + CharArrayReader + CharArrayWriter + CharBuffer + CharConversionException + CharHolder + CharSeqHelper + CharSeqHolder + CharSequence + Character + Character.Subset + Character.UnicodeBlock + CharacterCodingException + CharacterData + CharacterIterator + Charset + CharsetDecoder + CharsetEncoder + CharsetProvider + Checkbox + CheckboxGroup + CheckboxMenuItem + CheckedInputStream + CheckedOutputStream + Checksum + Choice + ChoiceCallback + ChoiceFormat + Chromaticity + Cipher + CipherInputStream + CipherOutputStream + CipherSpi + Class + ClassCastException + ClassCircularityError + ClassDefinition + ClassDesc + ClassFileTransformer + ClassFormatError + ClassLoader + ClassLoaderRepository + ClassLoadingMXBean + ClassNotFoundException + ClientRequestInfo + ClientRequestInfoOperations + ClientRequestInterceptor + ClientRequestInterceptorOperations + Clip + Clipboard + ClipboardOwner + Clob + CloneNotSupportedException + Cloneable + Closeable + ClosedByInterruptException + ClosedChannelException + ClosedSelectorException + CodeSets + CodeSigner + CodeSource + Codec + CodecFactory + CodecFactoryHelper + CodecFactoryOperations + CodecOperations + CoderMalfunctionError + CoderResult + CodingErrorAction + CollationElementIterator + CollationKey + Collator + Collection + CollectionCertStoreParameters + Collections + Color + ColorChooserComponentFactory + ColorChooserUI + ColorConvertOp + ColorModel + ColorSelectionModel + ColorSpace + ColorSupported + ColorType + ColorUIResource + ComboBoxEditor + ComboBoxModel + ComboBoxUI + ComboPopup + Comment + CommunicationException + Comparable + Comparator + CompilationMXBean + Compiler + CompletionService + CompletionStatus + CompletionStatusHelper + Component + ComponentAdapter + ComponentColorModel + ComponentEvent + ComponentIdHelper + ComponentInputMap + ComponentInputMapUIResource + ComponentListener + ComponentOrientation + ComponentSampleModel + ComponentUI + ComponentView + Composite + CompositeContext + CompositeData + CompositeDataSupport + CompositeName + CompositeType + CompositeView + CompoundBorder + CompoundControl + CompoundControl.Type + CompoundEdit + CompoundName + Compression + ConcurrentHashMap + ConcurrentLinkedQueue + ConcurrentMap + ConcurrentModificationException + Condition + Configuration + ConfigurationException + ConfirmationCallback + ConnectException + ConnectException + ConnectIOException + Connection + ConnectionEvent + ConnectionEventListener + ConnectionPendingException + ConnectionPoolDataSource + ConsoleHandler + Constructor + Container + ContainerAdapter + ContainerEvent + ContainerListener + ContainerOrderFocusTraversalPolicy + ContentHandler + ContentHandler + ContentHandlerFactory + ContentModel + Context + Context + ContextList + ContextNotEmptyException + ContextualRenderedImageFactory + Control + Control + Control.Type + ControlFactory + ControllerEventListener + ConvolveOp + CookieHandler + CookieHolder + Copies + CopiesSupported + CopyOnWriteArrayList + CopyOnWriteArraySet + CountDownLatch + CounterMonitor + CounterMonitorMBean + CredentialException + CredentialExpiredException + CredentialNotFoundException + CropImageFilter + CubicCurve2D + CubicCurve2D.Double + CubicCurve2D.Float + Currency + Current + Current + Current + CurrentHelper + CurrentHelper + CurrentHelper + CurrentHolder + CurrentOperations + CurrentOperations + CurrentOperations + Cursor + CustomMarshal + CustomValue + Customizer + CyclicBarrier + DATA_CONVERSION + DESKeySpec + DESedeKeySpec + DGC + DHGenParameterSpec + DHKey + DHParameterSpec + DHPrivateKey + DHPrivateKeySpec + DHPublicKey + DHPublicKeySpec + DISCARDING + DOMConfiguration + DOMError + DOMErrorHandler + DOMException + DOMImplementation + DOMImplementationLS + DOMImplementationList + DOMImplementationRegistry + DOMImplementationSource + DOMLocator + DOMLocator + DOMResult + DOMSource + DOMStringList + DSAKey + DSAKeyPairGenerator + DSAParameterSpec + DSAParams + DSAPrivateKey + DSAPrivateKeySpec + DSAPublicKey + DSAPublicKeySpec + DTD + DTDConstants + DTDHandler + DataBuffer + DataBufferByte + DataBufferDouble + DataBufferFloat + DataBufferInt + DataBufferShort + DataBufferUShort + DataFlavor + DataFormatException + DataInput + DataInputStream + DataInputStream + DataLine + DataLine.Info + DataOutput + DataOutputStream + DataOutputStream + DataSource + DataTruncation + DatabaseMetaData + DatagramChannel + DatagramPacket + DatagramSocket + DatagramSocketImpl + DatagramSocketImplFactory + DatatypeConfigurationException + DatatypeConstants + DatatypeConstants.Field + DatatypeFactory + Date + Date + DateFormat + DateFormat.Field + DateFormatSymbols + DateFormatter + DateTimeAtCompleted + DateTimeAtCreation + DateTimeAtProcessing + DateTimeSyntax + DebugGraphics + DecimalFormat + DecimalFormatSymbols + DeclHandler + DefaultBoundedRangeModel + DefaultButtonModel + DefaultCaret + DefaultCellEditor + DefaultColorSelectionModel + DefaultComboBoxModel + DefaultDesktopManager + DefaultEditorKit + DefaultEditorKit.BeepAction + DefaultEditorKit.CopyAction + DefaultEditorKit.CutAction + DefaultEditorKit.DefaultKeyTypedAction + DefaultEditorKit.InsertBreakAction + DefaultEditorKit.InsertContentAction + DefaultEditorKit.InsertTabAction + DefaultEditorKit.PasteAction + DefaultFocusManager + DefaultFocusTraversalPolicy + DefaultFormatter + DefaultFormatterFactory + DefaultHandler + DefaultHandler2 + DefaultHighlighter + DefaultHighlighter.DefaultHighlightPainter + DefaultKeyboardFocusManager + DefaultListCellRenderer + DefaultListCellRenderer.UIResource + DefaultListModel + DefaultListSelectionModel + DefaultLoaderRepository + DefaultLoaderRepository + DefaultMenuLayout + DefaultMetalTheme + DefaultMutableTreeNode + DefaultPersistenceDelegate + DefaultSingleSelectionModel + DefaultStyledDocument + DefaultStyledDocument.AttributeUndoableEdit + DefaultStyledDocument.ElementSpec + DefaultTableCellRenderer + DefaultTableCellRenderer.UIResource + DefaultTableColumnModel + DefaultTableModel + DefaultTextUI + DefaultTreeCellEditor + DefaultTreeCellRenderer + DefaultTreeModel + DefaultTreeSelectionModel + DefinitionKind + DefinitionKindHelper + Deflater + DeflaterOutputStream + DelayQueue + Delayed + Delegate + Delegate + Delegate + DelegationPermission + Deprecated + Descriptor + DescriptorAccess + DescriptorSupport + DesignMode + DesktopIconUI + DesktopManager + DesktopPaneUI + Destination + DestroyFailedException + Destroyable + Dialog + Dictionary + DigestException + DigestInputStream + DigestOutputStream + Dimension + Dimension2D + DimensionUIResource + DirContext + DirObjectFactory + DirStateFactory + DirStateFactory.Result + DirectColorModel + DirectoryManager + DisplayMode + DnDConstants + Doc + DocAttribute + DocAttributeSet + DocFlavor + DocFlavor.BYTE_ARRAY + DocFlavor.CHAR_ARRAY + DocFlavor.INPUT_STREAM + DocFlavor.READER + DocFlavor.SERVICE_FORMATTED + DocFlavor.STRING + DocFlavor.URL + DocPrintJob + Document + Document + DocumentBuilder + DocumentBuilderFactory + DocumentEvent + DocumentEvent.ElementChange + DocumentEvent.EventType + DocumentFilter + DocumentFilter.FilterBypass + DocumentFragment + DocumentHandler + DocumentListener + DocumentName + DocumentParser + DocumentType + Documented + DomainCombiner + DomainManager + DomainManagerOperations + Double + DoubleBuffer + DoubleHolder + DoubleSeqHelper + DoubleSeqHolder + DragGestureEvent + DragGestureListener + DragGestureRecognizer + DragSource + DragSourceAdapter + DragSourceContext + DragSourceDragEvent + DragSourceDropEvent + DragSourceEvent + DragSourceListener + DragSourceMotionListener + Driver + DriverManager + DriverPropertyInfo + DropTarget + DropTarget.DropTargetAutoScroller + DropTargetAdapter + DropTargetContext + DropTargetDragEvent + DropTargetDropEvent + DropTargetEvent + DropTargetListener + DuplicateFormatFlagsException + DuplicateName + DuplicateNameHelper + Duration + DynAny + DynAny + DynAnyFactory + DynAnyFactoryHelper + DynAnyFactoryOperations + DynAnyHelper + DynAnyOperations + DynAnySeqHelper + DynArray + DynArray + DynArrayHelper + DynArrayOperations + DynEnum + DynEnum + DynEnumHelper + DynEnumOperations + DynFixed + DynFixed + DynFixedHelper + DynFixedOperations + DynSequence + DynSequence + DynSequenceHelper + DynSequenceOperations + DynStruct + DynStruct + DynStructHelper + DynStructOperations + DynUnion + DynUnion + DynUnionHelper + DynUnionOperations + DynValue + DynValue + DynValueBox + DynValueBoxOperations + DynValueCommon + DynValueCommonOperations + DynValueHelper + DynValueOperations + DynamicImplementation + DynamicImplementation + DynamicMBean + ECField + ECFieldF2m + ECFieldFp + ECGenParameterSpec + ECKey + ECParameterSpec + ECPoint + ECPrivateKey + ECPrivateKeySpec + ECPublicKey + ECPublicKeySpec + ENCODING_CDR_ENCAPS + EOFException + EditorKit + Element + Element + Element + ElementIterator + ElementType + Ellipse2D + Ellipse2D.Double + Ellipse2D.Float + EllipticCurve + EmptyBorder + EmptyStackException + EncodedKeySpec + Encoder + Encoding + EncryptedPrivateKeyInfo + Entity + Entity + EntityReference + EntityResolver + EntityResolver2 + Enum + EnumConstantNotPresentException + EnumControl + EnumControl.Type + EnumMap + EnumSet + EnumSyntax + Enumeration + Environment + Error + ErrorHandler + ErrorListener + ErrorManager + EtchedBorder + Event + EventContext + EventDirContext + EventHandler + EventListener + EventListenerList + EventListenerProxy + EventObject + EventQueue + EventSetDescriptor + Exception + ExceptionDetailMessage + ExceptionInInitializerError + ExceptionList + ExceptionListener + Exchanger + ExecutionException + Executor + ExecutorCompletionService + ExecutorService + Executors + ExemptionMechanism + ExemptionMechanismException + ExemptionMechanismSpi + ExpandVetoException + ExportException + Expression + ExtendedRequest + ExtendedResponse + Externalizable + FREE_MEM + FactoryConfigurationError + FailedLoginException + FeatureDescriptor + Fidelity + Field + FieldNameHelper + FieldNameHelper + FieldPosition + FieldView + File + FileCacheImageInputStream + FileCacheImageOutputStream + FileChannel + FileChannel.MapMode + FileChooserUI + FileDescriptor + FileDialog + FileFilter + FileFilter + FileHandler + FileImageInputStream + FileImageOutputStream + FileInputStream + FileLock + FileLockInterruptionException + FileNameMap + FileNotFoundException + FileOutputStream + FilePermission + FileReader + FileSystemView + FileView + FileWriter + FilenameFilter + Filter + FilterInputStream + FilterOutputStream + FilterReader + FilterWriter + FilteredImageSource + FilteredRowSet + Finishings + FixedHeightLayoutCache + FixedHolder + FlatteningPathIterator + FlavorEvent + FlavorException + FlavorListener + FlavorMap + FlavorTable + Float + FloatBuffer + FloatControl + FloatControl.Type + FloatHolder + FloatSeqHelper + FloatSeqHolder + FlowLayout + FlowView + FlowView.FlowStrategy + Flushable + FocusAdapter + FocusEvent + FocusListener + FocusManager + FocusTraversalPolicy + Font + FontFormatException + FontMetrics + FontRenderContext + FontUIResource + FormSubmitEvent + FormSubmitEvent.MethodType + FormView + Format + Format.Field + FormatConversionProvider + FormatFlagsConversionMismatchException + FormatMismatch + FormatMismatchHelper + Formattable + FormattableFlags + Formatter + Formatter + FormatterClosedException + ForwardRequest + ForwardRequest + ForwardRequestHelper + ForwardRequestHelper + Frame + Future + FutureTask + GSSContext + GSSCredential + GSSException + GSSManager + GSSName + GZIPInputStream + GZIPOutputStream + GapContent + GarbageCollectorMXBean + GatheringByteChannel + GaugeMonitor + GaugeMonitorMBean + GeneralPath + GeneralSecurityException + GenericArrayType + GenericDeclaration + GenericSignatureFormatError + GlyphJustificationInfo + GlyphMetrics + GlyphVector + GlyphView + GlyphView.GlyphPainter + GradientPaint + GraphicAttribute + Graphics + Graphics2D + GraphicsConfigTemplate + GraphicsConfiguration + GraphicsDevice + GraphicsEnvironment + GrayFilter + GregorianCalendar + GridBagConstraints + GridBagLayout + GridLayout + Group + Guard + GuardedObject + HOLDING + HTML + HTML.Attribute + HTML.Tag + HTML.UnknownTag + HTMLDocument + HTMLDocument.Iterator + HTMLEditorKit + HTMLEditorKit.HTMLFactory + HTMLEditorKit.HTMLTextAction + HTMLEditorKit.InsertHTMLTextAction + HTMLEditorKit.LinkController + HTMLEditorKit.Parser + HTMLEditorKit.ParserCallback + HTMLFrameHyperlinkEvent + HTMLWriter + Handler + HandlerBase + HandshakeCompletedEvent + HandshakeCompletedListener + HasControls + HashAttributeSet + HashDocAttributeSet + HashMap + HashPrintJobAttributeSet + HashPrintRequestAttributeSet + HashPrintServiceAttributeSet + HashSet + Hashtable + HeadlessException + HierarchyBoundsAdapter + HierarchyBoundsListener + HierarchyEvent + HierarchyListener + Highlighter + Highlighter.Highlight + Highlighter.HighlightPainter + HostnameVerifier + HttpRetryException + HttpURLConnection + HttpsURLConnection + HyperlinkEvent + HyperlinkEvent.EventType + HyperlinkListener + ICC_ColorSpace + ICC_Profile + ICC_ProfileGray + ICC_ProfileRGB + IDLEntity + IDLType + IDLTypeHelper + IDLTypeOperations + ID_ASSIGNMENT_POLICY_ID + ID_UNIQUENESS_POLICY_ID + IIOByteBuffer + IIOException + IIOImage + IIOInvalidTreeException + IIOMetadata + IIOMetadataController + IIOMetadataFormat + IIOMetadataFormatImpl + IIOMetadataNode + IIOParam + IIOParamController + IIOReadProgressListener + IIOReadUpdateListener + IIOReadWarningListener + IIORegistry + IIOServiceProvider + IIOWriteProgressListener + IIOWriteWarningListener + IMPLICIT_ACTIVATION_POLICY_ID + IMP_LIMIT + INACTIVE + INITIALIZE + INTERNAL + INTF_REPOS + INVALID_ACTIVITY + INVALID_TRANSACTION + INV_FLAG + INV_IDENT + INV_OBJREF + INV_POLICY + IOException + IOR + IORHelper + IORHolder + IORInfo + IORInfoOperations + IORInterceptor + IORInterceptorOperations + IORInterceptor_3_0 + IORInterceptor_3_0Helper + IORInterceptor_3_0Holder + IORInterceptor_3_0Operations + IRObject + IRObjectOperations + Icon + IconUIResource + IconView + IdAssignmentPolicy + IdAssignmentPolicyOperations + IdAssignmentPolicyValue + IdUniquenessPolicy + IdUniquenessPolicyOperations + IdUniquenessPolicyValue + IdentifierHelper + Identity + IdentityHashMap + IdentityScope + IllegalAccessError + IllegalAccessException + IllegalArgumentException + IllegalBlockSizeException + IllegalBlockingModeException + IllegalCharsetNameException + IllegalClassFormatException + IllegalComponentStateException + IllegalFormatCodePointException + IllegalFormatConversionException + IllegalFormatException + IllegalFormatFlagsException + IllegalFormatPrecisionException + IllegalFormatWidthException + IllegalMonitorStateException + IllegalPathStateException + IllegalSelectorException + IllegalStateException + IllegalThreadStateException + Image + ImageCapabilities + ImageConsumer + ImageFilter + ImageGraphicAttribute + ImageIO + ImageIcon + ImageInputStream + ImageInputStreamImpl + ImageInputStreamSpi + ImageObserver + ImageOutputStream + ImageOutputStreamImpl + ImageOutputStreamSpi + ImageProducer + ImageReadParam + ImageReader + ImageReaderSpi + ImageReaderWriterSpi + ImageTranscoder + ImageTranscoderSpi + ImageTypeSpecifier + ImageView + ImageWriteParam + ImageWriter + ImageWriterSpi + ImagingOpException + ImplicitActivationPolicy + ImplicitActivationPolicyOperations + ImplicitActivationPolicyValue + IncompatibleClassChangeError + IncompleteAnnotationException + InconsistentTypeCode + InconsistentTypeCode + InconsistentTypeCodeHelper + IndexColorModel + IndexOutOfBoundsException + IndexedPropertyChangeEvent + IndexedPropertyDescriptor + IndirectionException + Inet4Address + Inet6Address + InetAddress + InetSocketAddress + Inflater + InflaterInputStream + InheritableThreadLocal + Inherited + InitialContext + InitialContextFactory + InitialContextFactoryBuilder + InitialDirContext + InitialLdapContext + InlineView + InputContext + InputEvent + InputMap + InputMapUIResource + InputMethod + InputMethodContext + InputMethodDescriptor + InputMethodEvent + InputMethodHighlight + InputMethodListener + InputMethodRequests + InputMismatchException + InputSource + InputStream + InputStream + InputStream + InputStreamReader + InputSubset + InputVerifier + Insets + InsetsUIResource + InstanceAlreadyExistsException + InstanceNotFoundException + InstantiationError + InstantiationException + Instrument + Instrumentation + InsufficientResourcesException + IntBuffer + IntHolder + Integer + IntegerSyntax + Interceptor + InterceptorOperations + InternalError + InternalFrameAdapter + InternalFrameEvent + InternalFrameFocusTraversalPolicy + InternalFrameListener + InternalFrameUI + InternationalFormatter + InterruptedException + InterruptedIOException + InterruptedNamingException + InterruptibleChannel + IntrospectionException + IntrospectionException + Introspector + Invalid + InvalidActivityException + InvalidAddress + InvalidAddressHelper + InvalidAddressHolder + InvalidAlgorithmParameterException + InvalidApplicationException + InvalidAttributeIdentifierException + InvalidAttributeValueException + InvalidAttributeValueException + InvalidAttributesException + InvalidClassException + InvalidDnDOperationException + InvalidKeyException + InvalidKeyException + InvalidKeySpecException + InvalidMarkException + InvalidMidiDataException + InvalidName + InvalidName + InvalidName + InvalidNameException + InvalidNameHelper + InvalidNameHelper + InvalidNameHolder + InvalidObjectException + InvalidOpenTypeException + InvalidParameterException + InvalidParameterSpecException + InvalidPolicy + InvalidPolicyHelper + InvalidPreferencesFormatException + InvalidPropertiesFormatException + InvalidRelationIdException + InvalidRelationServiceException + InvalidRelationTypeException + InvalidRoleInfoException + InvalidRoleValueException + InvalidSearchControlsException + InvalidSearchFilterException + InvalidSeq + InvalidSlot + InvalidSlotHelper + InvalidTargetObjectTypeException + InvalidTransactionException + InvalidTypeForEncoding + InvalidTypeForEncodingHelper + InvalidValue + InvalidValue + InvalidValueHelper + InvocationEvent + InvocationHandler + InvocationTargetException + InvokeHandler + IstringHelper + ItemEvent + ItemListener + ItemSelectable + Iterable + Iterator + IvParameterSpec + JApplet + JButton + JCheckBox + JCheckBoxMenuItem + JColorChooser + JComboBox + JComboBox.KeySelectionManager + JComponent + JDesktopPane + JDialog + JEditorPane + JFileChooser + JFormattedTextField + JFormattedTextField.AbstractFormatter + JFormattedTextField.AbstractFormatterFactory + JFrame + JInternalFrame + JInternalFrame.JDesktopIcon + JLabel + JLayeredPane + JList + JMException + JMRuntimeException + JMXAuthenticator + JMXConnectionNotification + JMXConnector + JMXConnectorFactory + JMXConnectorProvider + JMXConnectorServer + JMXConnectorServerFactory + JMXConnectorServerMBean + JMXConnectorServerProvider + JMXPrincipal + JMXProviderException + JMXServerErrorException + JMXServiceURL + JMenu + JMenuBar + JMenuItem + JOptionPane + JPEGHuffmanTable + JPEGImageReadParam + JPEGImageWriteParam + JPEGQTable + JPanel + JPasswordField + JPopupMenu + JPopupMenu.Separator + JProgressBar + JRadioButton + JRadioButtonMenuItem + JRootPane + JScrollBar + JScrollPane + JSeparator + JSlider + JSpinner + JSpinner.DateEditor + JSpinner.DefaultEditor + JSpinner.ListEditor + JSpinner.NumberEditor + JSplitPane + JTabbedPane + JTable + JTable.PrintMode + JTableHeader + JTextArea + JTextComponent + JTextComponent.KeyBinding + JTextField + JTextPane + JToggleButton + JToggleButton.ToggleButtonModel + JToolBar + JToolBar.Separator + JToolTip + JTree + JTree.DynamicUtilTreeNode + JTree.EmptySelectionModel + JViewport + JWindow + JarEntry + JarException + JarFile + JarInputStream + JarOutputStream + JarURLConnection + JdbcRowSet + JobAttributes + JobAttributes.DefaultSelectionType + JobAttributes.DestinationType + JobAttributes.DialogType + JobAttributes.MultipleDocumentHandlingType + JobAttributes.SidesType + JobHoldUntil + JobImpressions + JobImpressionsCompleted + JobImpressionsSupported + JobKOctets + JobKOctetsProcessed + JobKOctetsSupported + JobMediaSheets + JobMediaSheetsCompleted + JobMediaSheetsSupported + JobMessageFromOperator + JobName + JobOriginatingUserName + JobPriority + JobPrioritySupported + JobSheets + JobState + JobStateReason + JobStateReasons + JoinRowSet + Joinable + KerberosKey + KerberosPrincipal + KerberosTicket + Kernel + Key + KeyAdapter + KeyAgreement + KeyAgreementSpi + KeyAlreadyExistsException + KeyEvent + KeyEventDispatcher + KeyEventPostProcessor + KeyException + KeyFactory + KeyFactorySpi + KeyGenerator + KeyGeneratorSpi + KeyListener + KeyManagementException + KeyManager + KeyManagerFactory + KeyManagerFactorySpi + KeyPair + KeyPairGenerator + KeyPairGeneratorSpi + KeyRep + KeyRep.Type + KeySpec + KeyStore + KeyStore.Builder + KeyStore.CallbackHandlerProtection + KeyStore.Entry + KeyStore.LoadStoreParameter + KeyStore.PasswordProtection + KeyStore.PrivateKeyEntry + KeyStore.ProtectionParameter + KeyStore.SecretKeyEntry + KeyStore.TrustedCertificateEntry + KeyStoreBuilderParameters + KeyStoreException + KeyStoreSpi + KeyStroke + KeyboardFocusManager + Keymap + LDAPCertStoreParameters + LIFESPAN_POLICY_ID + LOCATION_FORWARD + LSException + LSInput + LSLoadEvent + LSOutput + LSParser + LSParserFilter + LSProgressEvent + LSResourceResolver + LSSerializer + LSSerializerFilter + Label + LabelUI + LabelView + LanguageCallback + LastOwnerException + LayeredHighlighter + LayeredHighlighter.LayerPainter + LayoutFocusTraversalPolicy + LayoutManager + LayoutManager2 + LayoutQueue + LdapContext + LdapName + LdapReferralException + Lease + Level + LexicalHandler + LifespanPolicy + LifespanPolicyOperations + LifespanPolicyValue + LimitExceededException + Line + Line.Info + Line2D + Line2D.Double + Line2D.Float + LineBorder + LineBreakMeasurer + LineEvent + LineEvent.Type + LineListener + LineMetrics + LineNumberInputStream + LineNumberReader + LineUnavailableException + LinkException + LinkLoopException + LinkRef + LinkageError + LinkedBlockingQueue + LinkedHashMap + LinkedHashSet + LinkedList + List + List + ListCellRenderer + ListDataEvent + ListDataListener + ListIterator + ListModel + ListResourceBundle + ListSelectionEvent + ListSelectionListener + ListSelectionModel + ListUI + ListView + ListenerNotFoundException + LoaderHandler + LocalObject + Locale + LocateRegistry + Locator + Locator2 + Locator2Impl + LocatorImpl + Lock + LockSupport + LogManager + LogRecord + LogStream + Logger + LoggingMXBean + LoggingPermission + LoginContext + LoginException + LoginModule + Long + LongBuffer + LongHolder + LongLongSeqHelper + LongLongSeqHolder + LongSeqHelper + LongSeqHolder + LookAndFeel + LookupOp + LookupTable + MARSHAL + MBeanAttributeInfo + MBeanConstructorInfo + MBeanException + MBeanFeatureInfo + MBeanInfo + MBeanNotificationInfo + MBeanOperationInfo + MBeanParameterInfo + MBeanPermission + MBeanRegistration + MBeanRegistrationException + MBeanServer + MBeanServerBuilder + MBeanServerConnection + MBeanServerDelegate + MBeanServerDelegateMBean + MBeanServerFactory + MBeanServerForwarder + MBeanServerInvocationHandler + MBeanServerNotification + MBeanServerNotificationFilter + MBeanServerPermission + MBeanTrustPermission + MGF1ParameterSpec + MLet + MLetMBean + Mac + MacSpi + MalformedInputException + MalformedLinkException + MalformedObjectNameException + MalformedParameterizedTypeException + MalformedURLException + ManageReferralControl + ManagementFactory + ManagementPermission + ManagerFactoryParameters + Manifest + Map + Map.Entry + MappedByteBuffer + MarshalException + MarshalledObject + MaskFormatter + MatchResult + Matcher + Math + MathContext + MatteBorder + Media + MediaName + MediaPrintableArea + MediaSize + MediaSize.Engineering + MediaSize.ISO + MediaSize.JIS + MediaSize.NA + MediaSize.Other + MediaSizeName + MediaTracker + MediaTray + Member + MemoryCacheImageInputStream + MemoryCacheImageOutputStream + MemoryHandler + MemoryImageSource + MemoryMXBean + MemoryManagerMXBean + MemoryNotificationInfo + MemoryPoolMXBean + MemoryType + MemoryUsage + Menu + MenuBar + MenuBarUI + MenuComponent + MenuContainer + MenuDragMouseEvent + MenuDragMouseListener + MenuElement + MenuEvent + MenuItem + MenuItemUI + MenuKeyEvent + MenuKeyListener + MenuListener + MenuSelectionManager + MenuShortcut + MessageDigest + MessageDigestSpi + MessageFormat + MessageFormat.Field + MessageProp + MetaEventListener + MetaMessage + MetalBorders + MetalBorders.ButtonBorder + MetalBorders.Flush3DBorder + MetalBorders.InternalFrameBorder + MetalBorders.MenuBarBorder + MetalBorders.MenuItemBorder + MetalBorders.OptionDialogBorder + MetalBorders.PaletteBorder + MetalBorders.PopupMenuBorder + MetalBorders.RolloverButtonBorder + MetalBorders.ScrollPaneBorder + MetalBorders.TableHeaderBorder + MetalBorders.TextFieldBorder + MetalBorders.ToggleButtonBorder + MetalBorders.ToolBarBorder + MetalButtonUI + MetalCheckBoxIcon + MetalCheckBoxUI + MetalComboBoxButton + MetalComboBoxEditor + MetalComboBoxEditor.UIResource + MetalComboBoxIcon + MetalComboBoxUI + MetalDesktopIconUI + MetalFileChooserUI + MetalIconFactory + MetalIconFactory.FileIcon16 + MetalIconFactory.FolderIcon16 + MetalIconFactory.PaletteCloseIcon + MetalIconFactory.TreeControlIcon + MetalIconFactory.TreeFolderIcon + MetalIconFactory.TreeLeafIcon + MetalInternalFrameTitlePane + MetalInternalFrameUI + MetalLabelUI + MetalLookAndFeel + MetalMenuBarUI + MetalPopupMenuSeparatorUI + MetalProgressBarUI + MetalRadioButtonUI + MetalRootPaneUI + MetalScrollBarUI + MetalScrollButton + MetalScrollPaneUI + MetalSeparatorUI + MetalSliderUI + MetalSplitPaneUI + MetalTabbedPaneUI + MetalTextFieldUI + MetalTheme + MetalToggleButtonUI + MetalToolBarUI + MetalToolTipUI + MetalTreeUI + Method + MethodDescriptor + MidiChannel + MidiDevice + MidiDevice.Info + MidiDeviceProvider + MidiEvent + MidiFileFormat + MidiFileReader + MidiFileWriter + MidiMessage + MidiSystem + MidiUnavailableException + MimeTypeParseException + MinimalHTMLWriter + MissingFormatArgumentException + MissingFormatWidthException + MissingResourceException + Mixer + Mixer.Info + MixerProvider + ModelMBean + ModelMBeanAttributeInfo + ModelMBeanConstructorInfo + ModelMBeanInfo + ModelMBeanInfoSupport + ModelMBeanNotificationBroadcaster + ModelMBeanNotificationInfo + ModelMBeanOperationInfo + ModificationItem + Modifier + Monitor + MonitorMBean + MonitorNotification + MonitorSettingException + MouseAdapter + MouseDragGestureRecognizer + MouseEvent + MouseInfo + MouseInputAdapter + MouseInputListener + MouseListener + MouseMotionAdapter + MouseMotionListener + MouseWheelEvent + MouseWheelListener + MultiButtonUI + MultiColorChooserUI + MultiComboBoxUI + MultiDesktopIconUI + MultiDesktopPaneUI + MultiDoc + MultiDocPrintJob + MultiDocPrintService + MultiFileChooserUI + MultiInternalFrameUI + MultiLabelUI + MultiListUI + MultiLookAndFeel + MultiMenuBarUI + MultiMenuItemUI + MultiOptionPaneUI + MultiPanelUI + MultiPixelPackedSampleModel + MultiPopupMenuUI + MultiProgressBarUI + MultiRootPaneUI + MultiScrollBarUI + MultiScrollPaneUI + MultiSeparatorUI + MultiSliderUI + MultiSpinnerUI + MultiSplitPaneUI + MultiTabbedPaneUI + MultiTableHeaderUI + MultiTableUI + MultiTextUI + MultiToolBarUI + MultiToolTipUI + MultiTreeUI + MultiViewportUI + MulticastSocket + MultipleComponentProfileHelper + MultipleComponentProfileHolder + MultipleDocumentHandling + MultipleMaster + MutableAttributeSet + MutableComboBoxModel + MutableTreeNode + NON_EXISTENT + NO_IMPLEMENT + NO_MEMORY + NO_PERMISSION + NO_RESOURCES + NO_RESPONSE + NVList + Name + NameAlreadyBoundException + NameCallback + NameClassPair + NameComponent + NameComponentHelper + NameComponentHolder + NameDynAnyPair + NameDynAnyPairHelper + NameDynAnyPairSeqHelper + NameHelper + NameHolder + NameList + NameNotFoundException + NameParser + NameValuePair + NameValuePair + NameValuePairHelper + NameValuePairHelper + NameValuePairSeqHelper + NamedNodeMap + NamedValue + NamespaceChangeListener + NamespaceContext + NamespaceSupport + Naming + NamingContext + NamingContextExt + NamingContextExtHelper + NamingContextExtHolder + NamingContextExtOperations + NamingContextExtPOA + NamingContextHelper + NamingContextHolder + NamingContextOperations + NamingContextPOA + NamingEnumeration + NamingEvent + NamingException + NamingExceptionEvent + NamingListener + NamingManager + NamingSecurityException + NavigationFilter + NavigationFilter.FilterBypass + NegativeArraySizeException + NetPermission + NetworkInterface + NoClassDefFoundError + NoConnectionPendingException + NoContext + NoContextHelper + NoInitialContextException + NoPermissionException + NoRouteToHostException + NoServant + NoServantHelper + NoSuchAlgorithmException + NoSuchAttributeException + NoSuchElementException + NoSuchFieldError + NoSuchFieldException + NoSuchMethodError + NoSuchMethodException + NoSuchObjectException + NoSuchPaddingException + NoSuchProviderException + Node + NodeChangeEvent + NodeChangeListener + NodeList + NonReadableChannelException + NonWritableChannelException + NoninvertibleTransformException + NotActiveException + NotBoundException + NotCompliantMBeanException + NotContextException + NotEmpty + NotEmptyHelper + NotEmptyHolder + NotFound + NotFoundHelper + NotFoundHolder + NotFoundReason + NotFoundReasonHelper + NotFoundReasonHolder + NotOwnerException + NotSerializableException + NotYetBoundException + NotYetConnectedException + Notation + Notification + NotificationBroadcaster + NotificationBroadcasterSupport + NotificationEmitter + NotificationFilter + NotificationFilterSupport + NotificationListener + NotificationResult + NullCipher + NullPointerException + Number + NumberFormat + NumberFormat.Field + NumberFormatException + NumberFormatter + NumberOfDocuments + NumberOfInterveningJobs + NumberUp + NumberUpSupported + NumericShaper + OAEPParameterSpec + OBJECT_NOT_EXIST + OBJ_ADAPTER + OMGVMCID + ORB + ORB + ORBIdHelper + ORBInitInfo + ORBInitInfoOperations + ORBInitializer + ORBInitializerOperations + ObjID + Object + Object + ObjectAlreadyActive + ObjectAlreadyActiveHelper + ObjectChangeListener + ObjectFactory + ObjectFactoryBuilder + ObjectHelper + ObjectHolder + ObjectIdHelper + ObjectIdHelper + ObjectImpl + ObjectImpl + ObjectInput + ObjectInputStream + ObjectInputStream.GetField + ObjectInputValidation + ObjectInstance + ObjectName + ObjectNotActive + ObjectNotActiveHelper + ObjectOutput + ObjectOutputStream + ObjectOutputStream.PutField + ObjectReferenceFactory + ObjectReferenceFactoryHelper + ObjectReferenceFactoryHolder + ObjectReferenceTemplate + ObjectReferenceTemplateHelper + ObjectReferenceTemplateHolder + ObjectReferenceTemplateSeqHelper + ObjectReferenceTemplateSeqHolder + ObjectStreamClass + ObjectStreamConstants + ObjectStreamException + ObjectStreamField + ObjectView + Observable + Observer + OceanTheme + OctetSeqHelper + OctetSeqHolder + Oid + OpenDataException + OpenMBeanAttributeInfo + OpenMBeanAttributeInfoSupport + OpenMBeanConstructorInfo + OpenMBeanConstructorInfoSupport + OpenMBeanInfo + OpenMBeanInfoSupport + OpenMBeanOperationInfo + OpenMBeanOperationInfoSupport + OpenMBeanParameterInfo + OpenMBeanParameterInfoSupport + OpenType + OpenType + OperatingSystemMXBean + Operation + OperationNotSupportedException + OperationsException + Option + OptionPaneUI + OptionalDataException + OrientationRequested + OutOfMemoryError + OutputDeviceAssigned + OutputKeys + OutputStream + OutputStream + OutputStream + OutputStreamWriter + OverlappingFileLockException + OverlayLayout + Override + Owner + PBEKey + PBEKeySpec + PBEParameterSpec + PDLOverrideSupported + PERSIST_STORE + PKCS8EncodedKeySpec + PKIXBuilderParameters + PKIXCertPathBuilderResult + PKIXCertPathChecker + PKIXCertPathValidatorResult + PKIXParameters + POA + POAHelper + POAManager + POAManagerOperations + POAOperations + PRIVATE_MEMBER + PSSParameterSpec + PSource + PSource.PSpecified + PUBLIC_MEMBER + Pack200 + Pack200.Packer + Pack200.Unpacker + Package + PackedColorModel + PageAttributes + PageAttributes.ColorType + PageAttributes.MediaType + PageAttributes.OrientationRequestedType + PageAttributes.OriginType + PageAttributes.PrintQualityType + PageFormat + PageRanges + Pageable + PagedResultsControl + PagedResultsResponseControl + PagesPerMinute + PagesPerMinuteColor + Paint + PaintContext + PaintEvent + Panel + PanelUI + Paper + ParagraphView + ParagraphView + Parameter + ParameterBlock + ParameterDescriptor + ParameterMetaData + ParameterMode + ParameterModeHelper + ParameterModeHolder + ParameterizedType + ParseException + ParsePosition + Parser + Parser + ParserAdapter + ParserConfigurationException + ParserDelegator + ParserFactory + PartialResultException + PasswordAuthentication + PasswordCallback + PasswordView + Patch + PathIterator + Pattern + PatternSyntaxException + Permission + Permission + PermissionCollection + Permissions + PersistenceDelegate + PersistentMBean + PhantomReference + Pipe + Pipe.SinkChannel + Pipe.SourceChannel + PipedInputStream + PipedOutputStream + PipedReader + PipedWriter + PixelGrabber + PixelInterleavedSampleModel + PlainDocument + PlainView + Point + Point2D + Point2D.Double + Point2D.Float + PointerInfo + Policy + Policy + Policy + PolicyError + PolicyErrorCodeHelper + PolicyErrorHelper + PolicyErrorHolder + PolicyFactory + PolicyFactoryOperations + PolicyHelper + PolicyHolder + PolicyListHelper + PolicyListHolder + PolicyNode + PolicyOperations + PolicyQualifierInfo + PolicyTypeHelper + Polygon + PooledConnection + Popup + PopupFactory + PopupMenu + PopupMenuEvent + PopupMenuListener + PopupMenuUI + Port + Port.Info + PortUnreachableException + PortableRemoteObject + PortableRemoteObjectDelegate + Position + Position.Bias + Predicate + PreferenceChangeEvent + PreferenceChangeListener + Preferences + PreferencesFactory + PreparedStatement + PresentationDirection + Principal + Principal + PrincipalHolder + PrintEvent + PrintException + PrintGraphics + PrintJob + PrintJobAdapter + PrintJobAttribute + PrintJobAttributeEvent + PrintJobAttributeListener + PrintJobAttributeSet + PrintJobEvent + PrintJobListener + PrintQuality + PrintRequestAttribute + PrintRequestAttributeSet + PrintService + PrintServiceAttribute + PrintServiceAttributeEvent + PrintServiceAttributeListener + PrintServiceAttributeSet + PrintServiceLookup + PrintStream + PrintWriter + Printable + PrinterAbortException + PrinterException + PrinterGraphics + PrinterIOException + PrinterInfo + PrinterIsAcceptingJobs + PrinterJob + PrinterLocation + PrinterMakeAndModel + PrinterMessageFromOperator + PrinterMoreInfo + PrinterMoreInfoManufacturer + PrinterName + PrinterResolution + PrinterState + PrinterStateReason + PrinterStateReasons + PrinterURI + PriorityBlockingQueue + PriorityQueue + PrivateClassLoader + PrivateCredentialPermission + PrivateKey + PrivateMLet + PrivilegedAction + PrivilegedActionException + PrivilegedExceptionAction + Process + ProcessBuilder + ProcessingInstruction + ProfileDataException + ProfileIdHelper + ProgressBarUI + ProgressMonitor + ProgressMonitorInputStream + Properties + PropertyChangeEvent + PropertyChangeListener + PropertyChangeListenerProxy + PropertyChangeSupport + PropertyDescriptor + PropertyEditor + PropertyEditorManager + PropertyEditorSupport + PropertyPermission + PropertyResourceBundle + PropertyVetoException + ProtectionDomain + ProtocolException + Provider + Provider.Service + ProviderException + Proxy + Proxy + Proxy.Type + ProxySelector + PublicKey + PushbackInputStream + PushbackReader + QName + QuadCurve2D + QuadCurve2D.Double + QuadCurve2D.Float + Query + QueryEval + QueryExp + Queue + QueuedJobCount + RC2ParameterSpec + RC5ParameterSpec + REBIND + REQUEST_PROCESSING_POLICY_ID + RGBImageFilter + RMIClassLoader + RMIClassLoaderSpi + RMIClientSocketFactory + RMIConnection + RMIConnectionImpl + RMIConnectionImpl_Stub + RMIConnector + RMIConnectorServer + RMICustomMaxStreamFormat + RMIFailureHandler + RMIIIOPServerImpl + RMIJRMPServerImpl + RMISecurityException + RMISecurityManager + RMIServer + RMIServerImpl + RMIServerImpl_Stub + RMIServerSocketFactory + RMISocketFactory + RSAKey + RSAKeyGenParameterSpec + RSAMultiPrimePrivateCrtKey + RSAMultiPrimePrivateCrtKeySpec + RSAOtherPrimeInfo + RSAPrivateCrtKey + RSAPrivateCrtKeySpec + RSAPrivateKey + RSAPrivateKeySpec + RSAPublicKey + RSAPublicKeySpec + RTFEditorKit + Random + RandomAccess + RandomAccessFile + Raster + RasterFormatException + RasterOp + Rdn + ReadOnlyBufferException + ReadWriteLock + Readable + ReadableByteChannel + Reader + RealmCallback + RealmChoiceCallback + Receiver + Rectangle + Rectangle2D + Rectangle2D.Double + Rectangle2D.Float + RectangularShape + ReentrantLock + ReentrantReadWriteLock + ReentrantReadWriteLock.ReadLock + ReentrantReadWriteLock.WriteLock + Ref + RefAddr + Reference + Reference + ReferenceQueue + ReferenceUriSchemesSupported + Referenceable + ReferralException + ReflectPermission + ReflectionException + RefreshFailedException + Refreshable + Region + RegisterableService + Registry + RegistryHandler + RejectedExecutionException + RejectedExecutionHandler + Relation + RelationException + RelationNotFoundException + RelationNotification + RelationService + RelationServiceMBean + RelationServiceNotRegisteredException + RelationSupport + RelationSupportMBean + RelationType + RelationTypeNotFoundException + RelationTypeSupport + RemarshalException + Remote + RemoteCall + RemoteException + RemoteObject + RemoteObjectInvocationHandler + RemoteRef + RemoteServer + RemoteStub + RenderContext + RenderableImage + RenderableImageOp + RenderableImageProducer + RenderedImage + RenderedImageFactory + Renderer + RenderingHints + RenderingHints.Key + RepaintManager + ReplicateScaleFilter + RepositoryIdHelper + Request + RequestInfo + RequestInfoOperations + RequestProcessingPolicy + RequestProcessingPolicyOperations + RequestProcessingPolicyValue + RequestingUserName + RequiredModelMBean + RescaleOp + ResolutionSyntax + ResolveResult + Resolver + ResourceBundle + ResponseCache + ResponseHandler + Result + ResultSet + ResultSetMetaData + Retention + RetentionPolicy + ReverbType + Robot + Role + RoleInfo + RoleInfoNotFoundException + RoleList + RoleNotFoundException + RoleResult + RoleStatus + RoleUnresolved + RoleUnresolvedList + RootPaneContainer + RootPaneUI + RoundRectangle2D + RoundRectangle2D.Double + RoundRectangle2D.Float + RoundingMode + RowMapper + RowSet + RowSetEvent + RowSetInternal + RowSetListener + RowSetMetaData + RowSetMetaDataImpl + RowSetReader + RowSetWarning + RowSetWriter + RuleBasedCollator + RunTime + RunTimeOperations + Runnable + Runtime + RuntimeErrorException + RuntimeException + RuntimeMBeanException + RuntimeMXBean + RuntimeOperationsException + RuntimePermission + SAXException + SAXNotRecognizedException + SAXNotSupportedException + SAXParseException + SAXParser + SAXParserFactory + SAXResult + SAXSource + SAXTransformerFactory + SERVANT_RETENTION_POLICY_ID + SQLData + SQLException + SQLInput + SQLInputImpl + SQLOutput + SQLOutputImpl + SQLPermission + SQLWarning + SSLContext + SSLContextSpi + SSLEngine + SSLEngineResult + SSLEngineResult.HandshakeStatus + SSLEngineResult.Status + SSLException + SSLHandshakeException + SSLKeyException + SSLPeerUnverifiedException + SSLPermission + SSLProtocolException + SSLServerSocket + SSLServerSocketFactory + SSLSession + SSLSessionBindingEvent + SSLSessionBindingListener + SSLSessionContext + SSLSocket + SSLSocketFactory + SUCCESSFUL + SYNC_WITH_TRANSPORT + SYSTEM_EXCEPTION + SampleModel + Sasl + SaslClient + SaslClientFactory + SaslException + SaslServer + SaslServerFactory + Savepoint + Scanner + ScatteringByteChannel + ScheduledExecutorService + ScheduledFuture + ScheduledThreadPoolExecutor + Schema + SchemaFactory + SchemaFactoryLoader + SchemaViolationException + ScrollBarUI + ScrollPane + ScrollPaneAdjustable + ScrollPaneConstants + ScrollPaneLayout + ScrollPaneLayout.UIResource + ScrollPaneUI + Scrollable + Scrollbar + SealedObject + SearchControls + SearchResult + SecretKey + SecretKeyFactory + SecretKeyFactorySpi + SecretKeySpec + SecureCacheResponse + SecureClassLoader + SecureRandom + SecureRandomSpi + Security + SecurityException + SecurityManager + SecurityPermission + Segment + SelectableChannel + SelectionKey + Selector + SelectorProvider + Semaphore + SeparatorUI + Sequence + SequenceInputStream + Sequencer + Sequencer.SyncMode + SerialArray + SerialBlob + SerialClob + SerialDatalink + SerialException + SerialJavaObject + SerialRef + SerialStruct + Serializable + SerializablePermission + Servant + ServantActivator + ServantActivatorHelper + ServantActivatorOperations + ServantActivatorPOA + ServantAlreadyActive + ServantAlreadyActiveHelper + ServantLocator + ServantLocatorHelper + ServantLocatorOperations + ServantLocatorPOA + ServantManager + ServantManagerOperations + ServantNotActive + ServantNotActiveHelper + ServantObject + ServantRetentionPolicy + ServantRetentionPolicyOperations + ServantRetentionPolicyValue + ServerCloneException + ServerError + ServerException + ServerIdHelper + ServerNotActiveException + ServerRef + ServerRequest + ServerRequestInfo + ServerRequestInfoOperations + ServerRequestInterceptor + ServerRequestInterceptorOperations + ServerRuntimeException + ServerSocket + ServerSocketChannel + ServerSocketFactory + ServiceContext + ServiceContextHelper + ServiceContextHolder + ServiceContextListHelper + ServiceContextListHolder + ServiceDetail + ServiceDetailHelper + ServiceIdHelper + ServiceInformation + ServiceInformationHelper + ServiceInformationHolder + ServiceNotFoundException + ServicePermission + ServiceRegistry + ServiceRegistry.Filter + ServiceUI + ServiceUIFactory + ServiceUnavailableException + Set + SetOfIntegerSyntax + SetOverrideType + SetOverrideTypeHelper + Severity + Shape + ShapeGraphicAttribute + SheetCollate + Short + ShortBuffer + ShortBufferException + ShortHolder + ShortLookupTable + ShortMessage + ShortSeqHelper + ShortSeqHolder + Sides + Signature + SignatureException + SignatureSpi + SignedObject + Signer + SimpleAttributeSet + SimpleBeanInfo + SimpleDateFormat + SimpleDoc + SimpleFormatter + SimpleTimeZone + SimpleType + SinglePixelPackedSampleModel + SingleSelectionModel + Size2DSyntax + SizeLimitExceededException + SizeRequirements + SizeSequence + Skeleton + SkeletonMismatchException + SkeletonNotFoundException + SliderUI + Socket + SocketAddress + SocketChannel + SocketException + SocketFactory + SocketHandler + SocketImpl + SocketImplFactory + SocketOptions + SocketPermission + SocketSecurityException + SocketTimeoutException + SoftBevelBorder + SoftReference + SortControl + SortKey + SortResponseControl + SortedMap + SortedSet + SortingFocusTraversalPolicy + Soundbank + SoundbankReader + SoundbankResource + Source + SourceDataLine + SourceLocator + SpinnerDateModel + SpinnerListModel + SpinnerModel + SpinnerNumberModel + SpinnerUI + SplitPaneUI + Spring + SpringLayout + SpringLayout.Constraints + SslRMIClientSocketFactory + SslRMIServerSocketFactory + Stack + StackOverflowError + StackTraceElement + StandardMBean + StartTlsRequest + StartTlsResponse + State + StateEdit + StateEditable + StateFactory + Statement + Statement + StreamCorruptedException + StreamHandler + StreamPrintService + StreamPrintServiceFactory + StreamResult + StreamSource + StreamTokenizer + Streamable + StreamableValue + StrictMath + String + StringBuffer + StringBufferInputStream + StringBuilder + StringCharacterIterator + StringContent + StringHolder + StringIndexOutOfBoundsException + StringMonitor + StringMonitorMBean + StringNameHelper + StringReader + StringRefAddr + StringSelection + StringSeqHelper + StringSeqHolder + StringTokenizer + StringValueExp + StringValueHelper + StringWriter + Stroke + Struct + StructMember + StructMemberHelper + Stub + StubDelegate + StubNotFoundException + Style + StyleConstants + StyleConstants.CharacterConstants + StyleConstants.ColorConstants + StyleConstants.FontConstants + StyleConstants.ParagraphConstants + StyleContext + StyleSheet + StyleSheet.BoxPainter + StyleSheet.ListPainter + StyledDocument + StyledEditorKit + StyledEditorKit.AlignmentAction + StyledEditorKit.BoldAction + StyledEditorKit.FontFamilyAction + StyledEditorKit.FontSizeAction + StyledEditorKit.ForegroundAction + StyledEditorKit.ItalicAction + StyledEditorKit.StyledTextAction + StyledEditorKit.UnderlineAction + Subject + SubjectDelegationPermission + SubjectDomainCombiner + SupportedValuesAttribute + SuppressWarnings + SwingConstants + SwingPropertyChangeSupport + SwingUtilities + SyncFactory + SyncFactoryException + SyncFailedException + SyncProvider + SyncProviderException + SyncResolver + SyncScopeHelper + SynchronousQueue + SynthConstants + SynthContext + SynthGraphicsUtils + SynthLookAndFeel + SynthPainter + SynthStyle + SynthStyleFactory + Synthesizer + SysexMessage + System + SystemColor + SystemException + SystemFlavorMap + TAG_ALTERNATE_IIOP_ADDRESS + TAG_CODE_SETS + TAG_INTERNET_IOP + TAG_JAVA_CODEBASE + TAG_MULTIPLE_COMPONENTS + TAG_ORB_TYPE + TAG_POLICIES + TAG_RMI_CUSTOM_MAX_STREAM_FORMAT + TCKind + THREAD_POLICY_ID + TIMEOUT + TRANSACTION_MODE + TRANSACTION_REQUIRED + TRANSACTION_ROLLEDBACK + TRANSACTION_UNAVAILABLE + TRANSIENT + TRANSPORT_RETRY + TabExpander + TabSet + TabStop + TabableView + TabbedPaneUI + TableCellEditor + TableCellRenderer + TableColumn + TableColumnModel + TableColumnModelEvent + TableColumnModelListener + TableHeaderUI + TableModel + TableModelEvent + TableModelListener + TableUI + TableView + TabularData + TabularDataSupport + TabularType + TagElement + TaggedComponent + TaggedComponentHelper + TaggedComponentHolder + TaggedProfile + TaggedProfileHelper + TaggedProfileHolder + Target + TargetDataLine + TargetedNotification + Templates + TemplatesHandler + Text + TextAction + TextArea + TextAttribute + TextComponent + TextEvent + TextField + TextHitInfo + TextInputCallback + TextLayout + TextLayout.CaretPolicy + TextListener + TextMeasurer + TextOutputCallback + TextSyntax + TextUI + TexturePaint + Thread + Thread.State + Thread.UncaughtExceptionHandler + ThreadDeath + ThreadFactory + ThreadGroup + ThreadInfo + ThreadLocal + ThreadMXBean + ThreadPolicy + ThreadPolicyOperations + ThreadPolicyValue + ThreadPoolExecutor + ThreadPoolExecutor.AbortPolicy + ThreadPoolExecutor.CallerRunsPolicy + ThreadPoolExecutor.DiscardOldestPolicy + ThreadPoolExecutor.DiscardPolicy + Throwable + Tie + TileObserver + Time + TimeLimitExceededException + TimeUnit + TimeZone + TimeoutException + Timer + Timer + Timer + TimerAlarmClockNotification + TimerMBean + TimerNotification + TimerTask + Timestamp + Timestamp + TitledBorder + TooManyListenersException + ToolBarUI + ToolTipManager + ToolTipUI + Toolkit + Track + TransactionRequiredException + TransactionRolledbackException + TransactionService + TransactionalWriter + TransferHandler + Transferable + TransformAttribute + Transformer + TransformerConfigurationException + TransformerException + TransformerFactory + TransformerFactoryConfigurationError + TransformerHandler + Transmitter + Transparency + TreeCellEditor + TreeCellRenderer + TreeExpansionEvent + TreeExpansionListener + TreeMap + TreeModel + TreeModelEvent + TreeModelListener + TreeNode + TreePath + TreeSelectionEvent + TreeSelectionListener + TreeSelectionModel + TreeSet + TreeUI + TreeWillExpandListener + TrustAnchor + TrustManager + TrustManagerFactory + TrustManagerFactorySpi + Type + TypeCode + TypeCodeHolder + TypeInfo + TypeInfoProvider + TypeMismatch + TypeMismatch + TypeMismatch + TypeMismatchHelper + TypeMismatchHelper + TypeNotPresentException + TypeVariable + Types + UID + UIDefaults + UIDefaults.ActiveValue + UIDefaults.LazyInputMap + UIDefaults.LazyValue + UIDefaults.ProxyLazyValue + UIManager + UIManager.LookAndFeelInfo + UIResource + ULongLongSeqHelper + ULongLongSeqHolder + ULongSeqHelper + ULongSeqHolder + UNKNOWN + UNKNOWN + UNSUPPORTED_POLICY + UNSUPPORTED_POLICY_VALUE + URI + URIException + URIResolver + URISyntax + URISyntaxException + URL + URLClassLoader + URLConnection + URLDecoder + URLEncoder + URLStreamHandler + URLStreamHandlerFactory + URLStringHelper + USER_EXCEPTION + UShortSeqHelper + UShortSeqHolder + UTFDataFormatException + UUID + UndeclaredThrowableException + UndoManager + UndoableEdit + UndoableEditEvent + UndoableEditListener + UndoableEditSupport + UnexpectedException + UnicastRemoteObject + UnionMember + UnionMemberHelper + UnknownEncoding + UnknownEncodingHelper + UnknownError + UnknownException + UnknownFormatConversionException + UnknownFormatFlagsException + UnknownGroupException + UnknownHostException + UnknownHostException + UnknownObjectException + UnknownServiceException + UnknownUserException + UnknownUserExceptionHelper + UnknownUserExceptionHolder + UnmappableCharacterException + UnmarshalException + UnmodifiableClassException + UnmodifiableSetException + UnrecoverableEntryException + UnrecoverableKeyException + Unreferenced + UnresolvedAddressException + UnresolvedPermission + UnsatisfiedLinkError + UnsolicitedNotification + UnsolicitedNotificationEvent + UnsolicitedNotificationListener + UnsupportedAddressTypeException + UnsupportedAudioFileException + UnsupportedCallbackException + UnsupportedCharsetException + UnsupportedClassVersionError + UnsupportedEncodingException + UnsupportedFlavorException + UnsupportedLookAndFeelException + UnsupportedOperationException + UserDataHandler + UserException + Util + UtilDelegate + Utilities + VMID + VM_ABSTRACT + VM_CUSTOM + VM_NONE + VM_TRUNCATABLE + Validator + ValidatorHandler + ValueBase + ValueBaseHelper + ValueBaseHolder + ValueExp + ValueFactory + ValueHandler + ValueHandlerMultiFormat + ValueInputStream + ValueMember + ValueMemberHelper + ValueOutputStream + VariableHeightLayoutCache + Vector + VerifyError + VersionSpecHelper + VetoableChangeListener + VetoableChangeListenerProxy + VetoableChangeSupport + View + ViewFactory + ViewportLayout + ViewportUI + VirtualMachineError + Visibility + VisibilityHelper + VoiceStatus + Void + VolatileImage + WCharSeqHelper + WCharSeqHolder + WStringSeqHelper + WStringSeqHolder + WStringValueHelper + WeakHashMap + WeakReference + WebRowSet + WildcardType + Window + WindowAdapter + WindowConstants + WindowEvent + WindowFocusListener + WindowListener + WindowStateListener + WrappedPlainView + WritableByteChannel + WritableRaster + WritableRenderedImage + WriteAbortedException + Writer + WrongAdapter + WrongAdapterHelper + WrongPolicy + WrongPolicyHelper + WrongTransaction + WrongTransactionHelper + WrongTransactionHolder + X500Principal + X500PrivateCredential + X509CRL + X509CRLEntry + X509CRLSelector + X509CertSelector + X509Certificate + X509Certificate + X509EncodedKeySpec + X509ExtendedKeyManager + X509Extension + X509KeyManager + X509TrustManager + XAConnection + XADataSource + XAException + XAResource + XMLConstants + XMLDecoder + XMLEncoder + XMLFilter + XMLFilterImpl + XMLFormatter + XMLGregorianCalendar + XMLParseException + XMLReader + XMLReaderAdapter + XMLReaderFactory + XPath + XPathConstants + XPathException + XPathExpression + XPathExpressionException + XPathFactory + XPathFactoryConfigurationException + XPathFunction + XPathFunctionException + XPathFunctionResolver + XPathVariableResolver + Xid + XmlReader + XmlWriter + ZipEntry + ZipException + ZipFile + ZipInputStream + ZipOutputStream + ZoneView + _BindingIteratorImplBase + _BindingIteratorStub + _DynAnyFactoryStub + _DynAnyStub + _DynArrayStub + _DynEnumStub + _DynFixedStub + _DynSequenceStub + _DynStructStub + _DynUnionStub + _DynValueStub + _IDLTypeStub + _NamingContextExtStub + _NamingContextImplBase + _NamingContextStub + _PolicyStub + _Remote_Stub + _ServantActivatorStub + _ServantLocatorStub + + + + AbstractAnnotationValueVisitor6 + AbstractElementVisitor6 + AbstractMarshallerImpl + AbstractOwnableSynchronizer + AbstractProcessor + AbstractQueuedLongSynchronizer + AbstractScriptEngine + AbstractTypeVisitor6 + AbstractUnmarshallerImpl + ActivationDataFlavor + AlgorithmMethod + AnnotationMirror + AnnotationValue + AnnotationValueVisitor + ArrayDeque + AsyncHandler + AttachmentMarshaller + AttachmentPart + AttachmentUnmarshaller + Binder + BindingProvider + Bindings + BlockingDeque + BreakIteratorProvider + C14NMethodParameterSpec + CanonicalizationMethod + Characters + ClientInfoStatus + CollapsedStringAdapter + CollatorProvider + CommandInfo + CommandMap + CommandObject + CommonDataSource + Compilable + CompiledScript + Completion + Completions + CompositeDataInvocationHandler + CompositeDataView + ConcurrentNavigableMap + ConcurrentSkipListMap + ConcurrentSkipListSet + ConfigurationSpi + Console + ConstructorProperties + CookieManager + CookiePolicy + CookieStore + CurrencyNameProvider + Data + DataContentHandler + DataContentHandlerFactory + DataHandler + DatatypeConverter + DatatypeConverterInterface + DateFormatProvider + DateFormatSymbolsProvider + DecimalFormatSymbolsProvider + DeclaredType + DefaultRowSorter + DefaultValidationEventHandler + DeflaterInputStream + Deque + DescriptorKey + DescriptorRead + Desktop + Detail + DetailEntry + Diagnostic + DiagnosticCollector + DiagnosticListener + DigestMethod + DigestMethodParameterSpec + Dispatch + DOMCryptoContext + DomHandler + DOMSignContext + DOMStructure + DOMURIReference + DOMValidateContext + DropMode + ElementFilter + ElementKind + ElementKindVisitor6 + Elements + ElementScanner6 + ElementVisitor + EndDocument + EndElement + Endpoint + EntityDeclaration + ErrorType + EventException + EventFilter + EventReaderDelegate + EventTarget + ExcC14NParameterSpec + ExecutableElement + ExecutableType + FileDataSource + FileNameExtensionFilter + FileObject + Filer + FilerException + FileTypeMap + ForwardingFileObject + ForwardingJavaFileManager + ForwardingJavaFileObject + Generated + GridBagLayoutInfo + GroupLayout + HandlerChain + HandlerResolver + HexBinaryAdapter + HMACParameterSpec + Holder + HTTPBinding + HttpCookie + HTTPException + IDN + ImmutableDescriptor + InflaterOutputStream + InitParam + InterfaceAddress + Invocable + IOError + JavaCompiler + JavaFileManager + JavaFileObject + JAXBContext + JAXBElement + JAXBException + JAXBIntrospector + JAXBResult + JAXBSource + JMX + JMXAddressable + KeyInfo + KeyInfoFactory + KeyName + KeySelector + KeySelectorException + KeySelectorResult + KeyValue + LayoutPath + LayoutStyle + LinearGradientPaint + LinkedBlockingDeque + LocaleNameProvider + LocaleServiceProvider + Location + LockInfo + LogicalHandler + LogicalMessage + LogicalMessageContext + MailcapCommandMap + Marshaller + MessageContext + MessageFactory + Messager + MimeHeader + MimeHeaders + MimeType + MimeTypeParameterList + MimetypesFileTypeMap + MirroredTypeException + MirroredTypesException + MLetContent + MonitorInfo + MultipleGradientPaint + MutationEvent + MXBean + Namespace + NavigableMap + NavigableSet + NClob + NestingKind + NodeSetData + NormalizedStringAdapter + Normalizer + NoSuchMechanismException + NotationDeclaration + NotIdentifiableEvent + NotIdentifiableEventImpl + NoType + NullType + NumberFormatProvider + OctetStreamData + Oneway + OptionChecker + PackageElement + ParseConversionEvent + ParseConversionEventImpl + Path2D + PGPData + PolicySpi + PortInfo + PostConstruct + PreDestroy + PrimitiveType + PrintConversionEvent + PrintConversionEventImpl + ProcessingEnvironment + Processor + PropertyException + RadialGradientPaint + ReferenceType + RequestWrapper + Resource + Resources + Response + ResponseWrapper + RetrievalMethod + RoundEnvironment + RowFilter + RowId + RowIdLifetime + RowSorter + RowSorterEvent + RowSorterListener + RunnableFuture + RunnableScheduledFuture + SAAJMetaFactory + SAAJResult + SchemaOutputResolver + ScriptContext + ScriptEngine + ScriptEngineFactory + ScriptEngineManager + ScriptException + Service + ServiceConfigurationError + ServiceDelegate + ServiceLoader + ServiceMode + SignatureMethod + SignatureMethodParameterSpec + SignatureProperties + SignatureProperty + SignedInfo + SimpleAnnotationValueVisitor6 + SimpleBindings + SimpleElementVisitor6 + SimpleJavaFileObject + SimpleScriptContext + SimpleTypeVisitor6 + SOAPBinding + SOAPBinding + SOAPBody + SOAPBodyElement + SOAPConnection + SOAPConnectionFactory + SOAPConstants + SOAPElement + SOAPElementFactory + SOAPEnvelope + SOAPException + SOAPFactory + SOAPFault + SOAPFaultElement + SOAPFaultException + SOAPHandler + SOAPHeader + SOAPHeaderElement + SOAPMessage + SOAPMessageContext + SOAPMessageHandler + SOAPMessageHandlers + SOAPPart + SortOrder + SourceVersion + SplashScreen + SQLClientInfoException + SQLDataException + SQLFeatureNotSupportedException + SQLIntegrityConstraintViolationException + SQLInvalidAuthorizationSpecException + SQLNonTransientConnectionException + SQLNonTransientException + SQLRecoverableException + SQLSyntaxErrorException + SQLTimeoutException + SQLTransactionRollbackException + SQLTransientConnectionException + SQLTransientException + SQLXML + SSLParameters + StandardEmitterMBean + StandardJavaFileManager + StandardLocation + StartDocument + StartElement + StatementEvent + StatementEventListener + StAXResult + StAXSource + StreamFilter + StreamReaderDelegate + SupportedAnnotationTypes + SupportedOptions + SupportedSourceVersion + SwingWorker + SystemTray + TableRowSorter + TableStringConverter + TimeZoneNameProvider + Tool + ToolProvider + Transform + TransformException + TransformParameterSpec + TransformService + TrayIcon + TypeConstraintException + TypeElement + TypeKind + TypeKindVisitor6 + TypeMirror + TypeParameterElement + TypeVisitor + UIEvent + UnknownAnnotationValueException + UnknownElementException + UnknownTypeException + Unmarshaller + UnmarshallerHandler + UnsupportedDataTypeException + URIDereferencer + URIParameter + URIReference + URIReferenceException + URLDataSource + ValidationEvent + ValidationEventCollector + ValidationEventHandler + ValidationEventImpl + ValidationEventLocator + ValidationEventLocatorImpl + ValidationException + VariableElement + W3CDomHandler + WebEndpoint + WebFault + WebMethod + WebParam + WebResult + WebService + WebServiceClient + WebServiceContext + WebServiceException + WebServicePermission + WebServiceProvider + WebServiceRef + WebServiceRefs + Wrapper + X509Data + X509IssuerSerial + XmlAccessOrder + XmlAccessorOrder + XmlAccessorType + XmlAccessType + XmlAdapter + XmlAnyAttribute + XmlAnyElement + XmlAttachmentRef + XmlAttribute + XMLCryptoContext + XmlElement + XmlElementDecl + XmlElementRef + XmlElementRefs + XmlElements + XmlElementWrapper + XmlEnum + XmlEnumValue + XMLEvent + XMLEventAllocator + XMLEventConsumer + XMLEventFactory + XMLEventReader + XMLEventWriter + XmlID + XmlIDREF + XmlInlineBinaryData + XMLInputFactory + XmlJavaTypeAdapter + XmlJavaTypeAdapters + XmlList + XmlMimeType + XmlMixed + XmlNs + XmlNsForm + XMLObject + XMLOutputFactory + XmlRegistry + XMLReporter + XMLResolver + XmlRootElement + XmlSchema + XmlSchemaType + XmlSchemaTypes + XMLSignature + XMLSignatureException + XMLSignatureFactory + XMLSignContext + XMLStreamConstants + XMLStreamException + XMLStreamReader + XMLStreamWriter + XMLStructure + XmlTransient + XmlType + XMLValidateContext + XmlValue + XPathFilter2ParameterSpec + XPathFilterParameterSpec + XPathType + XSLTTransformParameterSpec + ZipError + + + + + abstract + break + case + catch + class + continue + default + do + else + enum + extends + false + finally + for + goto + if + implements + instanceof + @interface + interface + native + new + null + private + protected + public + return + super + strictfp + switch + synchronized + this + throws + throw + transient + true + try + volatile + while + + + boolean + byte + char + const + double + final + float + int + long + short + static + void + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/javadoc.xml b/src/plugins/genericeditor/XML/javadoc.xml new file mode 100644 index 00000000000..ca20b5808cf --- /dev/null +++ b/src/plugins/genericeditor/XML/javadoc.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/javascript.xml b/src/plugins/genericeditor/XML/javascript.xml new file mode 100644 index 00000000000..be2e33d8bdf --- /dev/null +++ b/src/plugins/genericeditor/XML/javascript.xml @@ -0,0 +1,503 @@ + + + + + + + + + if + else + for + in + while + do + continue + break + with + try + catch + finally + switch + case + new + var + function + return + delete + true + false + void + throw + typeof + const + default + + + escape + isFinite + isNaN + Number + parseFloat + parseInt + reload + taint + unescape + untaint + write + + + Anchor + Applet + Area + Array + Boolean + Button + Checkbox + Date + document + window + Image + FileUpload + Form + Frame + Function + Hidden + Link + MimeType + Math + Max + Min + Layer + navigator + Object + Password + Plugin + Radio + RegExp + Reset + Screen + Select + String + Text + Textarea + this + Window + + + abs + acos + asin + atan + atan2 + ceil + cos + ctg + E + exp + floor + LN2 + LN10 + log + LOG2E + LOG10E + PI + pow + round + sin + sqrt + SQRT1_2 + SQRT2 + tan + + + onAbort + onBlur + onChange + onClick + onError + onFocus + onLoad + onMouseOut + onMouseOver + onReset + onSelect + onSubmit + onUnload + + + above + action + alinkColor + alert + anchor + anchors + appCodeName + applets + apply + appName + appVersion + argument + arguments + arity + availHeight + availWidth + back + background + below + bgColor + border + big + blink + blur + bold + border + call + caller + charAt + charCodeAt + checked + clearInterval + clearTimeout + click + clip + close + closed + colorDepth + complete + compile + constructor + confirm + cookie + current + cursor + data + defaultChecked + defaultSelected + defaultStatus + defaultValue + description + disableExternalCapture + domain + elements + embeds + enabledPlugin + enableExternalCapture + encoding + eval + exec + fgColor + filename + find + fixed + focus + fontcolor + fontsize + form + forms + formName + forward + frames + fromCharCode + getDate + getDay + getHours + getMiliseconds + getMinutes + getMonth + getSeconds + getSelection + getTime + getTimezoneOffset + getUTCDate + getUTCDay + getUTCFullYear + getUTCHours + getUTCMilliseconds + getUTCMinutes + getUTCMonth + getUTCSeconds + getYear + global + go + hash + height + history + home + host + hostname + href + hspace + ignoreCase + images + index + indexOf + innerHeight + innerWidth + input + italics + javaEnabled + join + language + lastIndex + lastIndexOf + lastModified + lastParen + layers + layerX + layerY + left + leftContext + length + link + linkColor + links + location + locationbar + load + lowsrc + match + MAX_VALUE + menubar + method + mimeTypes + MIN_VALUE + modifiers + moveAbove + moveBelow + moveBy + moveTo + moveToAbsolute + multiline + name + NaN + NEGATIVE_INFINITY + negative_infinity + next + open + opener + options + outerHeight + outerWidth + pageX + pageY + pageXoffset + pageYoffset + parent + parse + pathname + personalbar + pixelDepth + platform + plugins + pop + port + POSITIVE_INFINITY + positive_infinity + preference + previous + print + prompt + protocol + prototype + push + referrer + refresh + releaseEvents + reload + replace + reset + resizeBy + resizeTo + reverse + rightContext + screenX + screenY + scroll + scrollbar + scrollBy + scrollTo + search + select + selected + selectedIndex + self + setDate + setHours + setMinutes + setMonth + setSeconds + setTime + setTimeout + setUTCDate + setUTCDay + setUTCFullYear + setUTCHours + setUTCMilliseconds + setUTCMinutes + setUTCMonth + setUTCSeconds + setYear + shift + siblingAbove + siblingBelow + small + sort + source + splice + split + src + status + statusbar + strike + sub + submit + substr + substring + suffixes + sup + taintEnabled + target + test + text + title + toGMTString + toLocaleString + toLowerCase + toolbar + toSource + toString + top + toUpperCase + toUTCString + type + URL + unshift + unwatch + userAgent + UTC + value + valueOf + visibility + vlinkColor + vspace + width + watch + which + width + write + writeln + x + y + zIndex + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/objectivec.xml b/src/plugins/genericeditor/XML/objectivec.xml new file mode 100644 index 00000000000..0e931f7f001 --- /dev/null +++ b/src/plugins/genericeditor/XML/objectivec.xml @@ -0,0 +1,128 @@ + + + + + + break + case + continue + default + do + else + enum + extern + for + goto + if + return + sizeof + struct + switch + typedef + union + while + @class + @defs + @encode + @end + @implementation + @interface + @private + @protected + @protocol + @public + @selector + self + super + + + auto + char + const + double + float + int + long + register + short + signed + static + unsigned + void + volatile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/perl.xml b/src/plugins/genericeditor/XML/perl.xml new file mode 100644 index 00000000000..0b725045757 --- /dev/null +++ b/src/plugins/genericeditor/XML/perl.xml @@ -0,0 +1,833 @@ + + + + + + + if + unless + else + elsif + while + until + for + each + foreach + next + last + break + continue + return + use + no + require + my + our + local + BEGIN + END + require + package + sub + do + __END__ + __DATA__ + __FILE__ + __LINE__ + __PACKAGE__ + + + = + != + ~= + += + -= + *= + /= + **= + |= + ||= + &= + &&= + ?= + + + - + * + + % + || + && + | + & + < + << + > + >> + ^ + -> + => + . + , + ; + :: + \ + and + or + not + eq + ne + lt + gt + le + ge + cmp + + + abs + accept + alarm + atan2 + bind + binmode + bless + caller + chdir + chmod + chomp + chop + chown + chr + chroot + close + closedir + connect + cos + crypt + dbmclose + dbmopen + defined + delete + die + dump + endgrent + endhostent + endnetent + endprotoent + endpwent + endservent + eof + eval + exec + exists + exit + exp + fcntl + fileno + flock + fork + format + formline + getc + getgrent + getgrgid + getgrnam + gethostbyaddr + gethostbyname + gethostent + getlogin + getnetbyaddr + getnetbyname + getnetent + getpeername + getpgrp + getppid + getpriority + getprotobyname + getprotobynumber + getprotoent + getpwent + getpwnam + getpwuid + getservbyname + getservbyport + getservent + getsockname + getsockopt + glob + gmtime + goto + grep + hex + import + index + int + ioctl + join + keys + kill + last + lc + lcfirst + length + link + listen + localtime + lock + log + lstat + map + mkdir + msgctl + msgget + msgrcv + msgsnd + oct + open + opendir + ord + pack + package + pipe + pop + pos + print + printf + prototype + push + quotemeta + rand + read + readdir + readline + readlink + recv + redo + ref + rename + reset + return + reverse + rewinddir + rindex + rmdir + scalar + seek + seekdir + select + semctl + semget + semop + send + setgrent + sethostent + setnetent + setpgrp + setpriority + setprotoent + setpwent + setservent + setsockopt + shift + shmctl + shmget + shmread + shmwrite + shutdown + sin + sleep + socket + socketpair + sort + splice + split + sprintf + sqrt + srand + stat + study + sub + substr + symlink + syscall + sysread + sysseek + system + syswrite + tell + telldir + tie + time + times + truncate + uc + ucfirst + umask + undef + unlink + unpack + unshift + untie + utime + values + vec + wait + waitpid + wantarray + warn + write + + + strict + english + warnings + vars + subs + utf8 + sigtrap + locale + open + less + integer + filetest + constant + bytes + diagnostics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/php.xml b/src/plugins/genericeditor/XML/php.xml new file mode 100644 index 00000000000..879e2ce236e --- /dev/null +++ b/src/plugins/genericeditor/XML/php.xml @@ -0,0 +1,6583 @@ + + + + \ No newline at end of file diff --git a/src/plugins/genericeditor/XML/python.xml b/src/plugins/genericeditor/XML/python.xml new file mode 100644 index 00000000000..542b35d08a6 --- /dev/null +++ b/src/plugins/genericeditor/XML/python.xml @@ -0,0 +1,373 @@ + + + + + + + + + + import + from + as + + + class + def + del + global + lambda + + + and + assert + in + is + not + or + + + exec + print + + + break + continue + elif + else + except + finally + for + if + pass + raise + return + try + while + yield + + + __future__ + __import__ + __name__ + abs + all + any + apply + basestring + bool + buffer + callable + chr + classmethod + cmp + coerce + compile + complex + delattr + dict + dir + divmod + enumerate + eval + execfile + file + filter + float + frozenset + getattr + globals + hasattr + hash + hex + id + input + int + intern + isinstance + issubclass + iter + len + list + locals + long + map + max + min + object + oct + open + ord + pow + property + range + raw_input + reduce + reload + repr + reversed + round + set + setattr + slice + sorted + staticmethod + str + sum + super + tuple + type + unichr + unicode + vars + xrange + zip + + + None + self + True + False + NotImplemented + Ellipsis + + + SIGNAL + SLOT + connect + + + __new__ + __init__ + __del__ + __repr__ + __str__ + __lt__ + __le__ + __eq__ + __ne__ + __gt__ + __ge__ + __cmp__ + __rcmp__ + __hash__ + __nonzero__ + __unicode__ + + + ArithmeticError + AssertionError + AttributeError + BaseException + DeprecationWarning + EnvironmentError + EOFError + Exception + FloatingPointError + FutureWarning + GeneratorExit + IOError + ImportError + ImportWarning + IndexError + KeyError + KeyboardInterrupt + LookupError + MemoryError + NameError + NotImplementedError + OSError + OverflowError + PendingDeprecationWarning + ReferenceError + RuntimeError + RuntimeWarning + StandardError + StopIteration + SyntaxError + SyntaxWarning + SystemError + SystemExit + TypeError + UnboundLocalError + UserWarning + UnicodeError + UnicodeWarning + UnicodeEncodeError + UnicodeDecodeError + UnicodeTranslateError + ValueError + Warning + WindowsError + ZeroDivisionError + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/ruby.xml b/src/plugins/genericeditor/XML/ruby.xml new file mode 100644 index 00000000000..c59f0152939 --- /dev/null +++ b/src/plugins/genericeditor/XML/ruby.xml @@ -0,0 +1,915 @@ + + + + + + + + + + + + + + BEGIN + END + and + begin + break + case + defined? + do + else + elsif + end + ensure + for + if + in + include + next + not + or + redo + rescue + retry + return + then + unless + until + when + while + yield + + + + private_class_method + private + protected + public_class_method + public + + + + attr_reader + attr_writer + attr_accessor + + + + alias + module + class + def + undef + + + + self + super + nil + false + true + caller + __FILE__ + __LINE__ + + + + $stdout + $defout + $stderr + $deferr + $stdin + + + + + + abort + at_exit + autoload + autoload? + binding + block_given? + callcc + caller + catch + chomp + chomp! + chop + chop! + eval + exec + exit + exit! + fail + fork + format + getc + gets + global_variables + gsub + gsub! + iterator? + lambda + load + local_variables + loop + method_missing + open + p + print + printf + proc + putc + puts + raise + rand + readline + readlines + require + scan + select + set_trace_func + sleep + split + sprintf + srand + sub + sub! + syscall + system + test + throw + trace_var + trap + untrace_var + warn + + + + TODO + FIXME + NOTE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/sql.xml b/src/plugins/genericeditor/XML/sql.xml new file mode 100644 index 00000000000..70a9f11ce90 --- /dev/null +++ b/src/plugins/genericeditor/XML/sql.xml @@ -0,0 +1,951 @@ + + + + + + + + + ACCESS + ACCOUNT + ADD + ADMIN + ADMINISTER + ADVISE + AFTER + AGENT + ALL + ALL_ROWS + ALLOCATE + ALTER + ANALYZE + ANCILLARY + AND + ANY + ARCHIVE + ARCHIVELOG + AS + ASC + ASSERTION + ASSOCIATE + AT + ATTRIBUTE + ATTRIBUTES + AUDIT + AUTHENTICATED + AUTHID + AUTHORIZATION + AUTOALLOCATE + AUTOEXTEND + AUTOMATIC + BACKUP + BECOME + BEFORE + BEGIN + BEHALF + BETWEEN + BINDING + BITMAP + BLOCK + BLOCK_RANGE + BODY + BOUND + BOTH + BREAK + BROADCAST + BTITLE + BUFFER_POOL + BUILD + BULK + BY + CACHE + CACHE_INSTANCES + CALL + CANCEL + CASCADE + CASE + CATEGORY + CHAINED + CHANGE + CHECK + CHECKPOINT + CHILD + CHOOSE + CHUNK + CLASS + CLEAR + CLONE + CLOSE + CLOSE_CACHED_OPEN_CURSORS + CLUSTER + COALESCE + COLUMN + COLUMNS + COLUMN_VALUE + COMMENT + COMMIT + COMMITTED + COMPATIBILITY + COMPILE + COMPLETE + COMPOSITE_LIMIT + COMPRESS + COMPUTE + CONNECT + CONNECT_TIME + CONSIDER + CONSISTENT + CONSTANT + CONSTRAINT + CONSTRAINTS + CONTAINER + CONTENTS + CONTEXT + CONTINUE + CONTROLFILE + COPY + COST + CPU_PER_CALL + CPU_PER_SESSION + CREATE + CREATE_STORED_OUTLINES + CROSS + CUBE + CURRENT + CURSOR + CYCLE + DANGLING + DATA + DATABASE + DATAFILE + DATAFILES + DBA + DDL + DEALLOCATE + DEBUG + DECLARE + DEFAULT + DEFERRABLE + DEFERRED + DEFINER + DEGREE + DELETE + DEMAND + DESC + DETERMINES + DICTIONARY + DIMENSION + DIRECTORY + DISABLE + DISASSOCIATE + DISCONNECT + DISKGROUP + DISMOUNT + DISTINCT + DISTRIBUTED + DOMAIN + DROP + DYNAMIC + EACH + ELSE + ELSIF + EMPTY + ENABLE + END + ENFORCE + ENTRY + ESCAPE + ESTIMATE + EVENTS + EXCEPT + EXCEPTION + EXCEPTIONS + EXCHANGE + EXCLUDING + EXCLUSIVE + EXEC + EXECUTE + EXISTS + EXPIRE + EXPLAIN + EXPLOSION + EXTENDS + EXTENT + EXTENTS + EXTERNALLY + FAILED_LOGIN_ATTEMPTS + FALSE + FAST + FILE + FILTER + FIRST_ROWS + FLAGGER + FLASHBACK + FLUSH + FOLLOWING + FOR + FORCE + FOREIGN + FREELIST + FREELISTS + FRESH + FROM + FULL + FUNCTION + FUNCTIONS + GENERATED + GLOBAL + GLOBALLY + GLOBAL_NAME + GRANT + GROUP + GROUPS + HASH + HASHKEYS + HAVING + HEADER + HEAP + HIERARCHY + HOUR + ID + IDENTIFIED + IDENTIFIER + IDGENERATORS + IDLE_TIME + IF + IMMEDIATE + IN + INCLUDING + INCREMENT + INCREMENTAL + INDEX + INDEXED + INDEXES + INDEXTYPE + INDEXTYPES + INDICATOR + INITIAL + INITIALIZED + INITIALLY + INITRANS + INNER + INSERT + INSTANCE + INSTANCES + INSTEAD + INTERMEDIATE + INTERSECT + INTO + INVALIDATE + IS + ISOLATION + ISOLATION_LEVEL + JAVA + JOIN + KEEP + KEY + KILL + LABEL + LAYER + LEADING + LEFT + LESS + LEVEL + LIBRARY + LIKE + LIMIT + LINK + LIST + LOCAL + LOCATOR + LOCK + LOCKED + LOGFILE + LOGGING + LOGICAL_READS_PER_CALL + LOGICAL_READS_PER_SESSION + LOGOFF + LOGON + LOOP + MANAGE + MANAGED + MANAGEMENT + MASTER + MATERIALIZED + MAXARCHLOGS + MAXDATAFILES + MAXEXTENTS + MAXINSTANCES + MAXLOGFILES + MAXLOGHISTORY + MAXLOGMEMBERS + MAXSIZE + MAXTRANS + MAXVALUE + METHOD + MEMBER + MERGE + MINIMIZE + MINIMUM + MINEXTENTS + MINUS + MINUTE + MINVALUE + MODE + MODIFY + MONITORING + MOUNT + MOVE + MOVEMENT + MTS_DISPATCHERS + MULTISET + NAMED + NATURAL + NEEDED + NESTED + NESTED_TABLE_ID + NETWORK + NEVER + NEW + NEXT + NLS_CALENDAR + NLS_CHARACTERSET + NLS_COMP + NLS_CURRENCY + NLS_DATE_FORMAT + NLS_DATE_LANGUAGE + NLS_ISO_CURRENCY + NLS_LANG + NLS_LANGUAGE + NLS_NUMERIC_CHARACTERS + NLS_SORT + NLS_SPECIAL_CHARS + NLS_TERRITORY + NO + NOARCHIVELOG + NOAUDIT + NOCACHE + NOCOMPRESS + NOCYCLE + NOFORCE + NOLOGGING + NOMAXVALUE + NOMINIMIZE + NOMINVALUE + NOMONITORING + NONE + NOORDER + NOOVERRIDE + NOPARALLEL + NORELY + NORESETLOGS + NOREVERSE + NORMAL + NOSEGMENT + NOSORT + NOT + NOTHING + NOVALIDATE + NOWAIT + NULL + NULLS + OBJNO + OBJNO_REUSE + OF + OFF + OFFLINE + OID + OIDINDEX + OLD + ON + ONLINE + ONLY + OPCODE + OPEN + OPERATOR + OPTIMAL + OPTIMIZER_GOAL + OPTION + OR + ORDER + ORGANIZATION + OUT + OUTER + OUTLINE + OVER + OVERFLOW + OVERLAPS + OWN + PACKAGE + PACKAGES + PARALLEL + PARAMETERS + PARENT + PARTITION + PARTITIONS + PARTITION_HASH + PARTITION_RANGE + PASSWORD + PASSWORD_GRACE_TIME + PASSWORD_LIFE_TIME + PASSWORD_LOCK_TIME + PASSWORD_REUSE_MAX + PASSWORD_REUSE_TIME + PASSWORD_VERIFY_FUNCTION + PCTFREE + PCTINCREASE + PCTTHRESHOLD + PCTUSED + PCTVERSION + PERCENT + PERMANENT + PLAN + PLSQL_DEBUG + POST_TRANSACTION + PREBUILT + PRECEDING + PREPARE + PRESENT + PRESERVE + PREVIOUS + PRIMARY + PRIOR + PRIVATE + PRIVATE_SGA + PRIVILEGE + PRIVILEGES + PROCEDURE + PROFILE + PUBLIC + PURGE + QUERY + QUEUE + QUOTA + RANDOM + RANGE + RBA + READ + READS + REBUILD + RECORDS_PER_BLOCK + RECOVER + RECOVERABLE + RECOVERY + RECYCLE + REDUCED + REFERENCES + REFERENCING + REFRESH + RELY + RENAME + REPLACE + RESET + RESETLOGS + RESIZE + RESOLVE + RESOLVER + RESOURCE + RESTRICT + RESTRICTED + RESUME + RETURN + RETURNING + REUSE + REVERSE + REVOKE + REWRITE + RIGHT + ROLE + ROLES + ROLLBACK + ROLLUP + ROW + ROWNUM + ROWS + RULE + SAMPLE + SAVEPOINT + SCAN + SCAN_INSTANCES + SCHEMA + SCN + SCOPE + SD_ALL + SD_INHIBIT + SD_SHOW + SEGMENT + SEG_BLOCK + SEG_FILE + SELECT + SELECTIVITY + SEQUENCE + SERIALIZABLE + SERVERERROR + SESSION + SESSION_CACHED_CURSORS + SESSIONS_PER_USER + SET + SHARE + SHARED + SHARED_POOL + SHRINK + SHUTDOWN + SINGLETASK + SIZE + SKIP + SKIP_UNUSABLE_INDEXES + SNAPSHOT + SOME + SORT + SOURCE + SPECIFICATION + SPLIT + SQL_TRACE + STANDBY + START + STARTUP + STATEMENT_ID + STATISTICS + STATIC + STOP + STORAGE + STORE + STRUCTURE + SUBMULTISET + SUBPARTITION + SUBPARTITIONS + SUCCESSFUL + SUMMARY + SUPPLEMENTAL + SUSPEND + SWITCH + SYS_OP_BITVEC + SYS_OP_ENFORCE_NOT_NULL$ + SYS_OP_NOEXPAND + SYS_OP_NTCIMG$ + SYNONYM + SYSDBA + SYSOPER + SYSTEM + TABLE + TABLES + TABLESPACE + TABLESPACE_NO + TABNO + TEMPFILE + TEMPORARY + THAN + THE + THEN + THREAD + THROUGH + TIMEOUT + TIMEZONE_HOUR + TIMEZONE_MINUTE + TIME_ZONE + TO + TOPLEVEL + TRACE + TRACING + TRAILING + TRANSACTION + TRANSITIONAL + TRIGGER + TRIGGERS + TRUE + TRUNCATE + TYPE + TYPES + UNARCHIVED + UNBOUND + UNBOUNDED + UNDO + UNIFORM + UNION + UNIQUE + UNLIMITED + UNLOCK + UNRECOVERABLE + UNTIL + UNUSABLE + UNUSED + UPD_INDEXES + UPDATABLE + UPDATE + UPPPER + USAGE + USE + USE_STORED_OUTLINES + USER_DEFINED + USING + VALIDATE + VALIDATION + VALUES + VIEW + WHEN + WHENEVER + WHERE + WITH + WITHOUT + WORK + WRITE + + + + + - + * + / + || + = + != + <> + < + <= + > + >= + ~= + ^= + := + => + ** + .. + + + ABS + ACOS + ADD_MONTHS + ASCII + ASCIISTR + ASIN + ATAN + ATAN2 + AVG + BFILENAME + BIN_TO_NUM + BITAND + CARDINALITY + CAST + CEIL + CHARTOROWID + CHR + COALESCE + COLLECT + COMPOSE + CONCAT + CONVERT + CORR + CORR_K + CORR_S + COS + COSH + COUNT + COVAR_POP + COVAR_SAMP + CUME_DIST + CURRENT_DATE + CURRENT_TIMESTAMP + CV + DBTIMEZONE + DECODE + DECOMPOSE + DENSE_RANK + DEPTH + DEREF + DUMP + EMPTY_BLOB + EMPTY_CLOB + EXISTSNODE + EXP + EXTRACT + EXTRACTVALUE + FIRST + FIRST_VALUE + FLOOR + FROM_TZ + GREATEST + GROUP_ID + GROUPING + GROUPING_ID + HEXTORAW + INITCAP + INSTR + INSTRB + LAG + LAST + LAST_DAY + LAST_VALUE + LEAD + LEAST + LENGTH + LENGTHB + LN + LNNVL + LOCALTIMESTAMP + LOG + LOWER + LPAD + LTRIM + MAKE_REF + MAX + MEDIAN + MIN + MOD + MONTHS_BETWEEN + NANVL + NCHR + NEW_TIME + NEXT_DAY + NLS_CHARSET_DECL_LEN + NLS_CHARSET_ID + NLS_CHARSET_NAME + NLS_INITCAP + NLS_LOWER + NLS_UPPER + NLSSORT + NTILE + NULLIF + NUMTODSINTERVAL + NUMTOYMINTERVAL + NVL + NVL2 + ORA_HASH + ORA_ROWSCN + PERCENT_RANK + PERCENTILE_CONT + PERCENTILE_DISC + POWER + POWERMULTISET + POWERMULTISET_BY_CARDINALITY + PRESENTNNV + PRESENTV + RANK + RATIO_TO_REPORT + RAWTOHEX + RAWTONHEX + REF + REFTOHEX + REGEXP_INSTR + REGEXP_LIKE + REGEXP_REPLACE + REGEXP_SUBSTR + REGR_SLOPE + REGR_INTERCEPT + REGR_COUNT + REGR_R2 + REGR_AVGX + REGR_AVGY + REGR_SXX + REGR_SYY + REGR_SXY + REMAINDER + ROUND + ROW_NUMBER + ROWIDTOCHAR + ROWIDTONCHAR + RPAD + RTRIM + SCN_TO_TIMESTAMP + SESSIONTIMEZONE + SIGN + SIN + SINH + SOUNDEX + SQRT + STATS_BINOMIAL_TEST + STATS_CROSSTAB + STATS_F_TEST + STATS_KS_TEST + STATS_MODE + STATS_MW_TEST + STATS_ONE_WAY_ANOVA + STATS_T_TEST_ONE + STATS_T_TEST_PAIRED + STATS_T_TEST_INDEP + STATS_T_TEST_INDEPU + STATS_WSR_TEST + STDDEV + STDDEV_POP + STDDEV_SAMP + SUBSTR + SUBSTRB + SUM + SYS_CONNECT_BY_PATH + SYS_CONTEXT + SYS_DBURIGEN + SYS_EXTRACT_UTC + SYS_GUID + SYS_TYPEID + SYS_XMLAGG + SYS_XMLGEN + SYSDATE + SYSTIMESTAMP + TAN + TANH + TIMESTAMP_TO_SCN + TO_BINARY_DOUBLE + TO_BINARY_FLOAT + TO_CHAR + TO_CLOB + TO_DATE + TO_DSINTERVAL + TO_LOB + TO_MULTI_BYTE + TO_NCHAR + TO_NCLOB + TO_NUMBER + TO_SINGLE_BYTE + TO_TIMESTAMP + TO_TIMESTAMP_TZ + TO_YMINTERVAL + TRANSLATE + TREAT + TRIM + TRUNC + TZ_OFFSET + UID + UNISTR + UPDATEXML + UPPER + USER + USERENV + VALUE + VAR_POP + VAR_SAMP + VARIANCE + VSIZE + WIDTH_BUCKET + XMLAGG + XMLCOLATTVAL + XMLCONCAT + XMLELEMENT + XMLFOREST + XMLSEQUENCE + XMLTRANSFORM + + + ANYDATA + ANYDATASET + ANYTYPE + ARRAY + BFILE + BINARY_DOUBLE + BINARY_FLOAT + BINARY_INTEGER + BLOB + BOOLEAN + CFILE + CHAR + CHARACTER + CLOB + DATE + DAY + DBURITYPE + DEC + DECIMAL + DOUBLE + FLOAT + FLOB + HTTPURITYPE + INT + INTEGER + INTERVAL + LOB + LONG + MLSLABEL + MONTH + NATIONAL + NCHAR + NCLOB + NUMBER + NUMERIC + NVARCHAR + OBJECT + PLS_INTEGER + PRECISION + RAW + RECORD + REAL + ROWID + SECOND + SINGLE + SMALLINT + TIME + TIMESTAMP + URIFACTORYTYPE + URITYPE + UROWID + VARCHAR + VARCHAR2 + VARYING + VARRAY + XMLTYPE + YEAR + ZONE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/XML/tcl.xml b/src/plugins/genericeditor/XML/tcl.xml new file mode 100644 index 00000000000..cb74c1f5212 --- /dev/null +++ b/src/plugins/genericeditor/XML/tcl.xml @@ -0,0 +1,536 @@ + + + + + + + + + + + + after + append + AppleScript + argv + argc + array + auto_execk + auto_load + auto_mkindex + auto_path + auto_reset + beep + bell + binary + bind + bindtags + bgerror + break + button + canvas + case + catch + cd + checkbutton + clipboard + clock + close + concat + console + continue + dde + destroy + else + elseif + encoding + entry + env + eof + error + errorCode + errorInfo + eval + event + exec + exit + expr + fblocked + fconfigure + fcopy + file + fileevent + flush + focus + font + for + foreach + format + frame + gets + glob + global + grab + grid + history + if + image + incr + info + interp + join + label + lappend + lindex + linsert + list + listbox + llength + load + lower + lrange + lreplace + lsearch + lsort + menu + menubutton + message + namespace + open + option + OptProc + pack + package + parray + pid + place + pkg_mkindex + proc + puts + pwd + radiobutton + raise + read + regexp + registry + regsub + rename + resource + return + scale + scan + scrollbar + seek + selection + send + set + socket + source + split + string + subst + switch + tclLog + tcl_endOfWord + tcl_findLibrary + tcl_library + tcl_patchLevel + tcl_platform + tcl_precision + tcl_rcFileName + tcl_rcRsrcName + tcl_startOfNextWord + tcl_startOfPreviousWord + tcl_traceCompile + tcl_traceExec + tcl_version + tcl_wordBreakAfter + tcl_wordBreakBefore + tell + text + time + tk + tkTabToWindow + tkwait + tk_chooseColor + tk_chooseDirectory + tk_focusFollowMouse + tk_focusNext + tk_focusPrev + tk_getOpenFile + tk_getSaveFile + tk_library + tk_messageBox + tk_optionMenu + tk_patchLevel + tk_popup + tk_strictMotif + tk_version + toplevel + trace + unknown + unset + update + uplevel + upvar + variable + vwait + while + winfo + wm + + + + add + args + atime + attributes + body + bytelength + cancel + channels + clicks + cmdcount + commands + compare + complete + convertfrom + convertto + copy + default + delete + dirname + equal + executable + exists + extension + first + forget + format + functions + globals + hostname + idle + ifneeded + index + info + is + isdirectory + isfile + join + last + length + level + library + link + loaded + locals + lstat + map + match + mkdir + mtime + nameofexecutable + names + nativename + normalize + number + owned + patchlevel + pathtype + present + procs + provide + range + readable + readlink + remove + rename + repeat + replace + require + rootname + scan + script + seconds + separator + sharedlibextension + size + split + stat + system + tail + tclversion + tolower + totitle + toupper + trim + trimleft + trimright + type + unknown + variable + vars + vcompare + vdelete + versions + vinfo + volumes + vsatisfies + wordend + wordstart + writable + + activate + actual + addtag + append + appname + aspect + atom + atomname + bbox + bind + broadcast + canvasx + canvasy + caret + cells + cget + children + class + clear + client + clone + colormapfull + colormapwindows + command + configure + containing + coords + create + current + curselection + dchars + debug + deiconify + delta + depth + deselect + dlineinfo + dtag + dump + edit + entrycget + entryconfigure + families + find + flash + focus + focusmodel + fpixels + fraction + frame + generate + geometry + get + gettags + grid + group + handle + height + hide + iconbitmap + iconify + iconmask + iconname + iconposition + iconwindow + icursor + id + identify + image + insert + interps + inuse + invoke + ismapped + itemcget + itemconfigure + keys + lower + manager + mark + maxsize + measure + metrics + minsize + move + name + nearest + overrideredirect + own + panecget + paneconfigure + panes + parent + pathname + pixels + pointerx + pointerxy + pointery + positionfrom + post + postcascade + postscript + protocol + proxy + raise + release + reqheight + reqwidth + resizable + rgb + rootx + rooty + scale + scaling + screen + screencells + screendepth + screenheight + screenmmheight + screenmmwidth + screenvisual + screenwidth + search + see + select + selection + server + set + show + sizefrom + stackorder + state + status + tag + title + toplevel + transient + types + unpost + useinputmethods + validate + values + viewable + visual + visualid + visualsavailable + vrootheight + vrootwidth + vrootx + vrooty + width + window + windowingsystem + withdraw + x + xview + y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/genericeditor/context.cpp b/src/plugins/genericeditor/context.cpp new file mode 100644 index 00000000000..0ef788d3767 --- /dev/null +++ b/src/plugins/genericeditor/context.cpp @@ -0,0 +1,156 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "context.h" +#include "rule.h" +#include "reuse.h" +#include "dynamicrule.h" +#include "highlightdefinition.h" + +using namespace Highlight; +using namespace Internal; + +Context::Context() : m_fallthrough(false), m_dynamic(false) +{} + +Context::Context(const Context &context) : + m_id(context.m_id), m_name(context.m_name), m_lineBeginContext(context.m_lineBeginContext), + m_lineEndContext(context.m_lineEndContext), m_fallthroughContext(context.m_fallthroughContext), + m_itemData(context.m_itemData), m_fallthrough(context.m_fallthrough), + m_dynamic(context.m_dynamic), m_instructions(context.m_instructions), + m_definition(context.m_definition) +{ + // Rules need to be deeply copied because of dynamic contexts. + foreach (const QSharedPointer &rule, context.m_rules) + m_rules.append(QSharedPointer(rule->clone())); +} + +const Context &Context::operator=(Context copy) +{ + swap(copy); + return *this; +} + +Context::~Context() +{} + +void Context::swap(Context &context) +{ + qSwap(m_id, context.m_id); + qSwap(m_name, context.m_name); + qSwap(m_lineBeginContext, context.m_lineBeginContext); + qSwap(m_lineEndContext, context.m_lineEndContext); + qSwap(m_fallthroughContext, context.m_fallthroughContext); + qSwap(m_itemData, context.m_itemData); + qSwap(m_fallthrough, context.m_fallthrough); + qSwap(m_dynamic, context.m_dynamic); + qSwap(m_rules, context.m_rules); + qSwap(m_instructions, context.m_instructions); + qSwap(m_definition, context.m_definition); +} + +void Context::configureId(const int unique) +{ m_id.append(QString::number(unique)); } + +const QString &Context::id() const +{ return m_id; } + +void Context::setName(const QString &name) +{ + m_name = name; + m_id = name; +} + +const QString &Context::name() const +{ return m_name; } + +void Context::setLineBeginContext(const QString &context) +{ m_lineBeginContext = context; } + +const QString &Context::lineBeginContext() const +{ return m_lineBeginContext; } + +void Context::setLineEndContext(const QString &context) +{ m_lineEndContext = context; } + +const QString &Context::lineEndContext() const +{ return m_lineEndContext; } + +void Context::setFallthroughContext(const QString &context) +{ m_fallthroughContext = context; } + +const QString &Context::fallthroughContext() const +{ return m_fallthroughContext; } + +void Context::setItemData(const QString &itemData) +{ m_itemData = itemData; } + +const QString &Context::itemData() const +{ return m_itemData; } + +void Context::setFallthrough(const QString &fallthrough) +{ m_fallthrough = toBool(fallthrough); } + +bool Context::isFallthrough() const +{ return m_fallthrough; } + +void Context::setDynamic(const QString &dynamic) +{ m_dynamic = toBool(dynamic); } + +bool Context::isDynamic() const +{ return m_dynamic; } + +void Context::updateDynamicRules(const QStringList &captures) const +{ + Highlight::Internal::updateDynamicRules(m_rules, captures); +} + +void Context::addRule(const QSharedPointer &rule) +{ m_rules.append(rule); } + +void Context::addRule(const QSharedPointer &rule, int index) +{ m_rules.insert(index, rule); } + +const QList > & Context::rules() const +{ return m_rules; } + +void Context::addIncludeRulesInstruction(const IncludeRulesInstruction &instruction) +{ m_instructions.append(instruction); } + +const QList &Context::includeRulesInstructions() const +{ return m_instructions; } + +void Context::clearIncludeRulesInstructions() +{ m_instructions.clear(); } + +void Context::setDefinition(const QSharedPointer &definition) +{ m_definition = definition; } + +const QSharedPointer &Context::definition() const +{ return m_definition; } diff --git a/src/plugins/genericeditor/context.h b/src/plugins/genericeditor/context.h new file mode 100644 index 00000000000..28dbcbe802a --- /dev/null +++ b/src/plugins/genericeditor/context.h @@ -0,0 +1,110 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef CONTEXT_H +#define CONTEXT_H + +#include "includerulesinstruction.h" + +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class Rule; +class HighlightDefinition; + +class Context +{ +public: + Context(); + Context(const Context &context); + const Context &operator=(Context copy); + ~Context(); + + void configureId(const int unique); + const QString &id() const; + + void setName(const QString &name); + const QString &name() const; + + void setLineBeginContext(const QString &context); + const QString &lineBeginContext() const; + + void setLineEndContext(const QString &context); + const QString &lineEndContext() const; + + void setFallthroughContext(const QString &context); + const QString &fallthroughContext() const; + + void setItemData(const QString &itemData); + const QString &itemData() const; + + void setFallthrough(const QString &fallthrough); + bool isFallthrough() const; + + void setDynamic(const QString &dynamic); + bool isDynamic() const; + void updateDynamicRules(const QStringList &captures) const; + + void addRule(const QSharedPointer &rule); + void addRule(const QSharedPointer &rule, int index); + const QList > &rules() const; + + void addIncludeRulesInstruction(const IncludeRulesInstruction &instruction); + const QList &includeRulesInstructions() const; + void clearIncludeRulesInstructions(); + + void setDefinition(const QSharedPointer &definition); + const QSharedPointer &definition() const; + + void swap(Context &context); + +private: + QString m_id; + QString m_name; + QString m_lineBeginContext; + QString m_lineEndContext; + QString m_fallthroughContext; + QString m_itemData; + bool m_fallthrough; + bool m_dynamic; + + QList > m_rules; + QList m_instructions; + + QSharedPointer m_definition; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // CONTEXT_H diff --git a/src/plugins/genericeditor/dynamicrule.cpp b/src/plugins/genericeditor/dynamicrule.cpp new file mode 100644 index 00000000000..887bb0c169e --- /dev/null +++ b/src/plugins/genericeditor/dynamicrule.cpp @@ -0,0 +1,67 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "dynamicrule.h" +#include "reuse.h" + +using namespace Highlight; +using namespace Internal; + +DynamicRule::DynamicRule() : m_active(false) +{} + +DynamicRule::~DynamicRule() +{} + +void DynamicRule::setActive(const QString &active) +{ m_active = toBool(active); } + +bool DynamicRule::isActive() const +{ return m_active; } + +void DynamicRule::replaceExpressions(const QStringList &captures) +{ + doReplaceExpressions(captures); + updateDynamicRules(childs(), captures); +} + +namespace Highlight { +namespace Internal { + +void updateDynamicRules(const QList > &rules, const QStringList &captures) +{ + foreach (QSharedPointer rule, rules) { + DynamicRule *dynamicRule = dynamic_cast(rule.data()); + if (dynamicRule && dynamicRule->isActive()) + dynamicRule->replaceExpressions(captures); + } +} + +} // namespace Internal +} // namespace Highlight diff --git a/src/plugins/genericeditor/dynamicrule.h b/src/plugins/genericeditor/dynamicrule.h new file mode 100644 index 00000000000..17650e2c742 --- /dev/null +++ b/src/plugins/genericeditor/dynamicrule.h @@ -0,0 +1,64 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef DYNAMICRULE_H +#define DYNAMICRULE_H + +#include "rule.h" + +QT_BEGIN_NAMESPACE +class QStringList; +QT_END_NAMESPACE + +namespace Highlight { +namespace Internal { + +class DynamicRule : public Rule +{ +public: + DynamicRule(); + virtual ~DynamicRule(); + + void setActive(const QString &active); + bool isActive() const; + + virtual void replaceExpressions(const QStringList &captures); + +private: + virtual void doReplaceExpressions(const QStringList &captures) = 0; + + bool m_active; +}; + +void updateDynamicRules(const QList > &rules, const QStringList &captures); + +} // namespace Internal +} // namespace Highlight + +#endif // DYNAMICRULE_H diff --git a/src/plugins/genericeditor/genericeditor.cpp b/src/plugins/genericeditor/genericeditor.cpp new file mode 100644 index 00000000000..e442e4aa880 --- /dev/null +++ b/src/plugins/genericeditor/genericeditor.cpp @@ -0,0 +1,102 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "genericeditor.h" +#include "generichighlighterconstants.h" +#include "genericeditorplugin.h" +#include "highlightdefinition.h" +#include "highlighter.h" +#include "highlighterexception.h" + +#include +#include +#include +#include +#include + +#include +#include + +using namespace Highlight; +using namespace Internal; + +GenericEditorEditable::GenericEditorEditable(GenericEditor *editor) : + TextEditor::BaseTextEditorEditable(editor) +{ + Core::UniqueIDManager *uidm = Core::UniqueIDManager::instance(); + m_context << uidm->uniqueIdentifier(Highlight::Constants::GENERIC_EDITOR); + m_context << uidm->uniqueIdentifier(TextEditor::Constants::C_TEXTEDITOR); +} + +QString GenericEditorEditable::id() const +{ return QLatin1String(Highlight::Constants::GENERIC_EDITOR); } + +QList GenericEditorEditable::context() const +{ return m_context; } + +bool GenericEditorEditable::isTemporary() const +{ return false; } + +bool GenericEditorEditable::duplicateSupported() const +{ return true; } + +Core::IEditor *GenericEditorEditable::duplicate(QWidget *parent) +{ + GenericEditor *newEditor = new GenericEditor(editor()->mimeType(), parent); + newEditor->duplicateFrom(editor()); + return newEditor->editableInterface(); +} + +bool GenericEditorEditable::open(const QString &fileName) +{ + if (TextEditor::BaseTextEditorEditable::open(fileName)) { + editor()->setMimeType( + Core::ICore::instance()->mimeDatabase()->findByFile(QFileInfo(fileName)).type()); + return true; + } + return false; +} + +GenericEditor::GenericEditor(const QString &definitionId, QWidget *parent) : + TextEditor::BaseTextEditor(parent) +{ + try { + QSharedPointer definition = + GenericEditorPlugin::instance()->definition(definitionId); + baseTextDocument()->setSyntaxHighlighter(new Highlighter(definition->initialContext())); + } catch (const HighlighterException &) { + // No highlighter will be set. + } +} + +TextEditor::BaseTextEditorEditable *GenericEditor::createEditableInterface() +{ + GenericEditorEditable *editable = new GenericEditorEditable(this); + return editable; +} diff --git a/src/plugins/genericeditor/genericeditor.h b/src/plugins/genericeditor/genericeditor.h new file mode 100644 index 00000000000..37e798f4751 --- /dev/null +++ b/src/plugins/genericeditor/genericeditor.h @@ -0,0 +1,79 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef GENERICEDITOR_H +#define GENERICEDITOR_H + +#include + +#include + +QT_BEGIN_NAMESPACE +class QString; +QT_END_NAMESPACE + +namespace Highlight { +namespace Internal { + +class GenericEditor; + +class GenericEditorEditable : public TextEditor::BaseTextEditorEditable +{ + Q_OBJECT + +public: + GenericEditorEditable(GenericEditor *editor); + +protected: + virtual QString id() const; + virtual QList context() const; + virtual bool isTemporary() const; + virtual bool duplicateSupported() const; + virtual Core::IEditor *duplicate(QWidget *parent); + virtual bool open(const QString & fileName); + +private: + QList m_context; +}; + +class GenericEditor : public TextEditor::BaseTextEditor +{ + Q_OBJECT + +public: + GenericEditor(const QString &definitionId, QWidget *parent = 0); + +protected: + virtual TextEditor::BaseTextEditorEditable *createEditableInterface(); +}; + +} // namespace Internal +} // namespace Highlight + +#endif // GENERICEDITOR_H diff --git a/src/plugins/genericeditor/genericeditor.pri b/src/plugins/genericeditor/genericeditor.pri new file mode 100644 index 00000000000..cd4a9337c6a --- /dev/null +++ b/src/plugins/genericeditor/genericeditor.pri @@ -0,0 +1,3 @@ +include(genericeditor_dependencies.pri) + +LIBS *= -l$$qtLibraryTarget(GenericEditor) diff --git a/src/plugins/genericeditor/genericeditor.pro b/src/plugins/genericeditor/genericeditor.pro new file mode 100644 index 00000000000..65ee07b5bce --- /dev/null +++ b/src/plugins/genericeditor/genericeditor.pro @@ -0,0 +1,48 @@ +TEMPLATE = lib +TARGET = GenericEditor +include(../../qtcreatorplugin.pri) +include(genericeditor_dependencies.pri) + +CONFIG += help + +HEADERS += \ + genericeditorplugin.h \ + progressdata.h \ + genericeditorfactory.h \ + genericeditor.h \ + languagespecificfactories.h \ + specificrules.h \ + rule.h \ + reuse.h \ + keywordlist.h \ + itemdata.h \ + includerulesinstruction.h \ + highlighterexception.h \ + highlighter.h \ + highlightdefinitionhandler.h \ + highlightdefinition.h \ + dynamicrule.h \ + context.h \ + genericeditorconstants.h + +SOURCES += \ + genericeditorplugin.cpp \ + progressdata.cpp \ + genericeditorfactory.cpp \ + genericeditor.cpp \ + languagespecificfactories.cpp \ + specificrules.cpp \ + rule.cpp \ + keywordlist.cpp \ + itemdata.cpp \ + includerulesinstruction.cpp \ + highlighter.cpp \ + highlightdefinitionhandler.cpp \ + highlightdefinition.cpp \ + dynamicrule.cpp \ + context.cpp + +OTHER_FILES += GenericEditor.pluginspec GenericEditor.mimetypes.xml + +RESOURCES += \ + genericeditor.qrc diff --git a/src/plugins/genericeditor/genericeditor.qrc b/src/plugins/genericeditor/genericeditor.qrc new file mode 100644 index 00000000000..4ecc6a1a5ed --- /dev/null +++ b/src/plugins/genericeditor/genericeditor.qrc @@ -0,0 +1,23 @@ + + + XML/c.xml + XML/cpp.xml + XML/fortran.xml + XML/html.xml + XML/java.xml + XML/javadoc.xml + XML/javascript.xml + XML/language.dtd + XML/objectivec.xml + XML/perl.xml + XML/php.xml + XML/python.xml + XML/ruby.xml + XML/sql.xml + XML/tcl.xml + XML/alert.xml + XML/css.xml + XML/doxygen.xml + GenericEditor.mimetypes.xml + + diff --git a/src/plugins/genericeditor/genericeditor_dependencies.pri b/src/plugins/genericeditor/genericeditor_dependencies.pri new file mode 100644 index 00000000000..53dbf455c6b --- /dev/null +++ b/src/plugins/genericeditor/genericeditor_dependencies.pri @@ -0,0 +1,2 @@ +include(../../plugins/coreplugin/coreplugin.pri) +include(../../plugins/texteditor/texteditor.pri) diff --git a/src/plugins/genericeditor/genericeditorconstants.h b/src/plugins/genericeditor/genericeditorconstants.h new file mode 100644 index 00000000000..e898f2d83b3 --- /dev/null +++ b/src/plugins/genericeditor/genericeditorconstants.h @@ -0,0 +1,62 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef GENERICHIGHLIGHTERCONSTANTS_H +#define GENERICHIGHLIGHTERCONSTANTS_H + +#include + +namespace Highlight { +namespace Constants { + +const char * const GENERIC_EDITOR = "GenericEditorPlugin.GenericEditor"; +const char * const GENERIC_EDITOR_DISPLAY_NAME = + QT_TRANSLATE_NOOP("OpenWith::Editors", "Generic Editor"); + +const char * const C_SOURCE_MIMETYPE = "text/x-csrc"; +const char * const C_HEADER_MIMETYPE = "text/x-chdr"; +const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src"; +const char * const CPP_HEADER_MIMETYPE = "text/x-c++hdr"; +const char * const CSS_MIMETYPE = "text/css"; +const char * const FORTRAN_MIMETYPE = "text/x-fortran"; +const char * const HTML_MIMETYPE = "text/html"; +const char * const JAVA_MIMETYPE = "text/x-java"; +const char * const JAVASCRIPT_MIMETYPE = "application/x-javascript"; +const char * const OBJECTIVEC_MIMETYPE = "text/x-objcsrc"; +const char * const PERL_MIMETYPE = "application/x-perl"; +const char * const PHP_MIMETYPE = "application/x-php"; +const char * const PYTHON_MIMETYPE = "text/x-python"; +const char * const RUBY_MIMETYPE = "text/x-ruby"; +const char * const SQL_MIMETYPE = "text/x-sql"; +const char * const TCL_MIMETYPE = "application/x-tcl"; + +} // namespace Constants +} // namespace Highlight + +#endif // GENERICHIGHLIGHTERCONSTANTS_H diff --git a/src/plugins/genericeditor/genericeditorfactory.cpp b/src/plugins/genericeditor/genericeditorfactory.cpp new file mode 100644 index 00000000000..c9c576ee854 --- /dev/null +++ b/src/plugins/genericeditor/genericeditorfactory.cpp @@ -0,0 +1,72 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "genericeditorfactory.h" +#include "generichighlighterconstants.h" +#include "genericeditor.h" + +#include + +using namespace Highlight; +using namespace Internal; + +GenericEditorFactory::GenericEditorFactory(QObject *parent) : + Core::IEditorFactory(parent) +{} + +GenericEditorFactory::~GenericEditorFactory() +{} + +Core::IEditor *GenericEditorFactory::createEditor(QWidget *parent) +{ + GenericEditor *genericEditor = createGenericEditor(parent); + return genericEditor->editableInterface(); +} + +QString GenericEditorFactory::id() const +{ + return QLatin1String(Highlight::Constants::GENERIC_EDITOR); +} + +QStringList GenericEditorFactory::mimeTypes() const +{ return m_mimeTypes; } + +QString GenericEditorFactory::displayName() const +{ + return tr(Highlight::Constants::GENERIC_EDITOR_DISPLAY_NAME); +} + +Core::IFile *GenericEditorFactory::open(const QString &fileName) +{ + Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()); + return iface ? iface->file() : 0; +} + +void GenericEditorFactory::addMimeType(const QString &mimeType) +{ m_mimeTypes.append(mimeType); } diff --git a/src/plugins/genericeditor/genericeditorfactory.h b/src/plugins/genericeditor/genericeditorfactory.h new file mode 100644 index 00000000000..c3d91c803eb --- /dev/null +++ b/src/plugins/genericeditor/genericeditorfactory.h @@ -0,0 +1,71 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef GENERICEDITORFACTORY_H +#define GENERICEDITORFACTORY_H + +#include + +#include + +namespace Highlight { +namespace Internal { + +class GenericEditor; + +class GenericEditorFactory : public Core::IEditorFactory +{ + Q_OBJECT + +public: + GenericEditorFactory(QObject *parent = 0); + virtual ~GenericEditorFactory(); + + // Currently there are language specific factores which configure the correct highlighter. + // Would it be a good idea if the createEditor method also received the mime type? This would + // also discard the necessity of overriding the open method. + virtual Core::IEditor *createEditor(QWidget *parent); + virtual QStringList mimeTypes() const; + virtual QString id() const; + virtual QString displayName() const; + virtual Core::IFile *open(const QString &fileName); + +protected: + void addMimeType(const QString &mimeType); + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent) = 0; + + QStringList m_mimeTypes; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // GENERICEDITORFACTORY_H diff --git a/src/plugins/genericeditor/genericeditorplugin.cpp b/src/plugins/genericeditor/genericeditorplugin.cpp new file mode 100644 index 00000000000..a75979ae1e2 --- /dev/null +++ b/src/plugins/genericeditor/genericeditorplugin.cpp @@ -0,0 +1,191 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "genericeditorplugin.h" +#include "languagespecificfactories.h" +#include "highlightdefinition.h" +#include "highlightdefinitionhandler.h" +#include "highlighter.h" +#include "highlighterexception.h" +#include "genericeditorconstants.h" + +#include +#include +#include + +#include +#include +#include +#include +#include + +using namespace Highlight; +using namespace Internal; + +const QLatin1String GenericEditorPlugin::kAlertDefinitionId(":/genericeditor/XML/alert.xml"); +const QLatin1String GenericEditorPlugin::kCDefinitionId(":/genericeditor/XML/c.xml"); +const QLatin1String GenericEditorPlugin::kCppDefinitionId(":/genericeditor/XML/cpp.xml"); +const QLatin1String GenericEditorPlugin::kCssDefinitionId(":/genericeditor/XML/css.xml"); +const QLatin1String GenericEditorPlugin::kDoxygenDefinitionId( + ":/genericeditor/XML/doxygen.xml"); +const QLatin1String GenericEditorPlugin::kFortranDefinitionId( + ":/genericeditor/XML/fortran.xml"); +const QLatin1String GenericEditorPlugin::kHtmlDefinitionId(":/genericeditor/XML/html.xml"); +const QLatin1String GenericEditorPlugin::kJavaDefinitionId(":/genericeditor/XML/java.xml"); +const QLatin1String GenericEditorPlugin::kJavadocDefinitionId( + ":/genericeditor/XML/javadoc.xml"); +const QLatin1String GenericEditorPlugin::kJavascriptDefinitionId( + ":/genericeditor/XML/javascript.xml"); +const QLatin1String GenericEditorPlugin::kObjectiveCDefinitionId( + ":/genericeditor/XML/objectivec.xml"); +const QLatin1String GenericEditorPlugin::kPerlDefinitionId(":/genericeditor/XML/perl.xml"); +const QLatin1String GenericEditorPlugin::kPhpDefinitionId(":/genericeditor/XML/php.xml"); +const QLatin1String GenericEditorPlugin::kPythonDefinitionId(":/genericeditor/XML/python.xml"); +const QLatin1String GenericEditorPlugin::kRubyDefinitionId(":/genericeditor/XML/ruby.xml"); +const QLatin1String GenericEditorPlugin::kSqlDefinitionId(":/genericeditor/XML/sql.xml"); +const QLatin1String GenericEditorPlugin::kTclDefinitionId(":/genericeditor/XML/tcl.xml"); + +GenericEditorPlugin *GenericEditorPlugin::m_instance = 0; + +GenericEditorPlugin::GenericEditorPlugin() +{ + QTC_ASSERT(!m_instance, return); + m_instance = this; + + //Todo + + m_idByMimeType.insert(Highlight::Constants::C_HEADER_MIMETYPE, kCDefinitionId); + m_idByMimeType.insert(Highlight::Constants::C_SOURCE_MIMETYPE, kCDefinitionId); + m_idByMimeType.insert(Highlight::Constants::CPP_HEADER_MIMETYPE, kCppDefinitionId); + m_idByMimeType.insert(Highlight::Constants::CPP_SOURCE_MIMETYPE, kCppDefinitionId); + m_idByMimeType.insert(Highlight::Constants::CSS_MIMETYPE, kCssDefinitionId); + m_idByMimeType.insert(Highlight::Constants::FORTRAN_MIMETYPE, kFortranDefinitionId); + m_idByMimeType.insert(Highlight::Constants::HTML_MIMETYPE, kHtmlDefinitionId); + m_idByMimeType.insert(Highlight::Constants::JAVA_MIMETYPE, kJavaDefinitionId); + m_idByMimeType.insert(Highlight::Constants::JAVASCRIPT_MIMETYPE, kJavascriptDefinitionId); + m_idByMimeType.insert(Highlight::Constants::OBJECTIVEC_MIMETYPE, kObjectiveCDefinitionId); + m_idByMimeType.insert(Highlight::Constants::PERL_MIMETYPE, kPerlDefinitionId); + m_idByMimeType.insert(Highlight::Constants::PHP_MIMETYPE, kPhpDefinitionId); + m_idByMimeType.insert(Highlight::Constants::PYTHON_MIMETYPE, kPythonDefinitionId); + m_idByMimeType.insert(Highlight::Constants::RUBY_MIMETYPE, kRubyDefinitionId); + m_idByMimeType.insert(Highlight::Constants::SQL_MIMETYPE, kSqlDefinitionId); + m_idByMimeType.insert(Highlight::Constants::TCL_MIMETYPE, kTclDefinitionId); + + m_idByName.insert(QLatin1String("alerts"), kAlertDefinitionId); + m_idByName.insert(QLatin1String("c"), kCDefinitionId); + m_idByName.insert(QLatin1String("cpp"), kCppDefinitionId); + m_idByName.insert(QLatin1String("css"), kCssDefinitionId); + m_idByName.insert(QLatin1String("doxygen"), kDoxygenDefinitionId); + m_idByName.insert(QLatin1String("fortran"), kFortranDefinitionId); + m_idByName.insert(QLatin1String("html"), kHtmlDefinitionId); + m_idByName.insert(QLatin1String("java"), kJavaDefinitionId); + m_idByName.insert(QLatin1String("javadoc"), kJavadocDefinitionId); + m_idByName.insert(QLatin1String("javascript"), kJavascriptDefinitionId); + m_idByName.insert(QLatin1String("objectivec"), kObjectiveCDefinitionId); + m_idByName.insert(QLatin1String("perl"), kPerlDefinitionId); + m_idByName.insert(QLatin1String("php"), kPhpDefinitionId); + m_idByName.insert(QLatin1String("python"), kPythonDefinitionId); + m_idByName.insert(QLatin1String("ruby"), kRubyDefinitionId); + m_idByName.insert(QLatin1String("sql"), kSqlDefinitionId); + m_idByName.insert(QLatin1String("tcl"), kTclDefinitionId); +} + +GenericEditorPlugin::~GenericEditorPlugin() +{} + +bool GenericEditorPlugin::initialize(const QStringList &arguments, QString *errorString) +{ + Q_UNUSED(arguments) + + Core::ICore *core = Core::ICore::instance(); + if (!core->mimeDatabase()->addMimeTypes( + QLatin1String(":/genericeditor/GenericEditor.mimetypes.xml"), errorString)) { + return false; + } + + addAutoReleasedObject(new CFactory(this)); + addAutoReleasedObject(new CppFactory(this)); + addAutoReleasedObject(new CssFactory(this)); + addAutoReleasedObject(new FortranFactory(this)); + addAutoReleasedObject(new HtmlFactory(this)); + addAutoReleasedObject(new JavaFactory(this)); + addAutoReleasedObject(new JavascriptFactory(this)); + addAutoReleasedObject(new ObjectiveCFactory(this)); + addAutoReleasedObject(new PerlFactory(this)); + addAutoReleasedObject(new PhpFactory(this)); // Php definition file is broken. + addAutoReleasedObject(new PythonFactory(this)); + addAutoReleasedObject(new RubyFactory(this)); + addAutoReleasedObject(new SqlFactory(this)); + addAutoReleasedObject(new TclFactory(this)); + + return true; +} + +void GenericEditorPlugin::extensionsInitialized() +{} + +GenericEditorPlugin *GenericEditorPlugin::instance() +{ return m_instance; } + +QString GenericEditorPlugin::definitionIdByName(const QString &name) const +{ return m_idByName.value(name.toLower()); } + +QString GenericEditorPlugin::definitionIdByMimeType(const QString &mimeType) const +{ return m_idByMimeType.value(mimeType.toLower()); } + +bool GenericEditorPlugin::isBuildingDefinition(const QString &id) const +{ return m_isBuilding.contains(id); } + +const QSharedPointer &GenericEditorPlugin::definition(const QString &id) +{ + if (!m_definitions.contains(id)) { + m_isBuilding.insert(id); + + QFile definitionFile(id); + if (!definitionFile.open(QIODevice::ReadOnly | QIODevice::Text)) + throw HighlighterException(); + QXmlInputSource source(&definitionFile); + + QSharedPointer definition(new HighlightDefinition); + HighlightDefinitionHandler handler(definition); + + QXmlSimpleReader reader; + reader.setContentHandler(&handler); + reader.parse(source); + + m_definitions.insert(id, definition); + definitionFile.close(); + m_isBuilding.remove(id); + } + + return *m_definitions.constFind(id); +} + + +Q_EXPORT_PLUGIN(GenericEditorPlugin) diff --git a/src/plugins/genericeditor/genericeditorplugin.h b/src/plugins/genericeditor/genericeditorplugin.h new file mode 100644 index 00000000000..12fceb5bcba --- /dev/null +++ b/src/plugins/genericeditor/genericeditorplugin.h @@ -0,0 +1,101 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef GENERICEDITORPLUGIN_H +#define GENERICEDITORPLUGIN_H + +#include + +#include +#include +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class HighlightDefinition; + +// Note: The general interface of this class is temporary. Still need discussing details about +// the definition files integration with Creator. + +class GenericEditorPlugin : public ExtensionSystem::IPlugin +{ + Q_OBJECT + +public: + GenericEditorPlugin(); + virtual ~GenericEditorPlugin(); + + static GenericEditorPlugin *instance(); + + virtual bool initialize(const QStringList &arguments, QString *errorString); + virtual void extensionsInitialized(); + + QString definitionIdByName(const QString &name) const; + QString definitionIdByMimeType(const QString &mimeType) const; + + bool isBuildingDefinition(const QString &id) const; + const QSharedPointer &definition(const QString &id); + + static const QLatin1String kAlertDefinitionId; + static const QLatin1String kCDefinitionId; + static const QLatin1String kCppDefinitionId; + static const QLatin1String kCssDefinitionId; + static const QLatin1String kDoxygenDefinitionId; + static const QLatin1String kFortranDefinitionId; + static const QLatin1String kHtmlDefinitionId; + static const QLatin1String kJavaDefinitionId; + static const QLatin1String kJavadocDefinitionId; + static const QLatin1String kJavascriptDefinitionId; + static const QLatin1String kObjectiveCDefinitionId; + static const QLatin1String kPerlDefinitionId; + static const QLatin1String kPhpDefinitionId; + static const QLatin1String kPythonDefinitionId; + static const QLatin1String kRubyDefinitionId; + static const QLatin1String kSqlDefinitionId; + static const QLatin1String kTclDefinitionId; + +private: + GenericEditorPlugin(const GenericEditorPlugin &HighlighterPlugin); + const GenericEditorPlugin &operator=(const GenericEditorPlugin &HighlighterPlugin); + + QSet m_isBuilding; + QHash m_idByName; + QHash m_idByMimeType; + QHash > m_definitions; + + static GenericEditorPlugin *m_instance; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // GENERICEDITORPLUGIN_H diff --git a/src/plugins/genericeditor/highlightdefinition.cpp b/src/plugins/genericeditor/highlightdefinition.cpp new file mode 100644 index 00000000000..fe808354c8d --- /dev/null +++ b/src/plugins/genericeditor/highlightdefinition.cpp @@ -0,0 +1,189 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "highlightdefinition.h" +#include "highlighterexception.h" +#include "context.h" +#include "keywordlist.h" +#include "itemdata.h" +#include "reuse.h" + +#include + +using namespace Highlight; +using namespace Internal; + +HighlightDefinition::HighlightDefinition() : + m_delimiters(QLatin1String(".():!+,-<=>%&/;?[]^{|}~\\*, \t")), + m_singleLineCommentPosition(0), + m_singleLineCommentAfterWhiteSpaces(false), + m_keywordCaseSensitivity(Qt::CaseSensitive) +{} + +HighlightDefinition::~HighlightDefinition() +{} + +template +const QSharedPointer &HighlightDefinition:: +GenericHelper::create(const QString &name, Container &container) +{ + if (name.isEmpty()) + throw HighlighterException(); + + if (container.contains(name)) + throw HighlighterException(); + + container.insert(name, QSharedPointer(new Element)); + return *container.constFind(name); +} + +template +const QSharedPointer &HighlightDefinition:: +GenericHelper::find(const QString &name, const Container &container) const +{ + typename Container::const_iterator it = container.find(name); + if (it == container.end()) + throw HighlighterException(); + + return it.value(); +} + +const QSharedPointer &HighlightDefinition::createKeywordList(const QString &list) +{ return m_helper.create(list, m_lists); } + +const QSharedPointer &HighlightDefinition::keywordList(const QString &list) +{ return m_helper.find(list, m_lists); } + +const QSharedPointer &HighlightDefinition::createContext(const QString &context, + bool initial) +{ + if (initial) + m_initialContext = context; + + return m_helper.create(context, m_contexts); +} + +const QSharedPointer &HighlightDefinition::initialContext() const +{ return m_helper.find(m_initialContext, m_contexts); } + +const QSharedPointer &HighlightDefinition::context(const QString &context) const +{ return m_helper.find(context, m_contexts); } + +const QHash > &HighlightDefinition::contexts() const +{ return m_contexts; } + +const QSharedPointer &HighlightDefinition::createItemData(const QString &itemData) +{ return m_helper.create(itemData, m_itemsData); } + +const QSharedPointer &HighlightDefinition::itemData(const QString &itemData) const +{ return m_helper.find(itemData, m_itemsData); } + +void HighlightDefinition::setSingleLineComment(const QString &start) +{ m_singleLineComment = start; } + +const QString &HighlightDefinition::singleLineComment() const +{ return m_singleLineComment; } + +void HighlightDefinition::setSingleLineCommentPosition(const QString &position) +{ + if (position == QLatin1String("afterwhitespace")) { + m_singleLineCommentAfterWhiteSpaces = true; + } else { + bool ok; + m_singleLineCommentPosition = position.toInt(&ok); + if (!ok) + m_singleLineCommentPosition = 0; + } +} + +int HighlightDefinition::singleLineCommentPosition() const +{ return m_singleLineCommentPosition; } + +bool HighlightDefinition::isSingleLineCommentAfterWhiteSpaces() const +{ return m_singleLineCommentAfterWhiteSpaces; } + +void HighlightDefinition::setMultiLineCommentStart(const QString &start) +{ m_multiLineCommentStart = start; } + +const QString &HighlightDefinition::multiLineCommentStart() const +{ return m_multiLineCommentStart; } + +void HighlightDefinition::setMultiLineCommentEnd(const QString &end) +{ m_multiLineCommentEnd = end; } + +const QString &HighlightDefinition::multiLineCommentEnd() const +{ return m_multiLineCommentEnd; } + +void HighlightDefinition::setMultiLineCommentRegion(const QString ®ion) +{ m_multiLineCommentRegion = region; } + +const QString &HighlightDefinition::multiLineCommentRegion() const +{ return m_multiLineCommentRegion; } + +void HighlightDefinition::removeDelimiters(const QString &characters) +{ + for (int i = 0; i < characters.length(); ++i) + m_delimiters.remove(characters.at(i)); +} + +void HighlightDefinition::addDelimiters(const QString &characters) +{ + for (int i = 0; i < characters.length(); ++i) { + if (!m_delimiters.contains(characters.at(i))) + m_delimiters.append(characters.at(i)); + } +} + +bool HighlightDefinition::isDelimiter(const QChar &character) const +{ + if (m_delimiters.contains(character)) + return true; + return false; +} + +void HighlightDefinition::setKeywordsSensitive(const QString &sensitivity) +{ + if (!sensitivity.isEmpty()) + m_keywordCaseSensitivity = toCaseSensitivity(toBool(sensitivity)); +} + +Qt::CaseSensitivity HighlightDefinition::keywordsSensitive() const +{ return m_keywordCaseSensitivity; } + +void HighlightDefinition::setLanguageName(const QString &name) +{ m_languageName = name; } + +const QString &HighlightDefinition::languageName() const +{ return m_languageName; } + +void HighlightDefinition::setFileExtensions(const QString &extensions) +{ + //Todo + Q_UNUSED(extensions); +} diff --git a/src/plugins/genericeditor/highlightdefinition.h b/src/plugins/genericeditor/highlightdefinition.h new file mode 100644 index 00000000000..5c7c9c45d11 --- /dev/null +++ b/src/plugins/genericeditor/highlightdefinition.h @@ -0,0 +1,131 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef HIGHLIGHTDEFINITION_H +#define HIGHLIGHTDEFINITION_H + +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class KeywordList; +class Context; +class ItemData; + +class HighlightDefinition +{ +public: + HighlightDefinition(); + ~HighlightDefinition(); + + const QSharedPointer &createKeywordList(const QString &list); + const QSharedPointer &keywordList(const QString &list); + + const QSharedPointer &createContext(const QString &context, bool initial); + const QSharedPointer &initialContext() const; + const QSharedPointer &context(const QString &context) const; + const QHash > &contexts() const; + + const QSharedPointer &createItemData(const QString &itemData); + const QSharedPointer &itemData(const QString &itemData) const; + + void setKeywordsSensitive(const QString &sensitivity); + Qt::CaseSensitivity keywordsSensitive() const; + + void addDelimiters(const QString &characters); + void removeDelimiters(const QString &characters); + //Todo: wordWrapDelimiters? + bool isDelimiter(const QChar &character) const; + + void setSingleLineComment(const QString &start); + const QString &singleLineComment() const; + + void setSingleLineCommentPosition(const QString &position); + int singleLineCommentPosition() const; + bool isSingleLineCommentAfterWhiteSpaces() const; + + void setMultiLineCommentStart(const QString &start); + const QString &multiLineCommentStart() const; + + void setMultiLineCommentEnd(const QString &end); + const QString &multiLineCommentEnd() const; + + void setMultiLineCommentRegion(const QString ®ion); + const QString &multiLineCommentRegion() const; + + void setLanguageName(const QString &name); + const QString &languageName() const; + + //Todo: Will use? + void setFileExtensions(const QString &extensions); + +private: + + HighlightDefinition(const HighlightDefinition &); + HighlightDefinition &operator=(const HighlightDefinition &); + + struct GenericHelper + { + template + const QSharedPointer &create(const QString &name, Container &container); + + template + const QSharedPointer &find(const QString &name, const Container &container) const; + }; + GenericHelper m_helper; + + QHash > m_lists; + QHash > m_contexts; + QHash > m_itemsData; + + QString m_initialContext; + + QString m_delimiters; + + QString m_singleLineComment; + int m_singleLineCommentPosition; + bool m_singleLineCommentAfterWhiteSpaces; + + QString m_multiLineCommentStart; + QString m_multiLineCommentEnd; + QString m_multiLineCommentRegion; + + Qt::CaseSensitivity m_keywordCaseSensitivity; + + QString m_languageName; + QString m_fileExtensions; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // HIGHLIGHTDEFINITION_H diff --git a/src/plugins/genericeditor/highlightdefinitionhandler.cpp b/src/plugins/genericeditor/highlightdefinitionhandler.cpp new file mode 100644 index 00000000000..f562b39b9a4 --- /dev/null +++ b/src/plugins/genericeditor/highlightdefinitionhandler.cpp @@ -0,0 +1,470 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "highlightdefinitionhandler.h" +#include "highlightdefinition.h" +#include "specificrules.h" +#include "itemdata.h" +#include "keywordlist.h" +#include "context.h" +#include "reuse.h" +#include "genericeditorplugin.h" +#include "highlighterexception.h" + +#include + +using namespace Highlight; +using namespace Internal; + +namespace { + static const QLatin1String kName("name"); + static const QLatin1String kList("list"); + static const QLatin1String kItem("item"); + static const QLatin1String kContext("context"); + static const QLatin1String kAttribute("attribute"); + static const QLatin1String kDynamic("dynamic"); + static const QLatin1String kFallthrough("fallthrough"); + static const QLatin1String kLineEndContext("lineEndContext"); + static const QLatin1String kLineBeginContext("lineBeginContext"); + static const QLatin1String kFallthroughContext("fallthroughContext"); + static const QLatin1String kBeginRegion("beginRegion"); + static const QLatin1String kEndRegion("endRegion"); + static const QLatin1String kLookAhead("lookAhead"); + static const QLatin1String kFirstNonSpace("firstNonSpace"); + static const QLatin1String kColumn("column"); + static const QLatin1String kItemData("itemData"); + static const QLatin1String kDefStyleNum("defStyleNum"); + static const QLatin1String kColor("color"); + static const QLatin1String kSelColor("selColor"); + static const QLatin1String kItalic("italic"); + static const QLatin1String kBold("bold"); + static const QLatin1String kUnderline("underline"); + static const QLatin1String kStrikeout("strikeout"); + static const QLatin1String kChar("char"); + static const QLatin1String kChar1("char1"); + static const QLatin1String kString("String"); + static const QLatin1String kInsensitive("insensitive"); + static const QLatin1String kMinimal("minimal"); + static const QLatin1String kKeywords("keywords"); + static const QLatin1String kCaseSensitive("casesensitive"); + static const QLatin1String kWeakDeliminator("weakDeliminator"); + static const QLatin1String kAdditionalDeliminator("additionalDeliminator"); + static const QLatin1String kWordWrapDeliminator("wordWrapDeliminator"); + static const QLatin1String kComment("comment"); + static const QLatin1String kPosition("position"); + static const QLatin1String kSingleLine("singleline"); + static const QLatin1String kMultiLine("multiline"); + static const QLatin1String kStart("start"); + static const QLatin1String kEnd("end"); + static const QLatin1String kRegion("region"); + static const QLatin1String kDetectChar("DetectChar"); + static const QLatin1String kDetect2Chars("Detect2Chars"); + static const QLatin1String kAnyChar("AnyChar"); + static const QLatin1String kStringDetect("StringDetect"); + static const QLatin1String kRegExpr("RegExpr"); + static const QLatin1String kKeyword("keyword"); + static const QLatin1String kInt("Int"); + static const QLatin1String kFloat("Float"); + static const QLatin1String kHlCOct("HlCOct"); + static const QLatin1String kHlCHex("HlCHex"); + static const QLatin1String kHlCStringChar("HlCStringChar"); + static const QLatin1String kHlCChar("HlCChar"); + static const QLatin1String kRangeDetect("RangeDetect"); + static const QLatin1String kLineContinue("LineContinue"); + static const QLatin1String kIncludeRules("IncludeRules"); + static const QLatin1String kDetectSpaces("DetectSpaces"); + static const QLatin1String kDetectIdentifier("DetectIdentifier"); + static const QLatin1String kLanguage("language"); + static const QLatin1String kExtensions("extensions"); + static const QLatin1String kIncludeAttrib("includeAttrib"); + static const QLatin1String kHash("#"); + static const QLatin1String kDoubleHash("##"); +} + +HighlightDefinitionHandler:: +HighlightDefinitionHandler(const QSharedPointer &definition) : + m_definition(definition), + m_processingKeyword(false), + m_initialContext(true) +{} + +HighlightDefinitionHandler::~HighlightDefinitionHandler() +{} + +bool HighlightDefinitionHandler::startDocument() +{ + return true; +} + +bool HighlightDefinitionHandler::endDocument() +{ + processIncludeRules(); + return true; +} + +bool HighlightDefinitionHandler::startElement(const QString &, + const QString &, + const QString &qName, + const QXmlAttributes &atts) +{ + if (qName == kList) { + listElementStarted(atts); + } else if (qName == kItem) { + itemElementStarted(); + } else if (qName == kContext) { + contextElementStarted(atts); + } else if (qName == kItemData) { + itemDataElementStarted(atts); + } else if (qName == kComment) { + commentElementStarted(atts); + } else if (qName == kKeywords) { + keywordsElementStarted(atts); + } else if (qName == kDetectChar) { + detectCharStarted(atts); + } else if (qName == kDetect2Chars) { + detect2CharsStarted(atts); + } else if (qName == kAnyChar) { + anyCharStarted(atts); + } else if (qName == kStringDetect) { + stringDetectedStarted(atts); + } else if (qName == kRegExpr) { + regExprStarted(atts); + } else if (qName == kKeyword) { + keywordStarted(atts); + } else if (qName == kInt) { + intStarted(atts); + } else if (qName == kFloat) { + floatStarted(atts); + } else if (qName == kHlCOct) { + hlCOctStarted(atts); + } else if (qName == kHlCHex) { + hlCHexStarted(atts); + } else if (qName == kHlCStringChar) { + hlCStringCharStarted(atts); + } else if (qName == kHlCChar) { + hlCCharStarted(atts); + } else if (qName == kRangeDetect) { + rangeDetectStarted(atts); + } else if (qName == kLineContinue) { + lineContinue(atts); + } else if (qName == kIncludeRules) { + includeRulesStarted(atts); + } else if (qName == kDetectSpaces) { + detectSpacesStarted(atts); + } else if (qName == kDetectIdentifier) { + detectIdentifier(atts); + } else if (qName == kLanguage) { + languageElementStarted(atts); + } + + return true; +} + +bool HighlightDefinitionHandler::endElement(const QString &, const QString &, const QString &qName) +{ + if (qName == kItem) { + m_currentList->addKeyword(m_currentKeyword.trimmed()); + m_processingKeyword = false; + } else if (qName == kDetectChar || qName == kDetect2Chars || qName == kAnyChar || + qName == kStringDetect || qName == kRegExpr || qName == kKeyword || qName == kInt || + qName == kFloat || qName == kHlCOct || qName == kHlCHex || qName == kHlCStringChar || + qName == kHlCChar || qName == kRangeDetect || qName == kLineContinue || + qName == kDetectSpaces || qName == kDetectIdentifier) { + m_currentRule.pop(); + } + + return true; +} + +bool HighlightDefinitionHandler::characters(const QString& ch) +{ + // Character data of an element may be reported in more than one chunk. + if (m_processingKeyword) + m_currentKeyword.append(ch); + + return true; +} + +void HighlightDefinitionHandler::languageElementStarted(const QXmlAttributes &atts) const +{ + m_definition->setLanguageName(atts.value(kName)); + m_definition->setFileExtensions(atts.value(kExtensions)); +} + +void HighlightDefinitionHandler::listElementStarted(const QXmlAttributes &atts) +{ + m_currentList = m_definition->createKeywordList(atts.value(kName)); +} + +void HighlightDefinitionHandler::itemElementStarted() +{ + m_currentKeyword.clear(); + m_processingKeyword = true; +} + +void HighlightDefinitionHandler::contextElementStarted(const QXmlAttributes &atts) +{ + m_currentContext = m_definition->createContext(atts.value(kName), m_initialContext); + m_currentContext->setDefinition(m_definition); + m_currentContext->setName(atts.value(kName)); + m_currentContext->setItemData(atts.value(kAttribute)); + m_currentContext->setDynamic(atts.value(kDynamic)); + m_currentContext->setFallthrough(atts.value(kFallthrough)); + m_currentContext->setFallthroughContext(atts.value(kFallthroughContext)); + m_currentContext->setLineBeginContext(atts.value(kLineBeginContext)); + m_currentContext->setLineEndContext(atts.value(kLineEndContext)); + + m_initialContext = false; +} + +void HighlightDefinitionHandler::ruleElementStarted(const QXmlAttributes &atts, + const QSharedPointer &rule) +{ + // The definition of a rule is not necessarily the same of its enclosing context because of + // externally included rules. + rule->setDefinition(m_definition); + rule->setItemData(atts.value(kAttribute)); + rule->setContext(atts.value(kContext)); + rule->setBeginRegion(atts.value(kBeginRegion)); + rule->setEndRegion(atts.value(kEndRegion)); + rule->setLookAhead(atts.value(kLookAhead)); + rule->setFirstNonSpace(atts.value(kFirstNonSpace)); + rule->setColumn(atts.value(kColumn)); + + if (m_currentRule.isEmpty()) + m_currentContext->addRule(rule); + else + m_currentRule.top()->addChild(rule); + + m_currentRule.push(rule); +} + +void HighlightDefinitionHandler::itemDataElementStarted(const QXmlAttributes &atts) const +{ + QSharedPointer itemData = m_definition->createItemData(atts.value(kName)); + itemData->setStyle(atts.value(kDefStyleNum)); + itemData->setColor(atts.value(kColor)); + itemData->setSelectionColor(atts.value(kSelColor)); + itemData->setItalic(atts.value(kItalic)); + itemData->setBold(atts.value(kBold)); + itemData->setUnderlined(atts.value(kUnderline)); + itemData->setStrikedOut(atts.value(kStrikeout)); + itemData->configureFormat(); +} + +void HighlightDefinitionHandler::commentElementStarted(const QXmlAttributes &atts) const +{ + const QString &commentType = atts.value(kName); + if (commentType == kSingleLine) { + m_definition->setSingleLineComment(atts.value(kStart)); + m_definition->setSingleLineCommentPosition(atts.value(kPosition)); + } else if (commentType == kMultiLine) { + m_definition->setMultiLineCommentStart(atts.value(kStart)); + m_definition->setMultiLineCommentEnd(atts.value(kEnd)); + m_definition->setMultiLineCommentRegion(atts.value(kRegion)); + } +} + +void HighlightDefinitionHandler::keywordsElementStarted(const QXmlAttributes &atts) const +{ + // Global case sensitivity appears last in the document (required by dtd) and is set here. + m_definition->setKeywordsSensitive(atts.value(kCaseSensitive)); + m_definition->removeDelimiters(atts.value(kWeakDeliminator)); + m_definition->addDelimiters(atts.value(kAdditionalDeliminator)); + //Todo: wordWrapDelimiters? +} + +void HighlightDefinitionHandler::detectCharStarted(const QXmlAttributes &atts) +{ + DetectCharRule *rule = new DetectCharRule; + rule->setChar(atts.value(kChar)); + rule->setActive(atts.value(kDynamic)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::detect2CharsStarted(const QXmlAttributes &atts) +{ + Detect2CharsRule *rule = new Detect2CharsRule; + rule->setChar(atts.value(kChar)); + rule->setChar1(atts.value(kChar1)); + rule->setActive(atts.value(kDynamic)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::anyCharStarted(const QXmlAttributes &atts) +{ + AnyCharRule *rule = new AnyCharRule; + rule->setCharacterSet(atts.value(kString)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::stringDetectedStarted(const QXmlAttributes &atts) +{ + StringDetectRule *rule = new StringDetectRule; + rule->setString(atts.value(kString)); + rule->setInsensitive(atts.value(kInsensitive)); + rule->setActive(atts.value(kDynamic)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::regExprStarted(const QXmlAttributes &atts) +{ + RegExprRule *rule = new RegExprRule; + rule->setPattern(atts.value(kString)); + rule->setMinimal(atts.value(kMinimal)); + rule->setInsensitive(atts.value(kInsensitive)); + rule->setActive(atts.value(kDynamic)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::keywordStarted(const QXmlAttributes &atts) +{ + KeywordRule *rule = new KeywordRule(m_definition); + rule->setList(atts.value(kString)); + rule->setInsensitive(atts.value(kInsensitive)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::intStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new IntRule)); +} + +void HighlightDefinitionHandler::floatStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new FloatRule)); +} + +void HighlightDefinitionHandler::hlCOctStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new HlCOctRule)); +} + +void HighlightDefinitionHandler::hlCHexStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new HlCHexRule)); +} + +void HighlightDefinitionHandler::hlCStringCharStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new HlCStringCharRule)); +} + +void HighlightDefinitionHandler::hlCCharStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new HlCCharRule)); +} + +void HighlightDefinitionHandler::rangeDetectStarted(const QXmlAttributes &atts) +{ + RangeDetectRule *rule = new RangeDetectRule; + rule->setChar(atts.value(kChar)); + rule->setChar1(atts.value(kChar1)); + ruleElementStarted(atts, QSharedPointer(rule)); +} + +void HighlightDefinitionHandler::lineContinue(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new LineContinueRule)); +} + +void HighlightDefinitionHandler::includeRulesStarted(const QXmlAttributes &atts) +{ + // Include rules are treated as instructions for latter processing. + IncludeRulesInstruction instruction(atts.value(kContext), m_currentContext->rules().size(), + atts.value(kIncludeAttrib)); + + // Include rules (as many others) are not allowed as a child. + m_currentContext->addIncludeRulesInstruction(instruction); +} + +void HighlightDefinitionHandler::detectSpacesStarted(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new DetectSpacesRule)); +} + +void HighlightDefinitionHandler::detectIdentifier(const QXmlAttributes &atts) +{ + ruleElementStarted(atts, QSharedPointer(new DetectIdentifierRule)); +} + +void HighlightDefinitionHandler::processIncludeRules() const +{ + const QHash > &allContexts = m_definition->contexts(); + foreach (const QSharedPointer &context, allContexts) + processIncludeRules(context); +} + +void HighlightDefinitionHandler::processIncludeRules(const QSharedPointer &context) const +{ + if (context->includeRulesInstructions().isEmpty()) + return; + + int rulesIncluded = 0; + const QList &instructions = context->includeRulesInstructions(); + foreach (const IncludeRulesInstruction &instruction, instructions) { + + QSharedPointer sourceContext; + const QString &sourceName = instruction.sourceContext(); + if (sourceName.startsWith(kDoubleHash)) { + // This refers to an external definition. The rules included are the ones from its + // initial context. Others contexts and rules from the external definition will + // transparently to the highlighter. This because contexts and rules know the + // definition they are from. + QString externalName = QString::fromRawData(sourceName.unicode() + 2, + sourceName.length() - 2); + const QString id = GenericEditorPlugin::instance()->definitionIdByName(externalName); + + // If there is an incorrect circular dependency among definitions this is skipped. + if (GenericEditorPlugin::instance()->isBuildingDefinition(id)) + continue; + + QSharedPointer externalDefinition = + GenericEditorPlugin::instance()->definition(id); + sourceContext = externalDefinition->initialContext(); + } else if (!sourceName.startsWith(kHash)) { + sourceContext = m_definition->context(sourceName); + + // Recursion is done only for context direct rules. Child rules are not processed + // because they cannot be include rules. + processIncludeRules(sourceContext); + } + + if (instruction.replaceItemData()) { + context->setItemData(sourceContext->itemData()); + context->setDefinition(sourceContext->definition()); + } + + foreach (QSharedPointer rule, sourceContext->rules()) { + context->addRule(rule, instruction.indexHint() + rulesIncluded); + ++rulesIncluded; + } + } + context->clearIncludeRulesInstructions(); +} diff --git a/src/plugins/genericeditor/highlightdefinitionhandler.h b/src/plugins/genericeditor/highlightdefinitionhandler.h new file mode 100644 index 00000000000..7f9b32a3130 --- /dev/null +++ b/src/plugins/genericeditor/highlightdefinitionhandler.h @@ -0,0 +1,107 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef HIGHLIGHTDEFINITIONHANDLER_H +#define HIGHLIGHTDEFINITIONHANDLER_H + +#include +#include +#include +#include + +#include + +namespace Highlight { +namespace Internal { + +class KeywordList; +class Context; +class Rule; +class HighlightDefinition; + +class HighlightDefinitionHandler : public QXmlDefaultHandler +{ +public: + HighlightDefinitionHandler(const QSharedPointer &definition); + ~HighlightDefinitionHandler(); + + bool startDocument(); + bool endDocument(); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &atts); + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); + bool characters(const QString &ch); + +private: + void languageElementStarted(const QXmlAttributes &atts) const; + void listElementStarted(const QXmlAttributes &atts); + void itemElementStarted(); + void contextElementStarted(const QXmlAttributes &atts); + void itemDataElementStarted(const QXmlAttributes &atts) const; + void commentElementStarted(const QXmlAttributes &atts) const; + void keywordsElementStarted(const QXmlAttributes &atts) const; + void ruleElementStarted(const QXmlAttributes &atts, const QSharedPointer &rule); + + // Specific rules. + void detectCharStarted(const QXmlAttributes &atts); + void detect2CharsStarted(const QXmlAttributes &atts); + void anyCharStarted(const QXmlAttributes &atts); + void stringDetectedStarted(const QXmlAttributes &atts); + void regExprStarted(const QXmlAttributes &atts); + void keywordStarted(const QXmlAttributes &atts); + void intStarted(const QXmlAttributes &atts); + void floatStarted(const QXmlAttributes &atts); + void hlCOctStarted(const QXmlAttributes &atts); + void hlCHexStarted(const QXmlAttributes &atts); + void hlCStringCharStarted(const QXmlAttributes &atts); + void hlCCharStarted(const QXmlAttributes &atts); + void rangeDetectStarted(const QXmlAttributes &atts); + void lineContinue(const QXmlAttributes &atts); + void includeRulesStarted(const QXmlAttributes &atts); + void detectSpacesStarted(const QXmlAttributes &atts); + void detectIdentifier(const QXmlAttributes &atts); + + void processIncludeRules() const; + void processIncludeRules(const QSharedPointer &context) const; + + QSharedPointer m_definition; + + bool m_processingKeyword; + QString m_currentKeyword; + QSharedPointer m_currentList; + QSharedPointer m_currentContext; + QStack > m_currentRule; + + bool m_initialContext; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // HIGHLIGHTDEFINITIONHANDLER_H diff --git a/src/plugins/genericeditor/highlighter.cpp b/src/plugins/genericeditor/highlighter.cpp new file mode 100644 index 00000000000..6c715d2cca5 --- /dev/null +++ b/src/plugins/genericeditor/highlighter.cpp @@ -0,0 +1,386 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "highlighter.h" +#include "highlightdefinition.h" +#include "context.h" +#include "rule.h" +#include "itemdata.h" +#include "highlighterexception.h" +#include "progressdata.h" + +#include + +using namespace Highlight; +using namespace Internal; + +namespace { + static const QLatin1String kStay("#stay"); + static const QLatin1String kPop("#pop"); + static const QLatin1Char kBackSlash('\\'); + static const QLatin1Char kHash('#'); +} + +Highlighter::Highlighter(const QSharedPointer &defaultContext,QTextDocument *parent) : + QSyntaxHighlighter(parent), + m_persistentStatesCounter(PersistentsStart), + m_dynamicContextsCounter(0), + m_isBroken(false), + m_defaultContext(defaultContext) +{ + m_persistentStates.insert(m_defaultContext->name(), Default); +} + +Highlighter::~Highlighter() +{} + +Highlighter::BlockData::BlockData() +{} + +Highlighter::BlockData::~BlockData() +{} + +void Highlighter::highlightBlock(const QString &text) +{ + if (m_isBroken) + return; + + try { + setupDataForBlock(text); + + handleContextChange(m_currentContext->lineBeginContext(), m_currentContext->definition()); + + ProgressData progress; + const int length = text.length(); + while (progress.offset() < length) { + + if (progress.offset() > 0 && + progress.onlySpacesSoFar() && + !text.at(progress.offset()).isSpace()) { + progress.setOnlySpacesSoFar(false); + } + + iterateThroughRules(text, length, &progress, false, m_currentContext->rules()); + } + + handleContextChange(m_currentContext->lineEndContext(), m_currentContext->definition(), + false); + + m_contexts.clear(); + } catch (const HighlighterException &) { + m_isBroken = true; + } +} + +void Highlighter::setupDataForBlock(const QString &text) +{ + if (currentBlockState() == WillContinue) + analyseConsistencyOfWillContinueBlock(text); + + if (previousBlockState() == Default || previousBlockState() == -1) + setupDefault(); + else if (previousBlockState() == WillContinue) + setupFromWillContinue(); + else if (previousBlockState() == Continued) + setupFromContinued(); + else + setupFromPersistent(); + + setCurrentContext(); +} + +void Highlighter::setupDefault() +{ + m_contexts.push_back(m_defaultContext); + + setCurrentBlockState(Default); +} + +void Highlighter::setupFromWillContinue() +{ + BlockData *previousData = static_cast(currentBlock().previous().userData()); + m_contexts.push_back(previousData->m_contextToContinue); + + if (!currentBlockUserData()) { + BlockData *data = initializeBlockData(); + data->m_originalState = previousData->m_originalState; + } + + if (currentBlockState() == Default || currentBlockState() == -1) + setCurrentBlockState(Continued); +} + +void Highlighter::setupFromContinued() +{ + BlockData *previousData = static_cast(currentBlock().previous().userData()); + + Q_ASSERT(previousData->m_originalState != WillContinue && + previousData->m_originalState != Continued); + + if (previousData->m_originalState == Default || previousData->m_originalState == -1) + m_contexts.push_back(m_defaultContext); + else + pushContextSequence(previousData->m_originalState); + + setCurrentBlockState(previousData->m_originalState); +} + +void Highlighter::setupFromPersistent() +{ + pushContextSequence(previousBlockState()); + + setCurrentBlockState(previousBlockState()); +} + +void Highlighter::iterateThroughRules(const QString &text, + const int length, + ProgressData *progress, + const bool childRule, + const QList > &rules) +{ + typedef QList >::const_iterator RuleIterator; + + bool contextChanged = false; + bool atLeastOneMatch = false; + + RuleIterator it = rules.begin(); + RuleIterator endIt = rules.end(); + while (it != endIt && progress->offset() < length) { + int startOffset = progress->offset(); + + const QSharedPointer &rule = *it; + if (rule->matchSucceed(text, length, progress)) { + atLeastOneMatch = true; + + if (progress->willContinueLine()) { + createWillContinueBlock(); + progress->setWillContinueLine(false); + progress->setOffset(length); + } else { + if (rule->hasChild()) + iterateThroughRules(text, length, progress, true, rule->childs()); + + if (!rule->context().isEmpty() && contextChangeRequired(rule->context())) { + m_currentCaptures = progress->captures(); + changeContext(rule->context(), rule->definition()); + contextChanged = true; + } + } + + // Format is not applied to child rules directly (but relative to the offset of their + // parent) nor to look ahead rules. + if (!childRule && !rule->isLookAhead()) { + if (rule->itemData().isEmpty()) + applyFormat(startOffset, progress->offset() - startOffset, + m_currentContext->itemData(), m_currentContext->definition()); + else + applyFormat(startOffset, progress->offset() - startOffset, rule->itemData(), + rule->definition()); + } + + // When there is a match of one child rule the others should be skipped. Otherwise + // the highlighting would be incorret in a case like 9ULLLULLLUULLULLUL, for example. + if (contextChanged || childRule) { + break; + } else { + it = rules.begin(); + continue; + } + } + ++it; + } + + if (!childRule && !atLeastOneMatch) { + if (m_currentContext->isFallthrough()) { + handleContextChange(m_currentContext->fallthroughContext(), + m_currentContext->definition()); + iterateThroughRules(text, length, progress, false, m_currentContext->rules()); + } else { + applyFormat(progress->offset(), 1, m_currentContext->itemData(), + m_currentContext->definition()); + progress->incrementOffset(); + } + } +} + +bool Highlighter::contextChangeRequired(const QString &contextName) const +{ + if (contextName == kStay) + return false; + return true; +} + +void Highlighter::changeContext(const QString &contextName, + const QSharedPointer &definition, + const bool setCurrent) +{ + if (contextName.startsWith(kPop)) { + QStringList list = contextName.split(kHash, QString::SkipEmptyParts); + for (int i = 0; i < list.size(); ++i) + m_contexts.pop_back(); + + if (currentBlockState() >= PersistentsStart) { + // One or more persistent contexts were popped. + const QString ¤tSequence = currentContextSequence(); + if (m_persistentStates.contains(currentSequence)) + setCurrentBlockState(m_persistentStates.value(currentContextSequence())); + else + setCurrentBlockState(m_leadingStates.value(currentContextSequence())); + } + } else { + const QSharedPointer &context = definition->context(contextName); + + if (context->isDynamic()) + pushDynamicContext(context); + else + m_contexts.push_back(context); + + if (m_contexts.back()->lineEndContext() == kStay) { + // A persistent context was pushed. + const QString ¤tSequence = currentContextSequence(); + mapContextSequence(currentSequence); + setCurrentBlockState(m_persistentStates.value(currentSequence)); + } + } + + if (setCurrent) + setCurrentContext(); +} + +void Highlighter::handleContextChange(const QString &contextName, + const QSharedPointer &definition, + const bool setCurrent) +{ + if (!contextName.isEmpty() && contextChangeRequired(contextName)) + changeContext(contextName, definition, setCurrent); +} + +void Highlighter::applyFormat(int offset, + int count, + const QString &itemData, + const QSharedPointer &definition) +{ + if (count == 0) + return; + + try { + setFormat(offset, count, definition->itemData(itemData)->format()); + } catch (const HighlighterException &) { + // This case does not break the highlighter. In fact, currently there are broken xml + // definition files which Kate can cope with. For instance, the Printf context in java.xml + // points to an inexistent Printf item data. + } +} + +void Highlighter::createWillContinueBlock() +{ + if (!currentBlockUserData()) + initializeBlockData(); + + BlockData *data = static_cast(currentBlockUserData()); + if (currentBlockState() == Continued) { + BlockData *previousData = static_cast(currentBlock().previous().userData()); + data->m_originalState = previousData->m_originalState; + } else if (currentBlockState() != WillContinue) { + data->m_originalState = currentBlockState(); + } + data->m_contextToContinue = m_currentContext; + + setCurrentBlockState(WillContinue); +} + +void Highlighter::analyseConsistencyOfWillContinueBlock(const QString &text) +{ + if (currentBlock().next().isValid() && ( + text.length() == 0 || text.at(text.length() - 1) != kBackSlash) && + currentBlock().next().userState() != Continued) { + currentBlock().next().setUserState(Continued); + } + + if (text.length() == 0 || text.at(text.length() - 1) != kBackSlash) { + BlockData *data = static_cast(currentBlockUserData()); + data->m_contextToContinue.clear(); + setCurrentBlockState(data->m_originalState); + } +} + +void Highlighter::mapContextSequence(const QString &contextSequence) +{ + if (currentBlockState() < PersistentsStart && !m_leadingStates.contains(contextSequence)) + m_leadingStates.insert(contextSequence, currentBlockState()); + + if (!m_persistentStates.contains(contextSequence)) { + int newState = m_persistentStatesCounter; + m_persistentStates.insert(contextSequence, newState); + m_persistentContexts.insert(newState, m_contexts); + ++m_persistentStatesCounter; + } +} + +void Highlighter::pushContextSequence(int state) +{ + const QVector > &contexts = m_persistentContexts.value(state); + for (int i = 0; i < contexts.size(); ++i) + m_contexts.push_back(contexts.at(i)); +} + +QString Highlighter::currentContextSequence() const +{ + QString sequence; + for (int i = 0; i < m_contexts.size(); ++i) + sequence.append(m_contexts.at(i)->id()); + + return sequence; +} + +Highlighter::BlockData *Highlighter::initializeBlockData() +{ + BlockData *data = new BlockData; + setCurrentBlockUserData(data); + return data; +} + +void Highlighter::pushDynamicContext(const QSharedPointer &baseContext) +{ + // A dynamic context is created from another context which serves as its basis. Then, + // its rules are updated according to the captures from the calling regular expression which + // triggered the push of the dynamic context. + QSharedPointer context(new Context(*baseContext)); + context->configureId(m_dynamicContextsCounter); + context->updateDynamicRules(m_currentCaptures); + m_contexts.push_back(context); + ++m_dynamicContextsCounter; +} + +void Highlighter::setCurrentContext() +{ + if (m_contexts.isEmpty()) + throw HighlighterException(); + m_currentContext = m_contexts.back(); +} diff --git a/src/plugins/genericeditor/highlighter.h b/src/plugins/genericeditor/highlighter.h new file mode 100644 index 00000000000..de736538d15 --- /dev/null +++ b/src/plugins/genericeditor/highlighter.h @@ -0,0 +1,144 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef HIGHLIGHTER_H +#define HIGHLIGHTER_H + +#include +#include +#include + +#include +#include + +#include + +namespace Highlight { +namespace Internal { + +class Rule; +class Context; +class HighlightDefinition; +class ProgressData; + +class Highlighter : public QSyntaxHighlighter +{ +public: + Highlighter(const QSharedPointer &defaultContext, QTextDocument *parent = 0); + virtual ~Highlighter(); + +protected: + virtual void highlightBlock(const QString &text); + +private: + + void setupDataForBlock(const QString &text); + void setupDefault(); + void setupFromWillContinue(); + void setupFromContinued(); + void setupFromPersistent(); + + void iterateThroughRules(const QString &text, + const int length, + ProgressData *progress, + const bool childRule, + const QList > &rules); + + bool contextChangeRequired(const QString &contextName) const; + void handleContextChange(const QString &contextName, + const QSharedPointer &definition, + const bool setCurrent = true); + void changeContext(const QString &contextName, + const QSharedPointer &definition, + const bool setCurrent = true); + + void applyFormat(int offset, + int count, + const QString &itemData, + const QSharedPointer &definition); + + QString currentContextSequence() const; + void mapContextSequence(const QString &contextSequence); + void pushContextSequence(int state); + void pushDynamicContext(const QSharedPointer &baseContext); + + void setCurrentContext(); + + void createWillContinueBlock(); + void analyseConsistencyOfWillContinueBlock(const QString &text); + + struct BlockData : TextEditor::TextBlockUserData + { + BlockData(); + virtual ~BlockData(); + + int m_originalState; + QSharedPointer m_contextToContinue; + }; + BlockData *initializeBlockData(); + + // Block states + // - Default [0]: Nothing special. + // - WillContinue [1]: When there is match of the LineContinue rule (backslash as the last + // character). + // - Continued [2]: Blocks that happen after a WillContinue block and continued from their + // context until the next line end. + // - Persistent(s) [Anything >= 3]: Correspond to persistent contexts which last until a pop + // occurs due to a matching rule. Every sequence of persistent contexts seen so far is + // associated with a number (incremented by a unit each time). + enum BlockState { + Default = 0, + WillContinue, + Continued, + PersistentsStart + }; + int m_persistentStatesCounter; + int m_dynamicContextsCounter; + + bool m_isBroken; + + QSharedPointer m_defaultContext; + QSharedPointer m_currentContext; + QVector > m_contexts; + + // Mapping from context sequences to the persistent state they represent. + QHash m_persistentStates; + // Mapping from context sequences to the non-persistent state that led to them. + QHash m_leadingStates; + // Mapping from persistent states to context sequences (the actual "stack"). + QHash > > m_persistentContexts; + + // Captures used in dynamic rules. + QStringList m_currentCaptures; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // HIGHLIGHTER_H diff --git a/src/plugins/genericeditor/highlighterexception.h b/src/plugins/genericeditor/highlighterexception.h new file mode 100644 index 00000000000..6e45c96e06a --- /dev/null +++ b/src/plugins/genericeditor/highlighterexception.h @@ -0,0 +1,41 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef HIGHLIGHTEREXCEPTION_H +#define HIGHLIGHTEREXCEPTION_H + +namespace Highlight { +namespace Internal { + +class HighlighterException {}; + +} // namespace Internal +} // namespace Highlight + +#endif // HIGHLIGHTEREXCEPTION_H diff --git a/src/plugins/genericeditor/includerulesinstruction.cpp b/src/plugins/genericeditor/includerulesinstruction.cpp new file mode 100644 index 00000000000..7db35c06d26 --- /dev/null +++ b/src/plugins/genericeditor/includerulesinstruction.cpp @@ -0,0 +1,50 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "includerulesinstruction.h" +#include "reuse.h" + +using namespace Highlight; +using namespace Internal; + +IncludeRulesInstruction::IncludeRulesInstruction(const QString &context, + int hint, + const QString &replaceItemData) : + m_sourceContext(context), m_indexHint(hint), m_replaceItemData(toBool(replaceItemData)) +{ +} + +const QString &IncludeRulesInstruction::sourceContext() const +{ return m_sourceContext; } + +int IncludeRulesInstruction::indexHint() const +{ return m_indexHint; } + +bool IncludeRulesInstruction::replaceItemData() const +{ return m_replaceItemData; } diff --git a/src/plugins/genericeditor/includerulesinstruction.h b/src/plugins/genericeditor/includerulesinstruction.h new file mode 100644 index 00000000000..00472a13784 --- /dev/null +++ b/src/plugins/genericeditor/includerulesinstruction.h @@ -0,0 +1,56 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef INCLUDERULESINSTRUCTION_H +#define INCLUDERULESINSTRUCTION_H + +#include + +namespace Highlight { +namespace Internal { + +class IncludeRulesInstruction +{ +public: + IncludeRulesInstruction(const QString &context, int hint, const QString &replaceItemData); + + const QString &sourceContext() const; + int indexHint() const; + bool replaceItemData() const; + +private: + QString m_sourceContext; + int m_indexHint; + bool m_replaceItemData; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // INCLUDERULESINSTRUCTION_H diff --git a/src/plugins/genericeditor/itemdata.cpp b/src/plugins/genericeditor/itemdata.cpp new file mode 100644 index 00000000000..74e5ca7dbc6 --- /dev/null +++ b/src/plugins/genericeditor/itemdata.cpp @@ -0,0 +1,127 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "itemdata.h" +#include "reuse.h" + +using namespace Highlight; +using namespace Internal; + +namespace { + static const QLatin1String kDsNormal("dsNormal"); + static const QLatin1String kDsKeyword("dsKeyword"); + static const QLatin1String kDsDataType("dsDataType"); + static const QLatin1String kDsDecVal("dsDecVal"); + static const QLatin1String kDsBaseN("dsBaseN"); + static const QLatin1String kDsFloat("dsFloat"); + static const QLatin1String kDsChar("dsChar"); + static const QLatin1String kDsString("dsString"); + static const QLatin1String kDsComment("dsComment"); + static const QLatin1String kDsOthers("dsOthers"); + static const QLatin1String kDsAlert("dsAlert"); + static const QLatin1String kDsFunction("dsFunction"); + static const QLatin1String kDsRegionMarker("dsRegionMarker"); + static const QLatin1String kDsError("dsError"); +} + +ItemData::ItemData() +{} + +void ItemData::setStyle(const QString &style) +{ m_style = style; } + +void ItemData::setColor(const QString &color) +{ m_color.setNamedColor(color); } + +void ItemData::setSelectionColor(const QString &color) +{ m_selectionColor.setNamedColor(color); } + +void ItemData::setItalic(const QString &italic) +{ m_font.setItalic(toBool(italic)); } + +void ItemData::setBold(const QString &bold) +{ m_font.setBold(toBool(bold)); } + +void ItemData::setUnderlined(const QString &underlined) +{ m_font.setUnderline(toBool(underlined)); } + +void ItemData::setStrikedOut(const QString &striked) +{ m_font.setStrikeOut(toBool(striked)); } + +void ItemData::configureFormat() +{ + //Todo: Overwrite defaults when true? + m_format.setFont(m_font); + + if (m_style == kDsNormal) { + m_format.setForeground(Qt::black); + } else if (m_style == kDsKeyword) { + m_format.setForeground(Qt::black); + m_format.setFontWeight(QFont::Bold); + } else if (m_style == kDsDataType) { + m_format.setForeground(Qt::blue); + } else if (m_style == kDsDecVal) { + m_format.setForeground(Qt::darkYellow); + } else if (m_style == kDsBaseN) { + m_format.setForeground(Qt::darkYellow); + m_format.setFontWeight(QFont::Bold); + } else if (m_style == kDsFloat) { + m_format.setForeground(Qt::darkYellow); + m_format.setFontUnderline(true); + } else if (m_style == kDsChar) { + m_format.setForeground(Qt::magenta); + } else if (m_style == kDsString) { + m_format.setForeground(Qt::red); + } else if (m_style == kDsComment) { + m_format.setForeground(Qt::darkGray); + m_format.setFontItalic(true); + m_format.setFontWeight(QFont::Bold); + } else if (m_style == kDsOthers) { + m_format.setForeground(Qt::darkGreen); + } else if (m_style == kDsAlert) { + m_format.setForeground(Qt::darkRed); + m_format.setFontWeight(QFont::Bold); + } else if (m_style == kDsFunction) { + m_format.setForeground(Qt::darkBlue); + m_format.setFontWeight(QFont::Bold); + } else if (m_style == kDsRegionMarker) { + m_format.setForeground(Qt::yellow); + } else if (m_style == kDsError) { + m_format.setForeground(Qt::darkRed); + m_format.setFontUnderline(true); + } + + if (m_color.isValid()) + m_format.setForeground(QColor(m_color)); + //if (m_selectionColor.isValid()) + //m_format.setBackground(QColor(m_selectionColor)); +} + +const QTextCharFormat &ItemData::format() const +{ return m_format; } diff --git a/src/plugins/genericeditor/itemdata.h b/src/plugins/genericeditor/itemdata.h new file mode 100644 index 00000000000..ffb1b0353e0 --- /dev/null +++ b/src/plugins/genericeditor/itemdata.h @@ -0,0 +1,69 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef ITEMDATA_H +#define ITEMDATA_H + +#include + +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class ItemData +{ +public: + ItemData(); + + void setStyle(const QString &style); + void setColor(const QString &color); + void setSelectionColor(const QString &color); + void setItalic(const QString &italic); + void setBold(const QString &bold); + void setUnderlined(const QString &underlined); + void setStrikedOut(const QString &striked); + void configureFormat(); + + const QTextCharFormat &format() const; + +private: + QString m_style; + QColor m_color; + QColor m_selectionColor; + QFont m_font; + QTextCharFormat m_format; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // ITEMDATA_H diff --git a/src/plugins/genericeditor/keywordlist.cpp b/src/plugins/genericeditor/keywordlist.cpp new file mode 100644 index 00000000000..41de091323f --- /dev/null +++ b/src/plugins/genericeditor/keywordlist.cpp @@ -0,0 +1,61 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "keywordlist.h" + +using namespace Highlight; +using namespace Internal; + +void KeywordList::addKeyword(const QString &keyword) +{ + if (keyword.isEmpty()) + return; + + m_keywords.insert(keyword); +} + +bool KeywordList::isKeyword(const QString &keyword, Qt::CaseSensitivity sensitivity) const +{ + if (keyword.isEmpty()) + return false; + + // Case sensitivity could be implemented, for example, by converting all keywords to lower + // if the global sensitivity attribute is insensitive, then always checking for containment + // (with a conversion to lower in the necessary cases). But the code below is one alternative + // to support the existence of local sensitivity attributes (which override the global one - + // currently not documented). + if (sensitivity == Qt::CaseSensitive) { + return m_keywords.contains(keyword); + } else { + foreach (const QString &s, m_keywords) + if (keyword.compare(s, Qt::CaseInsensitive) == 0) + return true; + return false; + } +} diff --git a/src/plugins/genericeditor/keywordlist.h b/src/plugins/genericeditor/keywordlist.h new file mode 100644 index 00000000000..1c072e0e609 --- /dev/null +++ b/src/plugins/genericeditor/keywordlist.h @@ -0,0 +1,53 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef KEYWORDLIST_H +#define KEYWORDLIST_H + +#include +#include + +namespace Highlight { +namespace Internal { + +class KeywordList +{ +public: + + void addKeyword(const QString &keyword); + bool isKeyword(const QString &keyword, Qt::CaseSensitivity sensitivity) const; + +private: + QSet m_keywords; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // KEYWORDLIST_H diff --git a/src/plugins/genericeditor/languagespecificfactories.cpp b/src/plugins/genericeditor/languagespecificfactories.cpp new file mode 100644 index 00000000000..6710afe95ca --- /dev/null +++ b/src/plugins/genericeditor/languagespecificfactories.cpp @@ -0,0 +1,143 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "languagespecificfactories.h" +#include "genericeditorconstants.h" +#include "genericeditor.h" +#include "genericeditorplugin.h" + +#include +#include + +using namespace Highlight; +using namespace Internal; + +// C +CFactory::CFactory(QObject *parent) : GenericEditorFactory(parent) +{ + addMimeType(QLatin1String(Highlight::Constants::C_HEADER_MIMETYPE)); + addMimeType(QLatin1String(Highlight::Constants::C_SOURCE_MIMETYPE)); +} + +GenericEditor *CFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kCDefinitionId, parent); } + +// C++ +CppFactory::CppFactory(QObject *parent) : GenericEditorFactory(parent) +{ + addMimeType(QLatin1String(Highlight::Constants::CPP_HEADER_MIMETYPE)); + addMimeType(QLatin1String(Highlight::Constants::CPP_SOURCE_MIMETYPE)); +} + +GenericEditor *CppFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kCppDefinitionId, parent); } + +// Css +CssFactory::CssFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::CSS_MIMETYPE)); } + +GenericEditor *CssFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kCssDefinitionId, parent); } + +// Fortran +FortranFactory::FortranFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::FORTRAN_MIMETYPE)); } + +GenericEditor *FortranFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kFortranDefinitionId, parent); } + +// Html +HtmlFactory::HtmlFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::HTML_MIMETYPE)); } + +GenericEditor *HtmlFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kHtmlDefinitionId, parent); } + +// Java +JavaFactory::JavaFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::JAVA_MIMETYPE)); } + +GenericEditor *JavaFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kJavaDefinitionId, parent); } + +// Javascript +JavascriptFactory::JavascriptFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::JAVASCRIPT_MIMETYPE)); } + +GenericEditor *JavascriptFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kJavascriptDefinitionId, parent); } + +// ObjectiveC +ObjectiveCFactory::ObjectiveCFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::OBJECTIVEC_MIMETYPE)); } + +GenericEditor *ObjectiveCFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kObjectiveCDefinitionId, parent); } + +// Perl +PerlFactory::PerlFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::PERL_MIMETYPE)); } + +GenericEditor *PerlFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kPerlDefinitionId, parent); } + +// Php +PhpFactory::PhpFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::PHP_MIMETYPE)); } + +GenericEditor *PhpFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kPhpDefinitionId, parent); } + +// Python +PythonFactory::PythonFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::PYTHON_MIMETYPE)); } + +GenericEditor *PythonFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kPythonDefinitionId, parent); } + +// Ruby +RubyFactory::RubyFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::RUBY_MIMETYPE)); } + +GenericEditor *RubyFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kRubyDefinitionId, parent); } + +// SQL +SqlFactory::SqlFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::SQL_MIMETYPE)); } + +GenericEditor *SqlFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kSqlDefinitionId, parent); } + +// Tcl +TclFactory::TclFactory(QObject *parent) : GenericEditorFactory(parent) +{ addMimeType(QLatin1String(Highlight::Constants::TCL_MIMETYPE)); } + +GenericEditor *TclFactory::createGenericEditor(QWidget *parent) +{ return new GenericEditor(GenericEditorPlugin::kTclDefinitionId, parent); } diff --git a/src/plugins/genericeditor/languagespecificfactories.h b/src/plugins/genericeditor/languagespecificfactories.h new file mode 100644 index 00000000000..ed27458d13f --- /dev/null +++ b/src/plugins/genericeditor/languagespecificfactories.h @@ -0,0 +1,195 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef LANGUAGESPECIFICFACTORIES_H +#define LANGUAGESPECIFICFACTORIES_H + +#include "genericeditorfactory.h" + +namespace Highlight { +namespace Internal { + +class CFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + CFactory(QObject *parent = 0); + virtual ~CFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class CppFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + CppFactory(QObject *parent = 0); + virtual ~CppFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class CssFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + CssFactory(QObject *parent = 0); + virtual ~CssFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class FortranFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + FortranFactory(QObject *parent = 0); + virtual ~FortranFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class HtmlFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + HtmlFactory(QObject *parent = 0); + virtual ~HtmlFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class JavaFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + JavaFactory(QObject *parent = 0); + virtual ~JavaFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class JavascriptFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + JavascriptFactory(QObject *parent = 0); + virtual ~JavascriptFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class ObjectiveCFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + ObjectiveCFactory(QObject *parent = 0); + virtual ~ObjectiveCFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class PerlFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + PerlFactory(QObject *parent = 0); + virtual ~PerlFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class PhpFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + PhpFactory(QObject *parent = 0); + virtual ~PhpFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class PythonFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + PythonFactory(QObject *parent = 0); + virtual ~PythonFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class RubyFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + RubyFactory(QObject *parent = 0); + virtual ~RubyFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class SqlFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + SqlFactory(QObject *parent = 0); + virtual ~SqlFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +class TclFactory : public GenericEditorFactory +{ + Q_OBJECT +public: + TclFactory(QObject *parent = 0); + virtual ~TclFactory() {} + +private: + virtual GenericEditor *createGenericEditor(QWidget *parent); +}; + +} // namespace Internal +} // namespace Highlight + +#endif // LANGUAGESPECIFICFACTORIES_H diff --git a/src/plugins/genericeditor/progressdata.cpp b/src/plugins/genericeditor/progressdata.cpp new file mode 100644 index 00000000000..47696b04382 --- /dev/null +++ b/src/plugins/genericeditor/progressdata.cpp @@ -0,0 +1,82 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "progressdata.h" + +#include + +using namespace Highlight; +using namespace Internal; + +ProgressData::ProgressData() : + m_offset(0), + m_savedOffset(-1), + m_onlySpacesSoFar(true), + m_willContinueLine(false) +{} + +void ProgressData::setOffset(const int offset) +{ m_offset = offset; } + +int ProgressData::offset() const +{ return m_offset; } + +void ProgressData::incrementOffset() +{ ++m_offset; } + +void ProgressData::incrementOffset(const int increment) +{ m_offset += increment; } + +void ProgressData::saveOffset() +{ m_savedOffset = m_offset; } + +void ProgressData::restoreOffset() +{ + Q_ASSERT(m_savedOffset != -1); + m_offset = m_savedOffset; + m_savedOffset = -1; +} + +void ProgressData::setOnlySpacesSoFar(const bool onlySpaces) +{ m_onlySpacesSoFar = onlySpaces; } + +bool ProgressData::onlySpacesSoFar() const +{ return m_onlySpacesSoFar; } + +void ProgressData::setWillContinueLine(const bool willContinue) +{ m_willContinueLine = willContinue; } + +bool ProgressData::willContinueLine() const +{ return m_willContinueLine; } + +void ProgressData::setCaptures(const QStringList &captures) +{ m_captures = captures; } + +const QStringList &ProgressData::captures() const +{ return m_captures; } diff --git a/src/plugins/genericeditor/progressdata.h b/src/plugins/genericeditor/progressdata.h new file mode 100644 index 00000000000..d3df90acce1 --- /dev/null +++ b/src/plugins/genericeditor/progressdata.h @@ -0,0 +1,72 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef PROGRESSDATA_H +#define PROGRESSDATA_H + +#include + +namespace Highlight { +namespace Internal { + +class ProgressData +{ +public: + ProgressData(); + + void setOffset(const int offset); + int offset() const; + + void incrementOffset(); + void incrementOffset(const int increment); + + void saveOffset(); + void restoreOffset(); + + void setOnlySpacesSoFar(const bool onlySpaces); + bool onlySpacesSoFar() const; + + void setWillContinueLine(const bool willContinue); + bool willContinueLine() const; + + void setCaptures(const QStringList &captures); + const QStringList &captures() const; + +private: + int m_offset; + int m_savedOffset; + bool m_onlySpacesSoFar; + bool m_willContinueLine; + QStringList m_captures; +}; + +} // namespace Internal +} // namespace Highgliht + +#endif // PROGRESSDATA_H diff --git a/src/plugins/genericeditor/reuse.h b/src/plugins/genericeditor/reuse.h new file mode 100644 index 00000000000..3bcf39af352 --- /dev/null +++ b/src/plugins/genericeditor/reuse.h @@ -0,0 +1,91 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef REUSE_H +#define REUSE_H + +#include +#include +#include +#include + +namespace Highlight { +namespace Internal { + +inline bool toBool(const QString &s) +{ + static const QLatin1String kTrue("true"); + static const QLatin1String k1("1"); + + if (s.toLower() == kTrue || s == k1) + return true; + return false; +} + + +inline Qt::CaseSensitivity toCaseSensitivity(const bool sensitive) +{ + if (sensitive) + return Qt::CaseSensitive; + return Qt::CaseInsensitive; +} + +inline bool isOctalDigit(const QChar &c) +{ + static const QLatin1Char k0('0'); + static const QLatin1Char k7('7'); + + return c >= k0 && c <= k7; +} + +inline bool isHexDigit(const QChar &c) +{ + static const QLatin1Char k0('0'); + static const QLatin1Char k9('9'); + static const QLatin1Char kA('A'); + static const QLatin1Char kF('F'); + static const QLatin1Char ka('a'); + static const QLatin1Char kf('f'); + + if ((c >= k0 && c <= k9) || (c >= kA && c <= kF) || (c >= ka && c <= kf)) + return true; + + return false; +} + +inline void setStartCharacter(QChar &c, const QString &character) +{ + if (!character.isEmpty()) + c = character.at(0); +} + +} // namespace Internal +} // namespace Highlight + +#endif // REUSE_H diff --git a/src/plugins/genericeditor/rule.cpp b/src/plugins/genericeditor/rule.cpp new file mode 100644 index 00000000000..31100a1547b --- /dev/null +++ b/src/plugins/genericeditor/rule.cpp @@ -0,0 +1,292 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "rule.h" +#include "highlighterexception.h" +#include "progressdata.h" +#include "highlightdefinition.h" +#include "reuse.h" + +#include + +#include + +using namespace Highlight; +using namespace Internal; + +const QLatin1Char Rule::kBackSlash('\\'); +const QLatin1Char Rule::kUnderscore('_'); +const QLatin1Char Rule::kDot('.'); +const QLatin1Char Rule::kPlus('+'); +const QLatin1Char Rule::kMinus('-'); +const QLatin1Char Rule::kZero('0'); +const QLatin1Char Rule::kQuote('\"'); +const QLatin1Char Rule::kSingleQuote('\''); +const QLatin1Char Rule::kQuestion('?'); +const QLatin1Char Rule::kX('x'); +const QLatin1Char Rule::kA('a'); +const QLatin1Char Rule::kB('b'); +const QLatin1Char Rule::kE('e'); +const QLatin1Char Rule::kF('f'); +const QLatin1Char Rule::kN('n'); +const QLatin1Char Rule::kR('r'); +const QLatin1Char Rule::kT('t'); +const QLatin1Char Rule::kV('v'); + +Rule::Rule(bool consumesNonSpace) : + m_lookAhead(false), m_firstNonSpace(false), m_column(-1), m_consumesNonSpace(consumesNonSpace) +{} + +Rule::~Rule() +{} + +void Rule::setContext(const QString &context) +{ m_context = context; } + +const QString &Rule::context() const +{ return m_context; } + +void Rule::setItemData(const QString &itemData) +{ m_itemData = itemData; } + +const QString &Rule::itemData() const +{ return m_itemData; } + +void Rule::setBeginRegion(const QString &begin) +{ m_beginRegion = begin; } + +const QString &Rule::beginRegion() const +{ return m_beginRegion; } + +void Rule::setEndRegion(const QString &end) +{ m_endRegion = end; } + +const QString &Rule::endRegion() const +{ return m_endRegion; } + +void Rule::setLookAhead(const QString &lookAhead) +{ m_lookAhead = toBool(lookAhead); } + +bool Rule::isLookAhead() const +{ return m_lookAhead; } + +void Rule::setFirstNonSpace(const QString &firstNonSpace) +{ m_firstNonSpace = toBool(firstNonSpace); } + +bool Rule::isFirstNonSpace() const +{ return m_firstNonSpace; } + +void Rule::setColumn(const QString &column) +{ + bool ok; + m_column = column.toInt(&ok); + if (!ok) + m_column = -1; +} + +int Rule::column() const +{ return m_column; } + +void Rule::addChild(const QSharedPointer &rule) +{ m_childRules.append(rule); } + +bool Rule::hasChild() const +{ return !m_childRules.isEmpty(); } + +const QList > &Rule::childs() const +{ return m_childRules; } + +void Rule::setDefinition(const QSharedPointer &definition) +{ m_definition = definition; } + +const QSharedPointer &Rule::definition() const +{ return m_definition; } + +template +bool Rule::predicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + const predicate_t &p) const +{ + int original = progress->offset(); + while (progress->offset() < length && p(text.at(progress->offset()))) + progress->incrementOffset(); + + if (original != progress->offset()) + return true; + + return false; +} + +bool Rule::charPredicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + bool (QChar::* predicate)() const) const +{ + return predicateMatchSucceed(text, length, progress, std::mem_fun_ref(predicate)); +} + +bool Rule::charPredicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + bool (*predicate)(const QChar &)) const +{ + return predicateMatchSucceed(text, length, progress, std::ptr_fun(predicate)); +} + +bool Rule::matchSucceed(const QString &text, const int length, ProgressData *progress) const +{ + if (m_firstNonSpace && !progress->onlySpacesSoFar()) + return false; + + if (m_column != -1 && m_column != progress->offset()) + return false; + + int original = progress->offset(); + if (doMatchSucceed(text, length, progress)) { + if (progress->onlySpacesSoFar() && !m_lookAhead && m_consumesNonSpace) + progress->setOnlySpacesSoFar(false); + + if (m_lookAhead) + progress->setOffset(original); + + return true; + } + + return false; +} + +Rule *Rule::clone() const +{ return doClone(); } + +bool Rule::matchCharacter(const QString &text, + const int length, + ProgressData *progress, + const QChar &c, + bool saveRestoreOffset) const +{ + Q_UNUSED(length) + Q_ASSERT(progress->offset() < length); + + if (text.at(progress->offset()) == c) { + if (saveRestoreOffset) + progress->saveOffset(); + progress->incrementOffset(); + return true; + } + + return false; +} + +bool Rule::matchEscapeSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset) const +{ + if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) { + + if (progress->offset() < length) { + const QChar &c = text.at(progress->offset()); + if (c == kA || c == kB || c == kE || c == kF || c == kN || c == kR || c == kT || + c == kV || c == kV || c == kQuestion || c == kSingleQuote || c == kQuote || + c == kBackSlash) { + progress->incrementOffset(); + return true; + } else if (saveRestoreOffset) { + progress->restoreOffset(); + } + } else if (saveRestoreOffset) { + progress->restoreOffset(); + } + } + + return false; +} + +bool Rule::matchOctalSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset) const +{ + // An octal sequence is identified as in the C++ Standard. + // octal-escape-sequence: + // \ octal-digit + // \ octal-digit octal-digit + // \ octal-digit octal-digit octal-digit + + if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) { + + int count = 0; + while (progress->offset() < length && + count < 3 && + isOctalDigit(text.at(progress->offset()))) { + ++count; + progress->incrementOffset(); + } + + if (count > 0) + return true; + else if (saveRestoreOffset) + progress->restoreOffset(); + } + + return false; +} + +bool Rule::matchHexSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset) const +{ + // An hex sequence is identified as in the C++ Standard. + // hexadecimal-escape-sequence: + // \x hexadecimal-digit + // hexadecimal-escape-sequence hexadecimal-digit + + if (matchCharacter(text, length, progress, kBackSlash, saveRestoreOffset)) { + + if (progress->offset() < length && matchCharacter(text, length, progress, kX, false)) { + bool found = false; + while (progress->offset() < length && isHexDigit(text.at(progress->offset()))) { + if (!found) + found = true; + progress->incrementOffset(); + } + + if (found) + return true; + else if (saveRestoreOffset) + progress->restoreOffset(); + } else if (saveRestoreOffset) { + progress->restoreOffset(); + } + } + + return false; +} diff --git a/src/plugins/genericeditor/rule.h b/src/plugins/genericeditor/rule.h new file mode 100644 index 00000000000..d5c58b821d1 --- /dev/null +++ b/src/plugins/genericeditor/rule.h @@ -0,0 +1,160 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef RULE_H +#define RULE_H + +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class ProgressData; +class HighlightDefinition; + +class Rule +{ +public: + Rule(bool consumesNonSpace = true); + virtual ~Rule(); + + void setContext(const QString &context); + const QString &context() const; + + void setItemData(const QString &itemData); + const QString &itemData() const; + + void setBeginRegion(const QString &begin); + const QString &beginRegion() const; + + void setEndRegion(const QString &end); + const QString &endRegion() const; + + void setLookAhead(const QString &lookAhead); + bool isLookAhead() const; + + void setFirstNonSpace(const QString &firstNonSpace); + bool isFirstNonSpace() const; + + void setColumn(const QString &column); + int column() const; + + void addChild(const QSharedPointer &rule); + const QList > &childs() const; + bool hasChild() const; + + void setDefinition(const QSharedPointer &definition); + const QSharedPointer &definition() const; + + bool matchSucceed(const QString &text, const int length, ProgressData *progress) const; + + Rule *clone() const; + +protected: + bool charPredicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + bool (QChar::* predicate)() const) const; + bool charPredicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + bool (*predicate)(const QChar &)) const; + + bool matchCharacter(const QString &text, + const int length, + ProgressData *progress, + const QChar &c, + bool saveRestoreOffset = true) const; + bool matchEscapeSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset = true) const; + bool matchOctalSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset = true) const; + bool matchHexSequence(const QString &text, + const int length, + ProgressData *progress, + bool saveRestoreOffset = true) const; + + static const QLatin1Char kBackSlash; + static const QLatin1Char kUnderscore; + static const QLatin1Char kDot; + static const QLatin1Char kPlus; + static const QLatin1Char kMinus; + static const QLatin1Char kZero; + static const QLatin1Char kQuote; + static const QLatin1Char kSingleQuote; + static const QLatin1Char kQuestion; + static const QLatin1Char kX; + static const QLatin1Char kA; + static const QLatin1Char kB; + static const QLatin1Char kE; + static const QLatin1Char kF; + static const QLatin1Char kN; + static const QLatin1Char kR; + static const QLatin1Char kT; + static const QLatin1Char kV; + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const = 0; + + virtual Rule *doClone() const = 0; + + template + bool predicateMatchSucceed(const QString &text, + const int length, + ProgressData *progress, + const predicate_t &p) const; + + QString m_context; + QString m_itemData; + QString m_beginRegion; + QString m_endRegion; + bool m_lookAhead; + bool m_firstNonSpace; + int m_column; + bool m_consumesNonSpace; + + QList > m_childRules; + + // Rules are represented within contexts. However, they have their own definition because + // of externally included rules. + QSharedPointer m_definition; +}; + +} // namespace Internal +} // namespace Highlight + +#endif // RULE_H diff --git a/src/plugins/genericeditor/specificrules.cpp b/src/plugins/genericeditor/specificrules.cpp new file mode 100644 index 00000000000..18678ae3fe3 --- /dev/null +++ b/src/plugins/genericeditor/specificrules.cpp @@ -0,0 +1,467 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#include "specificrules.h" +#include "highlightdefinition.h" +#include "keywordlist.h" +#include "progressdata.h" +#include "reuse.h" + +#include + +using namespace Highlight; +using namespace Internal; + +namespace { + +void replaceByCaptures(QChar *c, const QStringList &captures) +{ + int index = c->digitValue(); + if (index > 0) { + const QString &capture = captures.at(index); + *c = capture.at(0); + } +} + +void replaceByCaptures(QString *s, const QStringList &captures) +{ + static const QLatin1Char kPercent('%'); + + int index; + int from = 0; + while ((index = s->indexOf(kPercent, from)) != -1) { + from = index + 1; + + QString accumulator; + while (from < s->length() && s->at(from).isDigit()) { + accumulator.append(s->at(from)); + ++from; + } + + bool ok; + int number = accumulator.toInt(&ok); + Q_ASSERT(ok); + + s->replace(index, accumulator.length() + 1, captures.at(number)); + index = from; + } +} +} + +// DetectChar +void DetectCharRule::setChar(const QString &character) +{ setStartCharacter(m_char, character); } + +void DetectCharRule::doReplaceExpressions(const QStringList &captures) +{ replaceByCaptures(&m_char, captures); } + +bool DetectCharRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + return matchCharacter(text, length, progress, m_char); +} + +// Detect2Chars +void Detect2CharsRule::setChar(const QString &character) +{ setStartCharacter(m_char, character); } + +void Detect2CharsRule::setChar1(const QString &character) +{ setStartCharacter(m_char1, character); } + +void Detect2CharsRule::doReplaceExpressions(const QStringList &captures) +{ + replaceByCaptures(&m_char, captures); + replaceByCaptures(&m_char1, captures); +} + +bool Detect2CharsRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchCharacter(text, length, progress, m_char)) { + if (progress->offset() < length && matchCharacter(text, length, progress, m_char1, false)) + return true; + else + progress->restoreOffset(); + } + + return false; +} + +// AnyChar +void AnyCharRule::setCharacterSet(const QString &s) +{ m_characterSet = s; } + +bool AnyCharRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + Q_UNUSED(length) + + if (m_characterSet.contains(text.at(progress->offset()))) { + progress->incrementOffset(); + return true; + } + + return false; +} + +// StringDetect +void StringDetectRule::setString(const QString &s) +{ + m_string = s; + m_length = m_string.length(); +} + +void StringDetectRule::setInsensitive(const QString &insensitive) +{ m_caseSensitivity = toCaseSensitivity(!toBool(insensitive)); } + +void StringDetectRule::doReplaceExpressions(const QStringList &captures) +{ replaceByCaptures(&m_string, captures); } + +bool StringDetectRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (length - progress->offset() >= m_length) { + QString candidate = text.fromRawData(text.unicode() + progress->offset(), m_length); + if (candidate.compare(m_string, m_caseSensitivity) == 0) { + progress->incrementOffset(m_length); + return true; + } + } + + return false; +} + +// RegExpr +void RegExprRule::setPattern(const QString &pattern) +{ m_expression.setPattern(pattern); } + +void RegExprRule::setInsensitive(const QString &insensitive) +{ m_expression.setCaseSensitivity(toCaseSensitivity(!toBool(insensitive))); } + +void RegExprRule::setMinimal(const QString &minimal) +{ m_expression.setMinimal(toBool(minimal)); } + +void RegExprRule::doReplaceExpressions(const QStringList &captures) +{ + QString s = m_expression.pattern(); + replaceByCaptures(&s, captures); + m_expression.setPattern(s); +} + +bool RegExprRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + Q_UNUSED(length) + + // This is not documented but a regular expression match is considered valid if it starts + // at the current position and if the match length is not zero. Checked in Kate's source code + // after some unexpected problems. + const int offset = progress->offset(); + if (m_expression.indexIn(text, offset, QRegExp::CaretAtZero) == offset) { + if (m_expression.matchedLength() == 0) + return false; + progress->incrementOffset(m_expression.matchedLength()); + progress->setCaptures(m_expression.capturedTexts()); + return true; + } + + return false; +} + +// Keyword +KeywordRule::KeywordRule(const QSharedPointer &definition) : + m_overrideGlobal(false) +{ + setDefinition(definition); +} + +KeywordRule::~KeywordRule() +{} + +void KeywordRule::setInsensitive(const QString &insensitive) +{ + if (!insensitive.isEmpty()) { + m_overrideGlobal = true; + m_localCaseSensitivity = toCaseSensitivity(!toBool(insensitive)); + } +} + +void KeywordRule::setList(const QString &listName) +{ m_list = definition()->keywordList(listName); } + +bool KeywordRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + int current = progress->offset(); + + if (current > 0 && !definition()->isDelimiter(text.at(current - 1))) + return false; + if (definition()->isDelimiter(text.at(current))) + return false; + + while (current < length && !definition()->isDelimiter(text.at(current))) + ++current; + + QString candidate = + QString::fromRawData(text.unicode() + progress->offset(), current - progress->offset()); + if ((m_overrideGlobal && m_list->isKeyword(candidate, m_localCaseSensitivity)) || + (!m_overrideGlobal && m_list->isKeyword(candidate, definition()->keywordsSensitive()))) { + progress->setOffset(current); + return true; + } + + return false; +} + +// Int +bool IntRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + const int offset = progress->offset(); + + // This is necessary to correctly highlight an invalid octal like 09, for example. + if (offset > 0 && text.at(offset - 1).isDigit()) + return false; + + if (text.at(offset).isDigit() && text.at(offset) != kZero) { + progress->incrementOffset(); + charPredicateMatchSucceed(text, length, progress, &QChar::isDigit); + return true; + } + + return false; +} + +// Float +bool FloatRule::doMatchSucceed(const QString &text, const int length, ProgressData *progress) const +{ + progress->saveOffset(); + + bool integralPart = charPredicateMatchSucceed(text, length, progress, &QChar::isDigit); + + bool decimalPoint = false; + if (progress->offset() < length && text.at(progress->offset()) == kDot) { + progress->incrementOffset(); + decimalPoint = true; + } + + bool fractionalPart = charPredicateMatchSucceed(text, length, progress, &QChar::isDigit); + + bool exponentialPart = false; + int offset = progress->offset(); + if (offset < length && (text.at(offset) == kE || text.at(offset).toLower() == kE)) { + progress->incrementOffset(); + + offset = progress->offset(); + if (offset < length && (text.at(offset) == kPlus || text.at(offset) == kMinus)) + progress->incrementOffset(); + + if (charPredicateMatchSucceed(text, length, progress, &QChar::isDigit)) { + exponentialPart = true; + } else { + progress->restoreOffset(); + return false; + } + } + + if ((integralPart || fractionalPart) && (decimalPoint || exponentialPart)) + return true; + + progress->restoreOffset(); + return false; +} + +// COctal +bool HlCOctRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchCharacter(text, length, progress, kZero)) { + // In the definition files the number matching rules which are more restrictive should + // appear before the rules which are least resctritive. Although this happens in general + // there is at least one case where this is not strictly followed for existent definition + // files (specifically, HlCHex comes before HlCOct). So the condition below. + const int offset = progress->offset(); + if (offset < length && (text.at(offset) == kX || text.at(offset).toLower() == kX)) { + progress->restoreOffset(); + return false; + } + + charPredicateMatchSucceed(text, length, progress, &isOctalDigit); + return true; + } + + return false; +} + +// CHex +bool HlCHexRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchCharacter(text, length, progress, kZero)) { + const int offset = progress->offset(); + if (offset < length && text.at(offset) != kX && text.at(offset).toLower() != kX) { + progress->restoreOffset(); + return false; + } + + progress->incrementOffset(); + if (charPredicateMatchSucceed(text, length, progress, &isHexDigit)) + return true; + else + progress->restoreOffset(); + } + + return false; +} + +// CString +bool HlCStringCharRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchEscapeSequence(text, length, progress)) + return true; + + if (matchOctalSequence(text, length, progress)) + return true; + + if (matchHexSequence(text, length, progress)) + return true; + + return false; +} + +// CChar +bool HlCCharRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchCharacter(text, length, progress, kSingleQuote)) { + if (progress->offset() < length) { + if (text.at(progress->offset()) != kBackSlash && + text.at(progress->offset()) != kSingleQuote) { + progress->incrementOffset(); + } else if (!matchEscapeSequence(text, length, progress, false)) { + progress->restoreOffset(); + return false; + } + + if (progress->offset() < length && + matchCharacter(text, length, progress, kSingleQuote, false)) { + return true; + } else { + progress->restoreOffset(); + } + } else { + progress->restoreOffset(); + } + } + + return false; +} + +// RangeDetect +void RangeDetectRule::setChar(const QString &character) +{ setStartCharacter(m_char, character); } + +void RangeDetectRule::setChar1(const QString &character) +{ setStartCharacter(m_char1, character); } + +bool RangeDetectRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (matchCharacter(text, length, progress, m_char)) { + while (progress->offset() < length) { + if (matchCharacter(text, length, progress, m_char1, false)) + return true; + progress->incrementOffset(); + } + progress->restoreOffset(); + } + + return false; +} + +// LineContinue +bool LineContinueRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + if (progress->offset() != length - 1) + return false; + + if (text.at(progress->offset()) == kBackSlash) { + progress->setWillContinueLine(true); + return true; + } + + return false; +} + +// DetectSpaces +DetectSpacesRule::DetectSpacesRule() : Rule(false) +{} + +bool DetectSpacesRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + return charPredicateMatchSucceed(text, length, progress, &QChar::isSpace); +} + +// DetectIdentifier +bool DetectIdentifierRule::doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const +{ + // Identifiers are characterized by a letter or underscore as the first character and then + // zero or more word characters (\w*). + if (text.at(progress->offset()).isLetter() || text.at(progress->offset()) == kUnderscore) { + progress->incrementOffset(); + while (progress->offset() < length) { + const QChar ¤t = text.at(progress->offset()); + if (current.isLetterOrNumber() || current.isMark() || current == kUnderscore) + progress->incrementOffset(); + else + break; + } + return true; + } + return false; +} diff --git a/src/plugins/genericeditor/specificrules.h b/src/plugins/genericeditor/specificrules.h new file mode 100644 index 00000000000..eb27a78c77a --- /dev/null +++ b/src/plugins/genericeditor/specificrules.h @@ -0,0 +1,288 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** Commercial Usage +** +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** +**************************************************************************/ + +#ifndef SPECIFICRULES_H +#define SPECIFICRULES_H + +#include "rule.h" +#include "dynamicrule.h" + +#include +#include +#include +#include + +namespace Highlight { +namespace Internal { + +class KeywordList; +class HighlightDefinition; + +class DetectCharRule : public DynamicRule +{ +public: + virtual ~DetectCharRule() {} + + void setChar(const QString &character); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual DetectCharRule *doClone() const { return new DetectCharRule(*this); } + virtual void doReplaceExpressions(const QStringList &captures); + + QChar m_char; +}; + +class Detect2CharsRule : public DynamicRule +{ +public: + virtual ~Detect2CharsRule() {} + + void setChar(const QString &character); + void setChar1(const QString &character); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual Detect2CharsRule *doClone() const { return new Detect2CharsRule(*this); } + virtual void doReplaceExpressions(const QStringList &captures); + + QChar m_char; + QChar m_char1; +}; + +class AnyCharRule : public Rule +{ +public: + virtual ~AnyCharRule() {} + + void setCharacterSet(const QString &s); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual AnyCharRule *doClone() const { return new AnyCharRule(*this); } + + QString m_characterSet; +}; + +class StringDetectRule : public DynamicRule +{ +public: + virtual ~StringDetectRule() {} + + void setString(const QString &s); + void setInsensitive(const QString &insensitive); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual StringDetectRule *doClone() const { return new StringDetectRule(*this); } + virtual void doReplaceExpressions(const QStringList &captures); + + QString m_string; + int m_length; + Qt::CaseSensitivity m_caseSensitivity; +}; + +class RegExprRule : public DynamicRule +{ +public: + virtual ~RegExprRule() {} + + void setPattern(const QString &pattern); + void setInsensitive(const QString &insensitive); + void setMinimal(const QString &minimal); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual RegExprRule *doClone() const { return new RegExprRule(*this); } + virtual void doReplaceExpressions(const QStringList &captures); + + QRegExp m_expression; +}; + +class KeywordRule : public Rule +{ +public: + KeywordRule(const QSharedPointer &definition); + virtual ~KeywordRule(); + + void setInsensitive(const QString &insensitive); + void setList(const QString &listName); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual KeywordRule *doClone() const { return new KeywordRule(*this); } + + bool m_overrideGlobal; + Qt::CaseSensitivity m_localCaseSensitivity; + QSharedPointer m_list; +}; + +class IntRule : public Rule +{ +public: + virtual ~IntRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual IntRule *doClone() const { return new IntRule(*this); } +}; + +class FloatRule : public Rule +{ +public: + virtual ~FloatRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual FloatRule *doClone() const { return new FloatRule(*this); } +}; + +class HlCOctRule : public Rule +{ +public: + virtual ~HlCOctRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual HlCOctRule *doClone() const { return new HlCOctRule(*this); } +}; + +class HlCHexRule : public Rule +{ +public: + virtual ~HlCHexRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual HlCHexRule *doClone() const { return new HlCHexRule(*this); } +}; + +class HlCStringCharRule : public Rule +{ +public: + virtual ~HlCStringCharRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual HlCStringCharRule *doClone() const { return new HlCStringCharRule(*this); } +}; + +class HlCCharRule : public Rule +{ +public: + virtual ~HlCCharRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual HlCCharRule *doClone() const { return new HlCCharRule(*this); } +}; + +class RangeDetectRule : public Rule +{ +public: + virtual ~RangeDetectRule() {} + + void setChar(const QString &character); + void setChar1(const QString &character); + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual RangeDetectRule *doClone() const { return new RangeDetectRule(*this); } + + QChar m_char; + QChar m_char1; +}; + +class LineContinueRule : public Rule +{ +public: + virtual ~LineContinueRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual LineContinueRule *doClone() const { return new LineContinueRule(*this); } +}; + +class DetectSpacesRule : public Rule +{ +public: + DetectSpacesRule(); + virtual ~DetectSpacesRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual DetectSpacesRule *doClone() const { return new DetectSpacesRule(*this); } +}; + +class DetectIdentifierRule : public Rule +{ +public: + virtual ~DetectIdentifierRule() {} + +private: + virtual bool doMatchSucceed(const QString &text, + const int length, + ProgressData *progress) const; + virtual DetectIdentifierRule *doClone() const { return new DetectIdentifierRule(*this); } +}; + +} // namespace Internal +} // namespace Highlight + +#endif // SPECIFICRULES_H diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 156d5ce9f8f..9928857b823 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -33,6 +33,7 @@ SUBDIRS = plugin_coreplugin \ plugin_genericprojectmanager \ plugin_qmljseditor \ plugin_mercurial \ + plugin_genericeditor \ debugger/dumper.pro contains(QT_CONFIG, declarative) { @@ -208,3 +209,7 @@ plugin_mercurial.subdir = mercurial plugin_mercurial.depends = plugin_vcsbase plugin_mercurial.depends += plugin_projectexplorer plugin_mercurial.depends += plugin_coreplugin + +plugin_genericeditor.subdir = genericeditor +plugin_genericeditor.depends = plugin_coreplugin +plugin_genericeditor.depends += plugin_texteditor