Giter Club home page Giter Club logo

ph-7 / simple-java-text-editor Goto Github PK

View Code? Open in Web Editor NEW
171.0 22.0 108.0 768 KB

:memo: PHNotepad is a simple Java text/code editor (notepad) written in Java. It has also nice features such as Search tool, Find/Replace text/code, Auto-completion, Nice Image Buttons for better UX, etc.

Home Page: https://ph-7.github.io/Simple-Java-Text-Editor/

License: Apache License 2.0

Java 100.00%
java notepad simple-java-ide java-text-editor text-editor teaching learning-java java-text editor java-note

simple-java-text-editor's People

Contributors

achinthagunasekara avatar ajmeese7 avatar akashdeepsingh9988 avatar frangametv avatar gpasents avatar jdevfullstack avatar marcusjrc avatar matthew22877288287 avatar ossilaukkanen avatar patrick-slagle avatar ph-7 avatar sidadan avatar tt-talhatariq 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  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

simple-java-text-editor's Issues

keywords highlighting

AutoComplete is awesome!

But I wonder how to implement the highlighting effect for the SupportKeywords?

Can you add this effect?

Embedding The Editor

How difficult would it be to embed this editor in a java beans application supporting story authoring?

Any way to use word wrap?

Nice little notepad!

Cannot seem to figure out way to use "word wrap" or get scroll-bars to appear. Any ideas on solution?

Thanks!

Autocomplete when open file and Editor title

When opening a file (.java, .cpp), autocomplete doesn't work and the title of the editor doesn't change.

For the editor NAME the line behind could be added in the open actionlistener or a method could be created to avoid duplicate source code.

setTitle(file.getName() + " | " + SimpleJavaTextEditor.NAME);

For autocomplete option, line 434 to 468 could be added in the open actionlistener. Once again a method could be created to avoid duplicate source code.

I will propose a merge request if i find time to make these modifications

Best regards,

Emmanuel.

unable to merge or commit

I added new font features to the text editor, but i am unable to merge files or adding pull request

#Bug, No check on open file option to save changes

Hi,
First of all, I really appreciate your work towards open source community.
I really wants to contribute in this project So, I started to test Text-editor and found some bug that there is no check on open file option to save changes if there is text in notepad.
can you please merge my pull request or add fallowing lines of code in your UI.java class for open file option.
// If the source was the "open" option
else if (e.getSource() == openFile || e.getSource() == openButton) {

    	  if (edit) {
              Object[] options = {"Save", "No Save", "Return"};
              int n = JOptionPane.showOptionDialog(this, "Do you want to save changes ?", "Question",
                      JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[2]);
              if (n == 0) {// save
                  saveFile();
                  edit = false;
              } else if (n == 1) {
                  edit = false;
                 openFile();
              }  
    		  
    	  }
    	 else{
       openFile();
    }
    }

private void openFile(){
JFileChooser open = new JFileChooser(); // open up a file chooser (a dialog for the user to browse files to open)
int option = open.showOpenDialog(this); // get the option that the user selected (approve or cancel)

     /*
      * NOTE: because we are OPENing a file, we call showOpenDialog~ if
      * the user clicked OK, we have "APPROVE_OPTION" so we want to open
      * the file
      */
     if (option == JFileChooser.APPROVE_OPTION) {
         FEdit.clear(textArea); // clear the TextArea before applying the file contents
         try {
             File openFile = open.getSelectedFile();
             setTitle(openFile.getName() + " | " + SimpleJavaTextEditor.NAME);
             Scanner scan = new Scanner(new FileReader(openFile.getPath()));
             while (scan.hasNext()) {
                 textArea.append(scan.nextLine() + "\n");
             }

             enableAutoComplete(openFile);
         } catch (Exception ex) { // catch any exceptions, and...
             // ...write to the debug console
             System.err.println(ex.getMessage());
         }
     }
}

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.