Giter VIP home page Giter VIP logo

acegwt's Introduction

AceGWT

An integration of the Ace Editor into GWT. If you want to embed a powerful text editor in a GWT application, AceGWT might be just what you're looking for!

The wiki has more information, including:

Also, there is javadoc.

Latest news

15 June 2018

  • Converted the library and demo to Maven, using a github branch as repository
    • Package AceGWT lib mvn clean gwt:generate-module compile gwt:package-lib
    • Deploy AceGWT lib mvn clean gwt:generate-module compile gwt:package-lib deploy
    • Run demo app mvn clean gwt:generate-module compile gwt:devmode
  • Updated to latest version of Ace (1.3.3)
  • All courtesy of José C.Paiva.

06 February 2016:

20 January 2015:

12 October 2014:

  • Updated to latest version of Ace from here, plus applied a small fix which has been submitted as a push request (code changes in this push request already applied to code in this repository).
  • Added autocomplete tooltip support based on latest updates to Ace Editor (forum, push request 2148).

27 June 2014:

  • Added experimental support for custom autocompleters, based on suggestions from Chris Ainsley.

26 June 2014:

  • Updated to latest version of Ace. A handful of new modes and themes added. Autocomplete is now supported.

18 March 2014:

  • Updated to latest version of Ace. Various new editor modes and themes added. Also, AceGWT now packages the minified versions of the Ace JavaScript files, which should reduce load time.
  • Issues with the text cursor position in Safari may be fixed.

25 June 2013:

  • Updated to latest version of Ace, many new editor modes added.
  • Initialization of AceEditor object has changed: the default constructor has been un-deprecated, and no changes should be made to the .ace_editor CSS class.

acegwt's People

Contributors

ainslec avatar ainsley avatar bmurray7 avatar byreal avatar daveho avatar ed8247 avatar henetiriki avatar hoffman373 avatar josepaiva94 avatar jspacco avatar paxdei avatar rsutormin 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

acegwt's Issues

Only few lines visible

Hi,

I've been experimenting a strange issue in the Editor. It doesn't happen always, but evey now and then the Editor gets loaded wrongly and only copule of lines are shown:

image

Notice that there's the highlight of the selected line, but no line numbers nor content. From the Java code we can prove that the whole content is there. Is just a visualisation issue.

Did somebody else experienced the same kind of bug?

Thank you,
Jaume.

Search functionality?

Hi David,

Is there something implemented to search a specific text in the textarea (and highlight the results)?

Cheers,
Jaume.

No horizontal Scrollbar

Hi,
my problem is that if I paste some text which is longer than the visible length, in the ace Editor, no horizontal scrollbar appears. If I type the characters the horizontal scrollbar is shown.

Creating workers

Hi Dave, do you know if there is any way to create workers? I'm trying to get syntax checking to work. Thanks!

No-conflict scripts

Hi Dave

Can you show an example using the "noconflict" versions of the script files? Are these files to be used at all?

Thanks.

No getSelectedText method

Hi,

I used an older version of the GWT integration and there was getSelectedText method returning the selection. Why this method was removed in the current version?

Thank you,
Mariusz

Install Problem

Hi Dave,

I imported AceGWT and AceGWT demo from github. The demo project runs fine. I'm attempting to use AceGWT in my project. I added AceGWT project to my project classpath in eclipse, added the inherits to my gwt.xml file, and added the scripts to my html file. I am getting the following error:

Exception while loading module com.Atlantic.AtlanticScheduler.client.WebGUI. See Development Mode for details.
java.lang.reflect.InvocationTargetException 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 com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Unknown Source) Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): a is null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at edu.ycp.cs.dh.acegwt.client.ace.AceEditor.startEditor(AceEditor.java) at com.Atlantic.AtlanticScheduler.client.ScriptEditor.ScriptEditorPane.(ScriptEditorPane.java:25) at com.Atlantic.AtlanticScheduler.client.WebGUI.generateApplicationTabs(WebGUI.java:284) at com.Atlantic.AtlanticScheduler.client.WebGUI.onModuleLoad(WebGUI.java:172) ... 9 more

