Php changing to php.html when opening in DW

I got some files from another designer and the home page is
index.php however, when I open it in dreamweaver, it changes the
name to index.php.html. It also changes, ie it's no longer
centered. I tried over and over to get it not to, but it keeps
doing it. It happens to every page but when I do another site i'm
fine.
thankyou

The filename changes when you OPEN the file? Which DW are you
using? Which
OS?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"webontwerpen" <[email protected]> wrote in
message
news:frbm4s$b6v$[email protected]..
>I got some files from another designer and the home page
is index.php
>however,
> when I open it in dreamweaver, it changes the name to
index.php.html. It
> also
> changes, ie it's no longer centered. I tried over and
over to get it not
> to,
> but it keeps doing it. It happens to every page but when
I do another site
> i'm
> fine.
>
> thankyou
>

Similar Messages

  • Can not change project properties (crashes when opening)

    I try to change the project properties when I go to open it livetype crashes

    I had this same problem... but only with one account. Another account on the same machine worked fine. So... I studied the crash report searching for the short user name of the crashing account and found one file that was unique to this user...
    /Users/<my user account>/Library/ColorPickers/RCWebColorPicker.colorPicker
    I deleted it and now Project Properties in LiveType works fine!
    There seems to be an update to this color picker:
    http://www.rubicode.com/Software/RCWebColorPicker/
    (They acknowledge a problem with Apple Pro apps and Leopard)
    Message was edited by: Roland G

  • IOS Mail changes .mhtml extension to .html when opening in another app

    Hey there guys,
    Just noticed this, this morning. Recently, our Backup server admin changed the report sent out by our Microsoft DPM server from PDF to MHTML output. (DPM could *never* format the PDF correctly and, surprise surprise, can format the MHTML output just fine).
    Anyways, I purchased an MHTML viewer from the Mac App Store for OSX - all fine. I purchased the iOS version of the same developers viewer this morning and tried to open the mail attachment into that app. Oddly, it just showed as text - just like it does inside the iOS Mail app itself.
    It was then that I noticed that the attachment extension was .html not .mhtml - yet the file attached to the email is definetely showing as .mhtml.
    I tried a wee experiment and opened the attachment into Dropbox instead - sure enough, the extension was changed to .html again.
    I then forwarded that message out to my gmail using the Mailbox app and opened the attachment into the MHTML viewer from there - perfect! Because it didn't change the extension as it passed the attachment to the opening app.
    So, I have what obviously is a bug in the iOS Mail app - I just want to report it to Apple so it can be fixed. I can't find anywhere to log this bug without having to pay money for a support incident.
    Knowing that Apple frequent these Communities (I have been contacted by them in the past following posts I've made here), I thought this might be the best course of action.  Or, if I am wrong, someone would let me know!  (Either about the bug, or how to report it)... ;-)
    Thanks!
    William

    Apple doesn't officially monitor these forums.  If you want to talk to Apple directly, then go to https://getsupport.apple.com or http://www.apple.com/feedback/

  • Changing the background color when opening an image?

    I just installed Firefox on my new Windows laptop, and when I open an image in a new tab the background around the image is a dark gray. On my old computer the background is white, which I much prefer. How do I change this setting?

    It is a new feature in Firefox 11+ versions to display a single image centered with an almost black background.
    It is added by this stylesheet:
    * resource://gre/res/TopLevelImageDocument.css
    You can look at this extension to set your preferred background color and remove the centering.
    * Old Default Image Style: https://addons.mozilla.org/firefox/addon/old-default-image-style/
    See also these forum threads for other solutions (e.g. userContent.css):
    *[[/questions/923127]]
    *[[/questions/923431]]

  • How do I stop files changing my units preferences when opening in illustrator

    When I open files in illustrator that have been sent to me they sometimes open with the measurement units changed from "mm" to "cm" or even "in", not a huge problem but when I have 10 files for a job that are all doing the same its an extra bit of messing around I could do without.
    They can be any kind of file .ai .eps .fs .pdf etc..., when I go into my preference to change it back it shows that it is set to "mm" already?????. I can change it to "mm" again but I have to go Edit - preferences - Units - change them to read "cm" - OK, then repeat the process Edit - Preferences - Units - change back to read "mm" and that does it.

    You are welcome, maxwells3.
    When you have the time (and courage), you may have a go with some of the suggestions in the list below.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • View of PDF file changes or looks strange when opening a file.

    Hi all,
    I have strange problem, that is haunting me.
    A PDF file is created from Microsoft Dynamics AX 2009 system. I guess that Microsoft have their own pdf-writer-engine.
    From time to time, we have seen that the PDF files, on some computers looks correct, on others gibberish.
    One user has a Win7 machine, 32-bit system. 4gb of memory. Today he opened a PDF file from the AX system. When He opened the file on his desktop., it looked fine. After 5 seconds. The entire view changed to strange signs and letters. I opened the same file on a Win-7, 64 bit machine. Everything looks allrigt.  Both of us have Adobe Reader 11.04 installed. one-two houes after the first error, he opened another PDF file. That started to look like gibberish, and after 5 seconds it looked allright.
    In general we only see these types of errors something like 1 out of a hundred times. Most common is that the view is gibberish from the beginning, and never changes.
    Any idea to solve this, will be much appriciated
    /Hector

    I think this is done by the browser when it is saving a temporary file and there's already a file with that exact name in the temp folder.

  • Accordion - change of focus/viewport when opening tab

    Hi,
    Developing a page that uses the spry accordion 1.5.
    I have several long accordion tabs, say 6 tabs, and each tab
    contains 5-10 paragraphs of information.
    My issue is that on opening any tab (other than the first,)
    the previous tab closes, and as the new tab opens, the focus of the
    viewport moves to somewhere in the middle of the newly opened tab,
    (where as I would prefer that the start of the newly opened tab not
    to move off the screen, so it can be more easily read, without
    scrolling back up)
    an example of what i am talking about is at -
    http://batemansbayosteopathy.com.au/testsite/osteopathy.php#osteoand
    also i cant seem to get rid of some of the scroll bars on the
    RHS of several tabs.
    Thanks!

    As for your first issue...
    You don't have to use a fixed panel size.
    The problem is with IE as stated elsewhere in this forum.
    You should desactivate de keyboard preset in the
    SpryAccordion.js script
    Like this: "this.enableKeyboardNavigation = false"
    I don't understand why this is set to "true" by default if it
    does not work in IE.

  • Colour picker automatically changing to different colour when opening

    I think I've only been having this problem since switching to CC 2014, but I can't be sure exactly when it started.
    When I open the colour picker to change a colour of an object, the colour automatically jumps to a different colour. It's very disruptive because I have no way of telling what the original colour was when trying to make small changes. And it's not a small jump either: for example, the default black jumps automatically to C60M90 purple – every time! It doesn't only occur with the default colour but also after I've selected a shade myself –  it seems to only be happening with blacks and greys.
    Any help would be appreciated, as it's driving me crazy. I've tried activating and deactivating the "Art work has default appearance" option as it was the only thing I could think of and have had problems with that acting strangely before. I can't think of what else I should try. If no one knows, I'll try trashing the preferences folder.
    Thanks in advance. Cheers.

    Sounds like a 2014 problem.
    Check that you are woking in the correct color mode, look to the right of your filename in parenthesis. Then use the color palette (always in the same color mode) and let us know if that is working.
    If not try to reset your illustrator preferences.

  • I get an error while changing modules pop up when opening Lr. There is no import button to use and if I try to load the default catalog I get the error message again essentially making Lr completely unusable for me! please help

    When launching Lr i get the initial screen to come up followed by an "error while changing modules" pop up. I have uninstalled and re-downloaded, followed all the suggested trouble shooting fixes and still nothing. When the app starts it has the basic info boxes but without any options in them (i.e. no import button or any buttons at all for that matter).All my other creative cloud apps seem to be working fine but Lr won't. Please help

    Ah, see, you said you had done it differently before.
    > and I tried to add a toolbox button by navigating to AcroPDF.dll.
    You'll need to reinstall Reader if the libraries aren't registered. You can't register them manually.
    Perhaps if you posted some of your code (where it creates the objects, etc.) we might be able to give you some more advice. You're sure you aren't trying to use anything outside of the AxAcroPDFLib.AxAcroPDF class?

  • Change properties to refresh when opening new workbook

    Hi All,
    I am trying to change the properties of queries and saved the workbook, when i am tranport those changes into QA environment it was not reflecting the changes in QA.
    Please help me on this issue, this is an urgent.
    Thanks in adwance....
    Babu.

    Hi
    You have to check two areas
    1. Have you chekcked bex refresh checked in the workbook properties
    Right click on workbook result ->properties -> Interaction -> 3rd option
    Refresh workbook when query is changed
    2. During transport, you have to transport the workbook ..have you did that?
    Regards
    N Ganesh

  • U-verse App on iPad changes channels on TV when opened

    When you open the App it will cause the TV to cycle through all of the channels that you previously visited using the App.

    Same issue here. On wake flips through a ton of channels

  • How do I change my default settings when opening an email PDF attachment?  I want it to "open" not "save as".  I did the Adobe chat but the steps he gave me for my Adobe Reader XI didn't match up with the options on my screen.

    It used to "open" but somehow must have flipped over to "save as"

    Hi Susan,
    Welcome to forums.
    As you mentioned that you received an email from Adobe. That is a auto generated email by the systems, so you don't need to worry about it, If you download the product today, according to system it starts from today however pratically, trial starts after you installed and first launch it. So please ignore that email
    You can install the FM in your desktop and laptop and activate it on both the machines however cannot use it at the same time as per User License Agreement. As Harpeet mentioned the email for support team, you can post your question on forums or to that email.
    Hope this answers your query.
    Thanks
    Priyank

  • How do I change between iPhoto Libraries when I am importing pics to another website?

    When I import pics to my website I click on Import photos and the standard apple screen (Firefox Edit  in menu bar) comes up so I click on Pictures, then iPhoto, then Events and choose the individual photos, but  only the one library shows there.  I do know how to change between the libraries when opening the iphoto library by using the options tab, but that does not work in this instance?
    ilife 11, OSX 10.6.8.

    Correct - that is not how you access your photos
    You use the media browser in the lower left hand corner of the upload window under media ==> photos ==> iPhoto
    See this user tip for complete details on accessing your photos correctly
    LN

  • Firefox keeps asking me to open/download PHP file when it used to be able to display properly.

    I use to be able to view local PHP files normally in Firefox with the PHP parts not rendered while the HTML parts are. Now all it does is ask whether I want to open or save it.
    I've tried editing FF options so that it previews in FF but it doesn't accept any changes. I've cleared my cache and all that. I've tried deleting the mimeTypes.rdf file thing but I can't even find the folder it's in. I've tried disabling/enabling "prompts.tab_modal.enabled" in about:config and restarting FF.
    All are no-go solutions.
    Web PHP pages are loading properly, this problem only comes when I'm trying to load local PHP files. I don't want to install XAMPP or PHP on my computer just to view local files as I never had this problem before.
    In the meantime, I've installed Chrome and it's loading a simple local PHP file just fine whereas FF is asking me to save/download when opening the SAME file. Thanks in advance for any help.

    Yup, deleting mimeTypes.rdf and re-starting did the trick this time. Thanks very much!
    Also, on a somewhat related note, I cannot view mozillazine.org and any sub-domains under it in any browsers. This may be happening to other users as well?
    It's always stuck at "Waiting for ..." or "Connecting to ..." and that's it. Then FF gives up with a "Server connection time-out" notice. Clearing cache and all that doesn't work because I was trying to view those pages before starting this topic.

  • Creating a PHP/HTML Editor

    I'm doing a school project on a PHP/HTML Editor.
    I'm looking for some help on finding a good tutorial on changing properties to a JEditorPane. I want to set up the indent size, colors for tags, comments, statements, etc...
    anyone help??

    Here, I stole this code from the advanced forum on Saturday and tried to develop it, though gave up when I couldn't get setTabs or load file to work and tooltips was too damn slow.
    I had an idea that I could use it to run javac and to execute Frames and Applets with it ... right now I'm reconfiguring the design and thinking about dropping the highlighter altogether, but thats my story. Still it may be useful /may give you ideas /may be just the base or platform you're looking for.import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.io.*;
    class Highlighter extends DefaultStyledDocument{
         private DefaultStyledDocument doc;
         private Element rootElement;
         private boolean multiLineComment;
         private MutableAttributeSet normal;
         private MutableAttributeSet keyword;
         private MutableAttributeSet comment;
         private MutableAttributeSet quote;
         private MutableAttributeSet tabSpace;
         private Hashtable keywords;
    public Highlighter(){
           doc = this;
         rootElement = doc.getDefaultRootElement();
         putProperty(DefaultEditorKit.EndOfLineStringProperty, "\n" );
         normal = new SimpleAttributeSet();
         StyleConstants.setForeground(normal, Color.black);
         comment = new SimpleAttributeSet();
         StyleConstants.setForeground(comment, Color.green);
         StyleConstants.setItalic(comment, true);
         keyword = new SimpleAttributeSet();
         StyleConstants.setForeground(keyword, Color.blue);
         quote = new SimpleAttributeSet();
         StyleConstants.setForeground(quote, Color.red);
         Object dummyObject = new Object();
         keywords = new Hashtable();
         keywords.put( "abstract", dummyObject );
         keywords.put( "boolean", dummyObject );
         keywords.put( "break", dummyObject );
         keywords.put( "byte", dummyObject );
         keywords.put( "byvalue", dummyObject );
         keywords.put( "case", dummyObject );
         keywords.put( "cast", dummyObject );
         keywords.put( "catch", dummyObject );
         keywords.put( "char", dummyObject );
         keywords.put( "class", dummyObject );
         keywords.put( "continue", dummyObject );
         keywords.put( "default", dummyObject );
         keywords.put( "do", dummyObject );
         keywords.put( "double", dummyObject );
         keywords.put( "else", dummyObject );
         keywords.put( "extends", dummyObject );
         keywords.put( "false", dummyObject );
         keywords.put( "final", dummyObject );
         keywords.put( "finally", dummyObject );
         keywords.put( "float", dummyObject );
         keywords.put( "for", dummyObject );
         keywords.put( "if", dummyObject );
         keywords.put( "implements", dummyObject );
         keywords.put( "import", dummyObject );
         keywords.put( "instanceof", dummyObject );
         keywords.put( "int", dummyObject );
         keywords.put( "interface", dummyObject );
         keywords.put( "long", dummyObject );
         keywords.put( "new", dummyObject );
         keywords.put( "null", dummyObject );
         keywords.put( "package", dummyObject );
         keywords.put( "private", dummyObject );
         keywords.put( "protected", dummyObject );
         keywords.put( "public", dummyObject );
         keywords.put( "return", dummyObject );
         keywords.put( "short", dummyObject );
         keywords.put( "static", dummyObject );
         keywords.put( "super", dummyObject );
         keywords.put( "switch", dummyObject );
         keywords.put( "synchronized", dummyObject );
         keywords.put( "this", dummyObject );
         keywords.put( "throw", dummyObject );
         keywords.put( "throws", dummyObject );
         keywords.put( "transient", dummyObject );
         keywords.put( "true", dummyObject );
         keywords.put( "try", dummyObject );
         keywords.put( "void", dummyObject );
         keywords.put( "volatile", dummyObject );
         keywords.put( "while", dummyObject );
    * Override to apply syntax highlighting after the document has been updated
       public void insertString(int offset, String str, AttributeSet a)
                                            throws BadLocationException{
              if (str.equals("{"))
              str = addMatchingBrace(offset);
              super.insertString(offset, str, a);
              processChangedLines(offset, str.length());
    * Override to apply syntax highlighting after the document has been updated
       public void remove(int offset, int length) throws BadLocationException{
              super.remove(offset, length);
              processChangedLines(offset, 0);
    * Determine how many lines have been changed,
    * then apply highlighting to each line
       private void processChangedLines(int offset, int length)
                                    throws BadLocationException {
              String content = doc.getText(0, doc.getLength());
              // The lines affected by the latest document update
              int startLine = rootElement.getElementIndex( offset );
              int endLine = rootElement.getElementIndex( offset + length );
              // Make sure all comment lines prior to the start line are commented
              // and determine if the start line is still in a multi line comment
              setMultiLineComment( commentLinesBefore( content, startLine ) );
              // Do the actual highlighting
                   for (int i = startLine; i <= endLine; i++){
                        applyHighlighting(content, i);
          // Resolve highlighting to the next end multi line delimiter
              if (isMultiLineComment())commentLinesAfter(content, endLine);
              else highlightLinesAfter(content, endLine);
    * Highlight lines when a multi line comment is still 'open'
    * (ie. matching end delimiter has not yet been encountered)
         private boolean commentLinesBefore(String content, int line){
              int offset = rootElement.getElement( line ).getStartOffset();
              // Start of comment not found, nothing to do
              int startDelimiter = lastIndexOf( content, getStartDelimiter(), offset-2);
              if (startDelimiter < 0)return false;
              // Matching start/end of comment found, nothing to do
              int endDelimiter = indexOf( content, getEndDelimiter(), startDelimiter );
              if (endDelimiter < offset & endDelimiter != -1)return false;
              // End of comment not found, highlight the lines
              doc.setCharacterAttributes(startDelimiter, offset - startDelimiter + 1, comment, false);
              return true;
    * Highlight comment lines to matching end delimiter
         private void commentLinesAfter(String content, int line){
              int offset = rootElement.getElement( line ).getEndOffset();
              // End of comment not found, nothing to do
              int endDelimiter = indexOf( content, getEndDelimiter(), offset );
              if (endDelimiter < 0) return;
              // Matching start/end of comment found, comment the lines
              int startDelimiter = lastIndexOf( content, getStartDelimiter(), endDelimiter );
                   if (startDelimiter < 0 || startDelimiter <= offset){
                        doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
    * Highlight lines to start or end delimiter
         private void highlightLinesAfter(String content, int line)
                                                                throws BadLocationException{
              int offset = rootElement.getElement( line ).getEndOffset();
              // Start/End delimiter not found, nothing to do
              int startDelimiter = indexOf( content, getStartDelimiter(), offset );
              int endDelimiter = indexOf( content, getEndDelimiter(), offset );
              if (startDelimiter < 0)     startDelimiter = content.length();
              if (endDelimiter < 0)endDelimiter = content.length();
              int delimiter = Math.min(startDelimiter, endDelimiter);
              if (delimiter < offset)return;
              // Start/End delimiter found, reapply highlighting
              int endLine = rootElement.getElementIndex( delimiter );
                   for (int i = line + 1; i < endLine; i++){
                        Element branch = rootElement.getElement( i );
                        Element leaf = doc.getCharacterElement( branch.getStartOffset() );
                        AttributeSet as = leaf.getAttributes();
                        if ( as.isEqual(comment) )applyHighlighting(content, i);
    * Parse the line to determine the appropriate highlighting
         private void applyHighlighting(String content, int line)
                                                             throws BadLocationException{
              int startOffset = rootElement.getElement( line ).getStartOffset();
              int endOffset = rootElement.getElement( line ).getEndOffset() - 1;
              int lineLength = endOffset - startOffset;
              int contentLength = content.length();
                   if (endOffset >= contentLength)endOffset = contentLength - 1;
              // check for multi line comments
              // (always set the comment attribute for the entire line)
                 if (endingMultiLineComment(content, startOffset, endOffset)
                ||isMultiLineComment()||startingMultiLineComment(content, startOffset, endOffset)){
                         doc.setCharacterAttributes(startOffset, endOffset - startOffset + 1, comment, false);
                         return;
              // set normal attributes for the line
              doc.setCharacterAttributes(startOffset, lineLength, normal, true);
              // check for single line comment
              int index = content.indexOf(getSingleLineDelimiter(), startOffset);
                   if ( (index > -1) && (index < endOffset) ){
                        doc.setCharacterAttributes(index, endOffset - index + 1, comment, false);
                        endOffset = index - 1;
              // check for tokens
              checkForTokens(content, startOffset, endOffset);
    * Does this line contain the start delimiter
         private boolean startingMultiLineComment(String content, int startOffset, int endOffset)
                                                                                                              throws BadLocationException{
              int index = indexOf( content, getStartDelimiter(), startOffset );
                   if ( (index < 0) || (index > endOffset) )return false;
                   else{
                        setMultiLineComment( true );
                        return true;
    * Does this line contain the end delimiter
         private boolean endingMultiLineComment(String content, int startOffset, int endOffset)
                                                                                                             throws BadLocationException{
              int index = indexOf( content, getEndDelimiter(), startOffset );
                   if ( (index < 0) || (index > endOffset) )return false;
                   else{
                        setMultiLineComment( false );
                        return true;
    * We have found a start delimiter
    * and are still searching for the end delimiter
         private boolean isMultiLineComment(){
              return multiLineComment;
         private void setMultiLineComment(boolean value){
              multiLineComment = value;
    * Parse the line for tokens to highlight
         private void checkForTokens(String content, int startOffset, int endOffset){
              while (startOffset <= endOffset){
              // skip the delimiters to find the start of a new token
                   while (isDelimiter(content.substring(startOffset, startOffset+1))){
                        if (startOffset < endOffset)startOffset++;
                        else return;
              // Extract and process the entire token
              if (isQuoteDelimiter( content.substring(startOffset, startOffset + 1)))
                   startOffset = getQuoteToken(content, startOffset, endOffset);
              else startOffset = getOtherToken(content, startOffset, endOffset);
         private int getQuoteToken(String content, int startOffset, int endOffset){
              String quoteDelimiter = content.substring(startOffset, startOffset + 1);
              String escapeString = getEscapeString(quoteDelimiter);
              int index;
              int endOfQuote = startOffset;
              // skip over the escape quotes in this quote
              index = content.indexOf(escapeString, endOfQuote + 1);
                   while ( (index > -1) && (index < endOffset) ){
                        endOfQuote = index + 1;
                        index = content.indexOf(escapeString, endOfQuote);
              // now find the matching delimiter
              index = content.indexOf(quoteDelimiter, endOfQuote + 1);
                   if ( (index < 0) || (index > endOffset) )endOfQuote = endOffset;
                   else endOfQuote = index;
              doc.setCharacterAttributes(startOffset, endOfQuote-startOffset+1, quote, false);
         return endOfQuote + 1;
         private int getOtherToken(String content, int startOffset, int endOffset){
              int endOfToken = startOffset + 1;
              while (endOfToken <= endOffset ){
                   if (isDelimiter(content.substring(endOfToken, endOfToken+1)))break;
                   endOfToken++;
              String token = content.substring(startOffset, endOfToken);
                   if ( isKeyword( token ) )
                        doc.setCharacterAttributes(startOffset, endOfToken-startOffset, keyword, false);
              return endOfToken + 1;
    * Assume the needle will the found at the start/end of the line
         private int indexOf(String content, String needle, int offset){
              int index;
                   while ( (index = content.indexOf(needle, offset)) != -1 ){
                        String text = getLine( content, index ).trim();
                             if (text.startsWith(needle) || text.endsWith(needle))break;
                             else offset = index + 1;
              return index;
    * Assume the needle will the found at the start/end of the line
         private int lastIndexOf(String content, String needle, int offset){
              int index;
              while ( (index = content.lastIndexOf(needle, offset)) != -1 ){
                   String text = getLine( content, index ).trim();
                        if (text.startsWith(needle) || text.endsWith(needle))break;
                        else offset = index - 1;
              return index;
         private String getLine(String content, int offset){
              int line = rootElement.getElementIndex( offset );
              Element lineElement = rootElement.getElement( line );
              int start = lineElement.getStartOffset();
              int end = lineElement.getEndOffset();
              return content.substring(start, end - 1);
    * Override for other languages
         protected boolean isDelimiter(String character){
              String operands = ";:{}()[]+-/%<=>!&|^~*";
                   if (Character.isWhitespace( character.charAt(0) ) ||
                                            operands.indexOf(character)!= -1 ) return true;
                   else return false;
    * Override for other languages
         protected boolean isQuoteDelimiter(String character){
              String quoteDelimiters = "\"'";
                   if (quoteDelimiters.indexOf(character) < 0) return false;
                   else return true;
    * Override for other languages
         protected boolean isKeyword(String token){
              Object o = keywords.get( token );
              return o == null ? false : true;
    * Override for other languages
         protected String getStartDelimiter(){
              return "/*";
    * Override for other languages
         protected String getEndDelimiter(){
              return "*/";
    * Override for other languages
         protected String getSingleLineDelimiter(){
              return "//";
    * Override for other languages
         protected String getEscapeString(String quoteDelimiter){
              return "\\" + quoteDelimiter;
         protected String addMatchingBrace(int offset) throws BadLocationException{
              StringBuffer whiteSpace = new StringBuffer();
              int line = rootElement.getElementIndex( offset );
              int i = rootElement.getElement(line).getStartOffset();
                   while (true){
                        String temp = doc.getText(i, 1);
                             if (temp.equals(" ") || temp.equals("\t")){
                                  whiteSpace.append(temp);
                                i++;
                             else break;
              return "{\n" + whiteSpace.toString() + "\t\n" + whiteSpace.toString() + "}";
    public class MyJavac extends JFrame implements ActionListener{
       JPanel top, main;
         JEditorPane edit = new JEditorPane();
       Highlighter syntax = new Highlighter();
       JButton []buts = new JButton[7];
       String theText="";
    public MyJavac(){
       super("Java Based Text Editor");
       getContentPane().setLayout(new BorderLayout() );
       String []str = {"New","Open","Save","Save As","Compile","J/Frame","Applet"};
       String []tooltips = {"<html><center>Open a new <br>java file</center></html>",
                            "<html><center>Open an existing<br>java file</center></html>",
                            "<html><center>Save java<br>file</center></html>",
                            "<html><center>Save java file<br>with new filename</center></html>",
                            "<html><center>Run the javac<br>DOS compiler</center></html>",
                            "<html><center>Run java JFrame<br>or Frame application</center></html>",
                            "<html><center>Run java Applet<br>html application</center></html>"};
       top = new JPanel();
       top.setLayout(new GridLayout(1,7,5,0) );
       JPanel east = new JPanel();
       JPanel west = new JPanel();
          for(int i=0; i<buts.length; i++){
             buts[i] = new JButton(str);
    buts[i].setToolTipText(tooltips[i]);
    buts[i].addActionListener(this);
    top.add(buts[i]);
    main = new JPanel();
    main.setLayout(new GridLayout(1,1) );
         edit.setEditorKit(new StyledEditorKit());
         edit.setDocument(syntax);
         JScrollPane scroll=new JScrollPane(edit);
    main.add(scroll);
    getContentPane().add("North",top);
    getContentPane().add("Center",main);
    public void actionPerformed(ActionEvent e){
    String option = e.getActionCommand();
    if(option.equals("New")){}
    if(option.equals("Open")) {
    JFileChooser chooser = new JFileChooser();
    int returnVal = chooser.showOpenDialog(this);
    if(returnVal == JFileChooser.APPROVE_OPTION);
    try {
    getFromFile();
    catch(Exception f){
    String error1= "Error opening the file ";
    String error2 = "or the file was not found";
    JOptionPane.showMessageDialog(null, error1 +"\n" + error2);
    edit.setText(theText);
    public void getFromFile() throws Exception{
    int reader = 0;
    theText = "";
    FileReader in = new FileReader("junk.txt");
    do {
    reader = in.read();
    theText += (char)reader;
    } while (reader != -1);
    in.close();
    public static void main(String args[]){
    MyJavac jav = new MyJavac();
         Image onFrame = Toolkit.getDefaultToolkit().getImage("flag.gif") ;
    jav.setIconImage(onFrame);
         jav.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         jav.setSize(600,400);
         jav.setVisible(true);

Maybe you are looking for

  • My Windows (version 7 Pro, 64-bit) Media player will not play any of my stored music.

    IT JUST STARTED PLAYING AGAIN...ONE OTHER REASON I HATE WINDOWS 7!!!!!!  It is up-to-date (ver 12) and when I test the speakers, I get the test sounds OK but, when I try to play any of my stored music (and I have vocals and instrumentals) no sound is

  • Can't drag files from Dock download icon

    Up until recently, I could open my download dock icon and drag any file I had downloaded there to the desktop. After the last Mavericks update I can't do this, whether I right-click or left-click any file in the fan (or stack, grid, etc.) is highligh

  • During an application build I received an error 7 for a missing source NI vi 1d linear evaluation.vi

    During an application build, I got "Error 7 occurred at c:\Program Files\National Instruments\LabVIEW 6\vi.lib\Analysis\8numerc.llb\1D Linear Evaluation.vi - source does not exist". This existed in Labview 5.1.1. Was it deleted in 6.0?

  • HELP ME! Embedding Graphics in Reports.

    I am trying to embed an Oracle Graph (from Graphics) in a report, but when I try to run the report I get a REP-0075 error followed by an OG-01603 "Unable to create PL/SQL Development Environment Context" Error. Then when I click OK, I get another err

  • New dimension created not coming in workbench

    Hi All, I had created a new dimension last week, but I am not able to see the same coming up in "Dimension Ordering" in Endeca Workbench even after running workbench. I can see the same in Endeca JSPref application. This is the first time we are not