Преглед изворни кода

Change some FrameContainers to WindowModels.

pull/532/head
Chris Smith пре 9 година
родитељ
комит
c357e80ba7

+ 2
- 2
src/com/dmdirc/commandparser/commands/ExternalCommand.java Прегледај датотеку

@@ -22,9 +22,9 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
-import com.dmdirc.FrameContainer;
26 25
 import com.dmdirc.commandparser.CommandArguments;
27 26
 import com.dmdirc.interfaces.Connection;
27
+import com.dmdirc.interfaces.WindowModel;
28 28
 
29 29
 /**
30 30
  * An external command is a channel command that can be executed from outside of the channel.
@@ -40,7 +40,7 @@ public interface ExternalCommand {
40 40
      * @param isSilent Whether this command is silenced or not
41 41
      * @param args     Arguments passed to this command
42 42
      */
43
-    void execute(FrameContainer origin, Connection connection, String channel,
43
+    void execute(WindowModel origin, Connection connection, String channel,
44 44
             boolean isSilent, CommandArguments args);
45 45
 
46 46
 }

+ 4
- 4
src/com/dmdirc/commandparser/commands/IntelligentCommand.java Прегледај датотеку

@@ -22,7 +22,7 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands;
24 24
 
25
-import com.dmdirc.FrameContainer;
25
+import com.dmdirc.interfaces.WindowModel;
26 26
 import com.dmdirc.ui.input.AdditionalTabTargets;
27 27
 
28 28
 import java.util.List;