Any suggestions?

Bug in AceRange or user error?

Hello,

I have been experimenting a bit with the AceRange object, and tried to create a AceRange object via a JSNI function:

var range = $entry(@edu.ycp.cs.dh.acegwt.client.ace.AceRange::create(IIII)(0, 0, 10, 100));

This throw the exception: "TypeError: $wnd.require is not a function"

I noticed that AceRange.java:47 has the following line:

 var Range = $wnd.require('ace/range').Range;

Should not that rather be this: ?

 var Range = $wnd.ace.require('ace/range').Range;

Doing the following in my on JNDI function appears to work:

var Range = $wnd.ace.require('ace/range').Range;
          var editor = this.@edu.ycp.cs.dh.acegwt.client.ace.AceEditor::editor;
          var range = new Range(n, n, n, n);
          editor.getSession().addMarker(range,"foo", "foo", true);

Or is it just a matter of user error on my behalf? :)

Licensing

Could you clarify the license of your project please.

Support for c, c++, c#, python and others

Hi there,

I've been using your module and I detected some issues whenever I selected this languages' mode for the editor. The error I get is, for example the c mode:

com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @edu.ycp.cs.dh.acegwt.client.ace.AceEditor::setModeByName(Ljava/lang/String;)([string: 'c_cpp']): $wnd.require(...) is undefined

After looking some time in the module files, I came to a solution by changing this, in edu.ycp.cs.dh.acegwt.client.ace.AceEditor:

public native void setModeByName(String shortModeName) /-{
var editor = [email protected]::editor;
var modeName = "ace/mode/" + shortModeName;
var TheMode = $wnd.require(modeName).Mode;
editor.getSession().setMode(new TheMode());
}-
/;

by:

public native void setModeByName(String shortModeName) /-{
var editor = [email protected]::editor;
var modeName = "ace/mode/" + shortModeName;
editor.getSession().setMode(modeName);
}-
/;

This change fixed my issue, but I want to know if this can lead to new issues... Is this a good solution?

AvoidOverlyPermissiveMessagePosting

Kiuwan report OPT.JAVASCRIPT.AvoidOverlyPermissiveMessagePosting in this the file worker-html.js at this line

        window.postMessage('process-tick', '*');

Committer MIT License Declaration

As "diorcety" recently pointed out, we have entered into a slightly ambigious licensing state for the project. Whilst the project has always been MIT license, some contributors have been able to add code without explicitly stating that their contributions would fit in with the license. As we all benefit from an open and engaged pool of committers, I propose using this issue for all committers to this project to declare that their contributions (to this project only) were made under the MIT license of this project. That is, all contributions are made under MIT license, and that their contributions fall under the following terms:

Past/Future committers - please reply to this thread with the text "I permit my contribution(s) to be released under the MIT license as shown in the original post in this thread."

[[
The MIT License (MIT)

Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

]]

AceEditor can not set SQL/MySQL/PgSQL mode

When I set editor mode as SQL/MySQL/PgSQL, seems that AceGWT can not find the mapping.The exception as follows. Is this a bug ?:

com.google.gwt.core.client.JavaScriptException: (TypeError) @edu.ycp.cs.dh.acegwt.client.ace.AceEditor::setModeByName(Ljava/lang/String;)([string: 'pgsql']): $wnd.ace.require(...) is undefined
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:315)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at edu.ycp.cs.dh.acegwt.client.ace.AceEditor.setModeByName(AceEditor.java)
at edu.ycp.cs.dh.acegwt.client.ace.AceEditor.setMode(AceEditor.java:154)
at edu.ycp.cs.dh.acegwt.client.demo.client.AceGWTDemo.onModuleLoad(AceGWTDemo.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:423)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:530)
at com.google.gwt.dev.shell.BrowserChannelS

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.