Git Product home page Git Product logo

bracketeer's Introduction

Overview

Bracketeer is a platform used to enrich the editors in Eclipse.

Features:

  • Coloring the brackets surrounding the cursor & brackets which have no match.
  • Showing automatic comments on brackets closing: loops, functions, etc...
  • Highly customizable.

Current supported editors:

  • JDT (java)
  • CDT (C/C++).

Installation

In your Eclipse, go to: Help->Install new software...
Enter the URL (in "Work with"): http://chookapp.github.com/ChookappUpdateSite/
From the chookapp category, choose any Bracketeer editor support you want (CDT - for C/C++, JDT - for java, etc...).
For example, choosing "Bracketeer CDT support" will install the Bracketeer infrastructure (if not already installed) and the CDT editor support. It is not advised to install a Bracketeer support for an editor type which is not already installed in your Eclipse (although it shouldn't do any actual harm).

Enjoy.

Screen shots

screenshot

You can find more information and screenshots in the Wiki or in the preferences help pages (after installing Bracketeer in Eclipse)

Feedback

Build notes

Build 1.2.0 (3/3/2012)

  • Modified default hot-keys for enable/disable hints (Ctrl-[, Ctrl-H) and enable/disable surrounding brackets (Ctrl-[, Ctrl-S), as suggested in issue 7.
  • The popup now has colors and highlights the matching bracket.
  • Added hints for break/continue from within "for", "while", "do", switch's "case"/"default" and Java's "foreach". This should address issue 3.
  • Improved support for matching pairs of angular brackets when used in template expressions (both in C++ and in Java).
  • Improved pair matching when there is inactive code (C++ only, obviously).
  • Some small bug fixes.

Build 1.1.0 (21/1/2012)

  • Fixed issue 1 - Support Google's WindowBuilder.
  • Fixed issue 2 and issue 5 - Null pointer exceptions.
  • Option of using a rectangle outline when highlighting brackets.
  • Option to ignore pairs which are close to each other.
  • Added annotation to "missing pair".
  • Fixed issue 4 - Support also C statements (not only C++).
  • Show "hint" when hovering (overriding "regular" behavior)
  • Show basic popup when hovering over a closing bracket (will be improved on the next version)
  • Fixed issue 6 - Join hint's multiple lines to one line.
  • Some small bug fixes.

Build 1.0.0 (23/12/2011)

  • Initial implementation.

bracketeer's People

Contributors

chookapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bracketeer's Issues

Support for Java 8 Lambda Statments

Java 8 lambda expressions seem to sort-of break Bracketeer.

Bracketeer does not put hints on brackets in lambda expressions, as well as any other bracketed blocks (while, for, if, etc) that are inside a lambda expression block. Support in Bracketeer for this would be greatly appreciated.

Configure the hint "comment style"

bracketeer currently shows its hints using C-style comments (i.e. /* some hint */). This wastes 3 spaces at the end of the hint (which count towards the maximum hint limit). It also looks out of place when every other actual comment in the file uses C++ style comments (i.e. // some comment).

Thus it would be really nice if it were possible to configure bracketeer to use C++ style comments, instead of C style comments. It would be even better if bracketeer defaulted to C++ style comments for C++ files (i.e. .cpp, .cc and.hpp).

Edit:
BTW, I just noticed that the icon on the bracketeer toolbar button that is used to enable/disable hints shows a C++ style comment, rather than a C style comment :->

Support for C++ namespace

It would be nice to see also the name of the namespace at the closing bracket

e.g.
namespace internal {
...
} /* namespace internal */

Anyway its a great tool! Thank you.

Best regards
Mario

Option to change the maximum hint length

bracketeer (which is awesome, by the way) limits the hint length. When a hint is longer than that limit the hint is elided. It would be nice to be able to change (e.g. increase) that maximum hint length (particularly for those that have large wide monitors).

Eclipse Indigo almost deadlocked (cannot exit for a long while)

While running some JUnit tests of my code and browsing sources the following exception has been thrown (visible in Eclipse's Error Log):

java.lang.IllegalStateException
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1122)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:807)
at com.chookapp.org.bracketeer.jdt.BracketeerJdtProcessor.processAst(BracketeerJdtProcessor.java:88)
at com.chookapp.org.bracketeer.jdt.BracketeerJdtProcessor.processDocument(BracketeerJdtProcessor.java:69)
at com.chookapp.org.bracketeer.extensionpoint.BracketeerProcessor.process(BracketeerProcessor.java:47)
at com.chookapp.org.bracketeer.core.ProcessingThread.run(ProcessingThread.java:81)
at java.lang.Thread.run(Unknown Source)

Session Data:
eclipse.buildId=M20120208-0800
java.version=1.6.0_45
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en
Framework arguments: -product org.eclipse.epp.package.rcp.product -showLocation
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.rcp.product -showLocation -data J:\Code\Java*****\Workspaces\Common

This is a continuation of log file J:\Code\Java*****\Workspaces\Common.metadata.bak_4.log
Created Time: 2013-10-30 14:22:48.673

Version installed:
Eclipse: Eclipse for RCP and RAP Developers; Indigo Service Release 2; 20120216-1857
com.chookapp.org.Bracketeer_1.2.0.201203031719.jar
com.chookapp.org.BracketeerJDT_1.2.0.201203031719.jar

Annotations Background: configure the "fold bar" background as well

I don't know if this is the right place to requests this. If not, please forgive me and disregard/close this issue.

I recently discovered that bracketeer bundles an "annotations background" plugin that lets you change the annotation bar background. It would be really nice if it also let you change the "fold bar" background (i.e. the background of the bar that shows the buttons to fold/unfold sections of code, which is to the right of the line number bar). I don't know if this is even possible (on Eclipse 3.x) but it would be really cool if it were. As a bonus, being able to change the scrollbar background too would be super-nice.

bad hot keys

Hi!

the default hot-key assignment for bracketeer includes ctrl+b which is "Build all" on a default CDT.

In window->preferences->general->keys i couldn't find the key assignments bracketeer uses.

Since i'm heavily used to ctrl-b for "build", how can i remove the bracketeer key assignments?

Thx for the great plugin!

Allways warns

The Bracketeer plugin is continuously (cca 30 / sec) writing warnings in the Eclipse Error log such this:

!ENTRY com.chookapp.org.Braketeer 2 0 2012-09-24 12:48:15.308
!MESSAGE
!STACK 0
java.lang.IllegalStateException
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1122)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:807)
at com.chookapp.org.bracketeer.jdt.BracketeerJdtProcessor.processAst(BracketeerJdtProcessor.java:88)
at com.chookapp.org.bracketeer.jdt.BracketeerJdtProcessor.processDocument(BracketeerJdtProcessor.java:69)
at com.chookapp.org.bracketeer.extensionpoint.BracketeerProcessor.process(BracketeerProcessor.java:47)
at com.chookapp.org.bracketeer.core.ProcessingThread.run(ProcessingThread.java:81)
at java.lang.Thread.run(Thread.java:662)

new versions?

Is the project definitively abandoned?
Based on commit history, there are no plan to support new versions of eclipse.

Alternative plugins?

NullPointerException using Search View

While I was searching occurrences of a method, and was passing through the items found on the Search view, there was a NullPointerException.

Below is the error log generated.

java.lang.NullPointerException
at com.chookapp.org.bracketeer.core.BracketsHighlighter.paint(BracketsHighlighter.java:397)
at org.eclipse.jface.text.PaintManager.paint(PaintManager.java:298)
at org.eclipse.jface.text.PaintManager.selectionChanged(PaintManager.java:337)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2732)
at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2711)
at org.eclipse.jface.text.TextViewer.setSelectedRange(TextViewer.java:2396)
at org.eclipse.jface.text.source.SourceViewer.setRangeIndication(SourceViewer.java:1102)
at org.eclipse.jface.text.source.projection.ProjectionViewer.setRangeIndication(ProjectionViewer.java:1342)
at org.eclipse.ui.texteditor.AbstractTextEditor.setHighlightRange(AbstractTextEditor.java:6219)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.setSelection(JavaEditor.java:2321)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.setSelection(JavaEditor.java:2386)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.revealInEditor(EditorUtility.java:247)
at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openElement(JavaSearchEditorOpener.java:45)
at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openMatch(JavaSearchEditorOpener.java:52)
at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.showMatch(JavaSearchResultPage.java:198)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage$7.run(AbstractTextSearchViewPage.java:938)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showMatch(AbstractTextSearchViewPage.java:941)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showCurrentMatch(AbstractTextSearchViewPage.java:1006)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage.gotoNextMatch(AbstractTextSearchViewPage.java:971)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage.handleOpen(AbstractTextSearchViewPage.java:1430)
at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.handleOpen(JavaSearchResultPage.java:577)
at org.eclipse.search.ui.text.AbstractTextSearchViewPage$5.open(AbstractTextSearchViewPage.java:756)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at org.eclipse.jface.util.OpenStrategy$1.mouseSelectItem(OpenStrategy.java:443)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:376)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

