~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to rpm/org.eclipse.linuxtools.rpm.rpmlint/src/org/eclipse/linuxtools/internal/rpm/rpmlint/resolutions/MacroInChangelog.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2008 Alexander Kurtakov.
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 *
 
8
 * Contributors:
 
9
 *    Alexander Kurtakov - initial API and implementation
 
10
 *******************************************************************************/
 
11
package org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions;
 
12
 
 
13
/**
 
14
 * Resolution for "macro-in-%changelog" warning. 
 
15
 * The resolution is to escape the macro.
 
16
 *
 
17
 */
 
18
public class MacroInChangelog extends AReplaceTextResolution {
 
19
 
 
20
        /**
 
21
         * The string ID of the rpmlint warning.
 
22
         */
 
23
        public static final String ID = "macro-in-%changelog"; //$NON-NLS-1$
 
24
 
 
25
        /**
 
26
         * @see org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions.AReplaceTextResolution#getOriginalString()
 
27
         */
 
28
        @Override
 
29
        public String getOriginalString() {
 
30
                return "%"; //$NON-NLS-1$
 
31
        }
 
32
 
 
33
        /**
 
34
         * @see org.eclipse.linuxtools.internal.rpm.rpmlint.resolutions.AReplaceTextResolution#getReplaceString()
 
35
         */
 
36
        @Override
 
37
        public String getReplaceString() {
 
38
                return "%%"; //$NON-NLS-1$
 
39
        }
 
40
 
 
41
        /**
 
42
         * @see org.eclipse.ui.IMarkerResolution2#getDescription()
 
43
         */
 
44
        public String getDescription() {
 
45
                return Messages.MacroInChangelog_0
 
46
                                + Messages.MacroInChangelog_1;
 
47
        }
 
48
 
 
49
        /**
 
50
         * @see org.eclipse.ui.IMarkerResolution#getLabel()
 
51
         */
 
52
        public String getLabel() {
 
53
                return ID;
 
54
        }
 
55
}