Changeset 10995


Ignore:
Timestamp:
02/18/06 17:36:30 (15 years ago)
Author:
piso
Message:

Indentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/CppMode.java

    r10975 r10995  
    33 *
    44 * Copyright (C) 1998-2006 Peter Graves
    5  * $Id: CppMode.java,v 1.3 2006-01-31 10:06:23 piso Exp $
     5 * $Id: CppMode.java,v 1.4 2006-02-18 17:36:30 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9595        if (trim.equals("public:") || trim.equals("private:") || trim.equals("protected:"))
    9696            return 0;
    97         if (trim.startsWith(": ") || trim.startsWith(":\t"))
    98             return 2; // start of member initialization list
     97        Line model = findModel(line);
     98        if (model == null)
     99            return 0;
     100        if (trim.startsWith(": ") || trim.startsWith(":\t")) {
     101            // start of member initialization list
     102            return model.getIndentation() + 2;
     103        }
    99104        if (trim.startsWith("{")) {
    100             Line model = findModel(line);
    101             if (model == null)
    102                 return 0;
    103105            String modelTrim = model.trim();
    104106            if (modelTrim.startsWith(": ") || modelTrim.startsWith(":\t"))
Note: See TracChangeset for help on using the changeset viewer.