NPE in BracketsHilighter

1.0.0.201112231228

Seems to be spontaneous:

java.lang.NullPointerException
at com.chookapp.org.bracketeer.core.BracketsHighlighter.deactivate(BracketsHighlighter.java:422)
at org.eclipse.jface.text.PaintManager.inputDocumentAboutToBeChanged(PaintManager.java:365)
at org.eclipse.jface.text.TextViewer.fireInputDocumentAboutToBeChanged(TextViewer.java:2871)
at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2927)
at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:640)
at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:376)
at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:588)
at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:4030)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4218)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1451)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2563)
at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2550)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1395)
at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4277)
at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4299)
at org.eclipse.ui.internal.EditorReference.setInput(EditorReference.java:522)
at org.eclipse.ui.internal.WorkbenchPage.reuseEditor(WorkbenchPage.java:2744)
at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:280)
at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display(SourceLookupFacility.java:219)
at org.eclipse.debug.ui.DebugUITools.displaySource(DebugUITools.java:973)
at org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter$SourceDisplayJob.runInUIThread(StackFrameSourceDisplayAdapter.java:157)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

eclipse.buildId=M20110909-1335
java.version=1.7.0_02
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data e:\java\workspace

Support C "if" statements (hints for big if statements)

Hints should always be visible independant of the size of the statement. If the statement is too big, strip the statement to something like "// if (...)", because sometimes it is useful to know if the bracket matches an if or for if they are e.g. nested.