@@ -54,20 +54,20 @@ public interface IntelligentCommand {
54 54
     class IntelligentCommandContext {
55 55
 
56 56
         /** The window the command is being entered in. */
57
-        private final FrameContainer window;
57
+        private final WindowModel window;
58 58
         /** The previously supplied arguments, if any. */
59 59
         private final List<String> previousArgs;
60 60
         /** The partially typed word, if any. */
61 61
         private final String partial;
62 62
 
63
-        public IntelligentCommandContext(final FrameContainer window,
63
+        public IntelligentCommandContext(final WindowModel window,
64 64
                 final List<String> previousArgs, final String partial) {
65 65
             this.window = window;
66 66
             this.previousArgs = previousArgs;
67 67
             this.partial = partial;
68 68
         }
69 69
 
70
-        public FrameContainer getWindow() {
70
+        public WindowModel getWindow() {
71 71
             return window;
72 72
         }
73 73
 

+ 1
- 2
src/com/dmdirc/commandparser/commands/channel/Invite.java Прегледај датотеку

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25
-import com.dmdirc.FrameContainer;
26 25
 import com.dmdirc.commandparser.BaseCommandInfo;
27 26
 import com.dmdirc.commandparser.CommandArguments;
28 27
 import com.dmdirc.commandparser.CommandInfo;
@@ -77,7 +76,7 @@ public class Invite extends Command implements ExternalCommand {
77 76
     }
78 77
 
79 78
     @Override
80
-    public void execute(final FrameContainer origin, final Connection connection,
79
+    public void execute(final WindowModel origin, final Connection connection,
81 80
             final String channel, final boolean isSilent, final CommandArguments args) {
82 81
         if (args.getArguments().length < 1) {
83 82
             sendLine(origin, isSilent, FORMAT_ERROR,

+ 1
- 2
src/com/dmdirc/commandparser/commands/channel/Mode.java Прегледај датотеку

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25
-import com.dmdirc.FrameContainer;
26 25
 import com.dmdirc.commandparser.BaseCommandInfo;
27 26
 import com.dmdirc.commandparser.CommandArguments;
28 27
 import com.dmdirc.commandparser.CommandInfo;
@@ -79,7 +78,7 @@ public class Mode extends Command implements IntelligentCommand,
79 78
     }
80 79
 
81 80
     @Override
82
-    public void execute(final FrameContainer origin, final Connection connection,
81
+    public void execute(final WindowModel origin, final Connection connection,
83 82
             final String channel, final boolean isSilent, final CommandArguments args) {
84 83
         if (args.getArguments().length == 0) {
85 84
             connection.getParser().get().sendRawMessage("MODE " + channel);

+ 1
- 2
src/com/dmdirc/commandparser/commands/channel/Names.java Прегледај датотеку

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25
-import com.dmdirc.FrameContainer;
26 25
 import com.dmdirc.commandparser.BaseCommandInfo;
27 26
 import com.dmdirc.commandparser.CommandArguments;
28 27
 import com.dmdirc.commandparser.CommandInfo;
@@ -73,7 +72,7 @@ public class Names extends Command implements IntelligentCommand,
73 72
     }
74 73
 
75 74
     @Override
76
-    public void execute(final FrameContainer origin, final Connection connection,
75
+    public void execute(final WindowModel origin, final Connection connection,
77 76
             final String channel, final boolean isSilent, final CommandArguments args) {
78 77
         connection.getParser().get().sendRawMessage("NAMES " + channel);
79 78
     }

+ 1
- 2
src/com/dmdirc/commandparser/commands/channel/ShowTopic.java Прегледај датотеку

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc.commandparser.commands.channel;
24 24
 
25
-import com.dmdirc.FrameContainer;
26 25
 import com.dmdirc.Topic;
27 26
 import com.dmdirc.commandparser.BaseCommandInfo;
28 27
 import com.dmdirc.commandparser.CommandArguments;
@@ -89,7 +88,7 @@ public class ShowTopic extends Command implements ExternalCommand {
89 88
     }
90 89
 
91 90
     @Override
92
-    public void execute(final FrameContainer origin, final Connection connection,
91
+    public void execute(final WindowModel origin, final Connection connection,
93 92
             final String channel, final boolean isSilent, final CommandArguments args) {
94 93
         if (args.getArguments().length == 0) {
95 94
             connection.getParser().get().sendRawMessage("TOPIC " + channel);

+ 3
- 3
src/com/dmdirc/commandparser/commands/server/JoinChannelCommand.java Прегледај датотеку

@@ -67,7 +67,7 @@ public class JoinChannelCommand extends Command implements IntelligentCommand {
67 67
             CommandType.TYPE_SERVER);
68 68
     /** A map of channel name mentions. */
69 69
     @GuardedBy("mentionsLock")
70
-    private final Multimap<FrameContainer, String> mentions = ArrayListMultimap.create();
70
+    private final Multimap<WindowModel, String> mentions = ArrayListMultimap.create();
71 71
     /** Lock to synchronise on when accessing mentions. */
72 72
     private final Object mentionsLock = new Object();
73 73
 
@@ -128,7 +128,7 @@ public class JoinChannelCommand extends Command implements IntelligentCommand {
128 128
     @Override
129 129
     public AdditionalTabTargets getSuggestions(final int arg,
130 130
             final IntelligentCommandContext context) {
131
-        final FrameContainer source = context.getWindow();
131
+        final WindowModel source = context.getWindow();
132 132
         final Connection connection = source.getConnection().get();
133 133
         final List<String> results = checkSource(source, true, true);
134 134
 
@@ -174,7 +174,7 @@ public class JoinChannelCommand extends Command implements IntelligentCommand {
174 174
      *
175 175
      * @since 0.6.4
176 176
      */
177
-    protected List<String> checkSource(final FrameContainer source,
177
+    protected List<String> checkSource(final WindowModel source,
178 178
             final boolean checkParents, final boolean checkChildren) {
179 179
         final List<String> results = new ArrayList<>();
180 180
 

+ 2
- 1
src/com/dmdirc/ui/input/TabCompleterUtils.java Прегледај датотеку

@@ -29,6 +29,7 @@ import com.dmdirc.commandparser.CommandType;
29 29
 import com.dmdirc.commandparser.commands.Command;
30 30
 import com.dmdirc.commandparser.commands.IntelligentCommand;
31 31
 import com.dmdirc.interfaces.CommandController;
32
+import com.dmdirc.interfaces.WindowModel;
32 33
 
33 34
 import java.util.Arrays;
34 35
 import java.util.Map;
@@ -87,7 +88,7 @@ public class TabCompleterUtils {
87 88
      */
88 89
     @Nullable
89 90
     private AdditionalTabTargets getIntelligentResults(
90
-            final FrameContainer window,
91
+            final WindowModel window,
91 92
             final CommandArguments args, final String partial) {
92 93
         if (!args.isCommand()) {
93 94
             return null;

Loading…
Откажи
Сачувај