Bracketeer eats up the CPU even if all features are turned off

We had a quite big java file (23000 rows). I noticed, that eclipse is slow even if bracketeer is switched off. I checked with visualvm sampler, and it seems, that it processes files even if all features are turned off.

My suggestion is to cancel all ongoing processing if someone turns off the highlighting. And of course in this case no further processing should occour.

I uploaded some pictures and thread dumps at http://www3.zippyshare.com/v/70912819/file.html .

Feature request

Currently the plugin shows helpful comments of matching braces.

But there is no way to insert that comment in the actual code. This feature is especially helpful for namespaces (which tend to contain a lot of lines) or codes with a lot of nesting. The inserted comment can help the people using different editors.

Is it possible to add a hotkey so that the comments are actually inserted in the code?

Hints overlap with white space characters

Code mostly contains CR+LF line endings under Windows. When "Show whitespace characters" is checked under General/Editors/Text Editors, the Bracketeer hints overlap with the rendered LF, as can be seen in the screenshot:

image

Note that my editor font is Consolas with size 11, which might be of importance.

Preprocessor "Multiline" Hints

Hi,

we use a lot of Preprocessor encapsulations with quite complex conditions.
The ease the readability we use the line continuation with "".

In the following example:
...

if ( ( MACRO_A == 1) \

     && ( MARCO_B == 1) \
)
// Code A

else

// Code B

endif

// Code C
...
the displayed hints overlap with the code B and C.
Which is not very readable.
Could you limit the displayed hints to one line?

Apart from this Bracketeer is my PlugIn of the Month.
Thanks a lot
Tobi

bracketeer (CDT) toolbar greyed

Bracketeer seems not work in c projects. Tried to create new one or import an old one with no result. In Java projects Bracketeer works fine. I'm using eclipse Luna.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.